public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] net/hyperv: fix erroneous NETDEV_TX_BUSY use
Date: Wed, 14 Mar 2012 11:56:55 -0700	[thread overview]
Message-ID: <4F60E9F7.4000402@candelatech.com> (raw)
In-Reply-To: <1331751214.6022.47.camel@edumazet-glaptop>

On 03/14/2012 11:53 AM, Eric Dumazet wrote:
> A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY,
> since caller is going to reuse freed skb.
>
> This is mostly a revert of commit bf769375c (staging: hv: fix the return
> status of netvsc_start_xmit())
>
> In fact netif_tx_stop_queue() / netif_stop_queue() is needed before
> returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop.
>
> In case of memory allocation error, only safe way is to drop the packet
> and return NETDEV_TX_OK

Can you not just leave the skb alone, not bump any tx-dropped
stats, and return NETDEV_TX_BUSY?

Been a while since I looked at this code however...

Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2012-03-14 18:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 18:53 [PATCH] net/hyperv: fix erroneous NETDEV_TX_BUSY use Eric Dumazet
2012-03-14 18:56 ` Ben Greear [this message]
2012-03-14 19:17   ` Eric Dumazet
2012-03-14 20:00     ` Haiyang Zhang
2012-03-14 20:14       ` Eric Dumazet
2012-03-14 20:29         ` Haiyang Zhang
2012-03-16  9:02           ` David Miller

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=4F60E9F7.4000402@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=netdev@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