[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110218200311.GC2602@psychotron.redhat.com>
Date: Fri, 18 Feb 2011 21:03:12 +0100
From: Jiri Pirko <jpirko@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org,
davem@...emloft.net, shemminger@...ux-foundation.org,
fubar@...ibm.com, nicolas.2p.debian@...il.com, andy@...yhouse.net
Subject: Re: [patch net-next-2.6] net: convert bonding to use rx_handler
Fri, Feb 18, 2011 at 08:58:26PM CET, eric.dumazet@...il.com wrote:
>Le vendredi 18 février 2011 à 20:28 +0100, Jiri Pirko a écrit :
>
>> Yes I saw this. We would have to do something like:
>>
>> struct skb_rx_context {
>> struct sk_buff *skb;
>> struct net_device *orig_dev;
>> };
>>
>> static DEFINE_PER_CPU(struct skb_rx_context, skb_rx_context);
>>
>> and then in __netif_receive_skb():
>>
>> struct skb_rx_context *cont = __this_cpu_read(skb_rx_context);
>>
>> if (cont->skb != skb) {
>> cont->skb = skb;
>> orig_dev = cont->orig_dev = skb->dev;
>> } else {
>> orig_dev = cont->orig_dev;
>> }
>>
>>
>> Does this make sense?
>
>Well, yes, something like that, but I think you dont need to keep a
>pointer to current skb. (It would not work if one handled/freed, same
>'skb pointer' is reused a bit later)
Well I think I need. How else should I distinguish that new skb (first
time in __netif_receive_skb) is there and I need to remember orig_dev?
>
>Sorry, I wont have time to look at this right now, its now 21h00 in
>France, time to get some time with family ;)
Np, same time here in CZ :)
>
>See you !
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists