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)
Sorry, I wont have time to look at this right now, its now 21h00 in
France, time to get some time with family ;)
See you !