[vortex] Why dev_kfree_skb in the device driver?
Donald Becker
becker@scyld.com
Wed Jan 16 19:52:00 2002
On 16 Jan 2002, Joel Hollingsworth wrote:
> Why execute dev_kfree_skb[_irq](skb); after sending in the device
> driver? Do we always wish to free the skb? Shouldn't the protocol
> decide what to do with the skb and not the device driver?
The driver get the skbuff with one extra "ownership point" on the skbuff
(the skb->free count). When the driver is finished using the skbuff, it
decrements the count with the dev_free_skb() call. The skbuff is
actually freed only if the count is zero.
Donald Becker becker@scyld.com
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Second Generation Beowulf Clusters
Annapolis MD 21403 410-990-9993