Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Michael Chan <michael.chan@broadcom.com>,
	Aviad Krawczyk <aviad.krawczyk@huawei.com>,
	Song Liu <songliubraving@fb.com>,
	Douglas Miller <dougmill@linux.vnet.ibm.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Harish Patil <harish.patil@cavium.com>,
	Manish Chopra <manish.chopra@cavium.com>,
	Netanel Belgazal <netanel@amazon.com>,
	Solarflare linux maintainers <linux-net-drivers@solarflare.com>,
	Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Subject: [PATCH net 01/11] netpoll: do not test NAPI_STATE_SCHED in poll_one_napi()
Date: Thu, 27 Sep 2018 09:31:51 -0700	[thread overview]
Message-ID: <20180927163201.56609-2-edumazet@google.com> (raw)
In-Reply-To: <20180927163201.56609-1-edumazet@google.com>

Since we do no longer require NAPI drivers to provide
an ndo_poll_controller(), napi_schedule() has not been done
before poll_one_napi() invocation.

So testing NAPI_STATE_SCHED is likely to cause early returns.

While we are at it, remove outdated comment.

Note to future bisections : This change might surface prior
bugs in drivers. See commit 73f21c653f93 ("bnxt_en: Fix TX
timeout during netpoll.") for one occurrence.

Fixes: ac3d9dd034e5 ("netpoll: make ndo_poll_controller() optional")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Song Liu <songliubraving@fb.com>
Cc: Michael Chan <michael.chan@broadcom.com>
---
 net/core/netpoll.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 3219a2932463096566ce8ff336ecdf699422dd65..3ae899805f8b674b4ffb7d791330f836d38eff7d 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -135,27 +135,9 @@ static void queue_process(struct work_struct *work)
 	}
 }
 
-/*
- * Check whether delayed processing was scheduled for our NIC. If so,
- * we attempt to grab the poll lock and use ->poll() to pump the card.
- * If this fails, either we've recursed in ->poll() or it's already
- * running on another CPU.
- *
- * Note: we don't mask interrupts with this lock because we're using
- * trylock here and interrupts are already disabled in the softirq
- * case. Further, we test the poll_owner to avoid recursion on UP
- * systems where the lock doesn't exist.
- */
 static void poll_one_napi(struct napi_struct *napi)
 {
-	int work = 0;
-
-	/* net_rx_action's ->poll() invocations and our's are
-	 * synchronized by this test which is only made while
-	 * holding the napi->poll_lock.
-	 */
-	if (!test_bit(NAPI_STATE_SCHED, &napi->state))
-		return;
+	int work;
 
 	/* If we set this bit but see that it has already been set,
 	 * that indicates that napi has been disabled and we need
-- 
2.19.0.605.g01d371f741-goog

  reply	other threads:[~2018-09-27 22:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27 16:31 [PATCH net 00/11] netpoll: second round of fixes Eric Dumazet
2018-09-27 16:31 ` Eric Dumazet [this message]
2018-09-27 18:25   ` [PATCH net 01/11] netpoll: do not test NAPI_STATE_SCHED in poll_one_napi() Michael Chan
2018-09-27 18:33     ` Song Liu
2018-09-27 16:31 ` [PATCH net 02/11] hinic: remove ndo_poll_controller Eric Dumazet
2018-09-27 16:31 ` [PATCH net 03/11] ehea: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 04/11] net: hns: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 05/11] virtio_net: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 06/11] qlcnic: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 07/11] qlogic: netxen: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 08/11] net: ena: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 09/11] sfc: " Eric Dumazet
2018-09-28  7:30   ` Bert Kenward
2018-09-27 16:32 ` [PATCH net 10/11] sfc-falcon: " Eric Dumazet
2018-09-28  7:30   ` Bert Kenward
2018-09-27 16:32 ` [PATCH net 11/11] ibmvnic: " Eric Dumazet
2018-09-28 18:14 ` [PATCH net 00/11] netpoll: second round of fixes 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=20180927163201.56609-2-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=aviad.krawczyk@huawei.com \
    --cc=davem@davemloft.net \
    --cc=dougmill@linux.vnet.ibm.com \
    --cc=harish.patil@cavium.com \
    --cc=jasowang@redhat.com \
    --cc=linux-net-drivers@solarflare.com \
    --cc=manish.chopra@cavium.com \
    --cc=michael.chan@broadcom.com \
    --cc=mst@redhat.com \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=tlfalcon@linux.vnet.ibm.com \
    --cc=yisen.zhuang@huawei.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