lkml.org 
[lkml]   [2005]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectdev_kfree_skb[_irq,_any] usage rules
Date
Hi,

I have this hard_start_xmit code (simplified):

int start_xmit(struct sk_buff *skb, netdevice_t * dev)
{
struct mydevice *priv = acx_netdev_priv(dev);

if (!skb) goto end;
if (!priv) goto end;

/* there is no one to talk to */
if (priv->status != ACX_STATUS_4_ASSOCIATED) {
printk("start_xmit() called but not associated yet\n");
/* silently drop the packet, since we're not connected yet */
dev_kfree_skb(skb);
priv->stats.tx_errors++;
goto end;
}
...
}

Should I use dev_kfree_skb(skb) here or dev_kfree_skb_irq(skb)?
(IIRC hard_start_xmit is in atomic context, no?)

There is also a dev_kfree_skb_any(skb). What are the rules?
--
vda

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-29 12:50    [W:0.019 / U:2.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site