mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Denis Vlasenko <vda@ilport.com.ua>
To: linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Subject: dev_kfree_skb[_irq,_any] usage rules
Date: Wed, 29 Jun 2005 13:46:28 +0300	[thread overview]
Message-ID: <200506291346.28142.vda@ilport.com.ua> (raw)

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


                 reply	other threads:[~2005-06-29 10:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200506291346.28142.vda@ilport.com.ua \
    --to=vda@ilport.com.ua \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®