dev_kfree_skb[_irq,_any] usage rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux