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

Roland Dreier rolandd at cisco.com
Mon Nov 7 06:33:28 PST 2005


    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.



More information about the general mailing list