netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
To: <davem@davemloft.net>
Cc: <vbridger@opensource.altera.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: eth: altera: fix napi poll_list corruption
Date: Thu, 3 Sep 2015 09:52:57 +0900	[thread overview]
Message-ID: <20150903.095257.116214212.nemoto@toshiba-tops.co.jp> (raw)
In-Reply-To: <20150902.112500.2176991714061589322.davem@davemloft.net>

On Wed, 2 Sep 2015 11:25:00 -0700, David Miller <davem@davemloft.net> wrote:
> Two lines below this change you are disabling interrupts anyways,
> so I would suggest just moving the spin_lock_irqsave() before the
> napi_gro_flush() to fix this.
> 
> Many of the checks done by napi_complete_done() (invoked by
> napi_complete()) are completely redundant in this context.  For
> example, the direct __napi_complete() call is a really nice
> optimization because we know we are on the poll list and therefore
> it is not empty.

Thank you for your suggestion.

I think napi_gro_flush() can be called with irq enabled, so moving the
spin_lock_irqsave() just before the __napi_complete() (or moving the
__napi_complete() just after the spin_lock_irqsave()) would be better,
right?

  reply	other threads:[~2015-09-03  0:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  8:49 [PATCH] net: eth: altera: fix napi poll_list corruption Atsushi Nemoto
2015-09-02 18:25 ` David Miller
2015-09-03  0:52   ` Atsushi Nemoto [this message]
2015-09-03  2:42     ` Eric Dumazet
2015-09-03  5:32     ` David Miller
2015-09-03  6:01       ` Atsushi Nemoto
2015-09-03 22:35         ` 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=20150903.095257.116214212.nemoto@toshiba-tops.co.jp \
    --to=nemoto@toshiba-tops.co.jp \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vbridger@opensource.altera.com \
    /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;
as well as URLs for NNTP newsgroup(s).