Re: [patch net-next-2.6] net: convert bonding to use rx_handler
From: Jiri Pirko <hidden>
Date: 2011-02-18 20:05:04
Fri, Feb 18, 2011 at 08:58:26PM CET, eric.dumazet@gmail.com wrote:
Le vendredi 18 février 2011 à 20:28 +0100, Jiri Pirko a écrit :quoted
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 !