[openib-general] Re: question : skb->dev versus dev_kfree_skb_any

Michael S. Tsirkin mst at mellanox.co.il
Mon Nov 7 07:02:38 PST 2005


Quoting r. Roland Dreier <rolandd at cisco.com>:
> Subject: Re: question : skb->dev versus dev_kfree_skb_any
> 
>     Michael> Hello, Roland!  Why is ipoib always setting skb->dev
>     Michael> before calling dev_kfree_skb_any?
>     Michael> E.g. ipoib_multicast.c, line 126, has
> 
>     Michael>		     skb-> dev = dev;
>     Michael>                 dev_kfree_skb_any(skb);
> 
>     Michael> I went through dev_kfree_skb_any and couldnt see where
>     Michael> does it use the dev member. What am I missing?
> 
> I suspect all these loops throwing away packets in ipoib_multicast.c
> were cut-and-pasted from the loop that does dev_queue_xmit(), which
> does require the device to be set correctly.  So there's no good
> reason to set skb->dev before freeing skb.
> 
>  - R.
> 

Okay, do you want a patch to kill them?

-- 
MST



More information about the general mailing list