All of lore.kernel.org
 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>,
	Ariel Elior <ariel.elior@cavium.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Song Liu <songliubraving@fb.com>,
	Jay Vosburgh <j.vosburgh@gmail.com>,
	Veaceslav Falico <vfalico@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>
Subject: [PATCH net 05/15] fm10k: remove ndo_poll_controller
Date: Fri, 21 Sep 2018 15:27:42 -0700	[thread overview]
Message-ID: <20180921222752.101307-6-edumazet@google.com> (raw)
In-Reply-To: <20180921222752.101307-1-edumazet@google.com>

As diagnosed by Song Liu, ndo_poll_controller() can
be very dangerous on loaded hosts, since the cpu
calling ndo_poll_controller() might steal all NAPI
contexts (for all RX/TX queues of the NIC). This capture
lasts for unlimited amount of time, since one
cpu is generally not able to drain all the queues under load.

fm10k uses NAPI for TX completions, so we better let core
networking stack call the napi->poll() to avoid the capture.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k.h      |  3 ---
 .../net/ethernet/intel/fm10k/fm10k_netdev.c   |  3 ---
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c  | 22 -------------------
 3 files changed, 28 deletions(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
index a903a0ba45e180c39e99c6b6a0726291203b1f91..7d42582ed48dc36f3da8b6b670d1c4f8847ffa9b 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k.h
+++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
@@ -504,9 +504,6 @@ void fm10k_update_stats(struct fm10k_intfc *interface);
 void fm10k_service_event_schedule(struct fm10k_intfc *interface);
 void fm10k_macvlan_schedule(struct fm10k_intfc *interface);
 void fm10k_update_rx_drop_en(struct fm10k_intfc *interface);
-#ifdef CONFIG_NET_POLL_CONTROLLER
-void fm10k_netpoll(struct net_device *netdev);
-#endif
 
 /* Netdev */
 struct net_device *fm10k_alloc_netdev(const struct fm10k_info *info);
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index 929f538d28bc03a391340ebf6cc531b03f92b7a3..538a8467f43413f97bbf477053ba8e93560e2bcf 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -1648,9 +1648,6 @@ static const struct net_device_ops fm10k_netdev_ops = {
 	.ndo_udp_tunnel_del	= fm10k_udp_tunnel_del,
 	.ndo_dfwd_add_station	= fm10k_dfwd_add_station,
 	.ndo_dfwd_del_station	= fm10k_dfwd_del_station,
-#ifdef CONFIG_NET_POLL_CONTROLLER
-	.ndo_poll_controller	= fm10k_netpoll,
-#endif
 	.ndo_features_check	= fm10k_features_check,
 };
 
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 15071e4adb98c9924ab2e9a17c7f616f23104bd0..c859ababeed50e030baf7cb7041fbd20916c2265 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1210,28 +1210,6 @@ static irqreturn_t fm10k_msix_mbx_vf(int __always_unused irq, void *data)
 	return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_NET_POLL_CONTROLLER
-/**
- *  fm10k_netpoll - A Polling 'interrupt' handler
- *  @netdev: network interface device structure
- *
- *  This is used by netconsole to send skbs without having to re-enable
- *  interrupts. It's not called while the normal interrupt routine is executing.
- **/
-void fm10k_netpoll(struct net_device *netdev)
-{
-	struct fm10k_intfc *interface = netdev_priv(netdev);
-	int i;
-
-	/* if interface is down do nothing */
-	if (test_bit(__FM10K_DOWN, interface->state))
-		return;
-
-	for (i = 0; i < interface->num_q_vectors; i++)
-		fm10k_msix_clean_rings(0, interface->q_vector[i]);
-}
-
-#endif
 #define FM10K_ERR_MSG(type) case (type): error = #type; break
 static void fm10k_handle_fault(struct fm10k_intfc *interface, int type,
 			       struct fm10k_fault *fault)
-- 
2.19.0.444.g18242da7ef-goog

  parent reply	other threads:[~2018-09-22  4:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 22:27 [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers Eric Dumazet
2018-09-21 22:27 ` [PATCH net 01/15] netpoll: make ndo_poll_controller() optional Eric Dumazet
2018-09-21 22:27 ` [PATCH net 02/15] bonding: use netpoll_poll_dev() helper Eric Dumazet
2018-09-22 10:23   ` Jay Vosburgh
2018-09-21 22:27 ` [PATCH net 03/15] ixgbe: remove ndo_poll_controller Eric Dumazet
2018-09-21 22:27 ` [PATCH net 04/15] ixgbevf: " Eric Dumazet
2018-09-21 22:27 ` Eric Dumazet [this message]
2018-09-21 22:27 ` [PATCH net 06/15] ixgb: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 07/15] igb: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 08/15] ice: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 09/15] i40evf: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 10/15] mlx4: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 11/15] mlx5: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 12/15] bnx2x: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 13/15] bnxt: " Eric Dumazet
2018-09-21 22:27 ` [PATCH net 14/15] nfp: " Eric Dumazet
2018-09-21 23:41   ` Jakub Kicinski
2018-09-21 22:27 ` [PATCH net 15/15] tun: " Eric Dumazet
2018-09-23 19:29 ` [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers David Miller
2018-09-23 19:47   ` Eric Dumazet
2018-09-24  5:04 ` David Miller
2018-09-24 15:30   ` Eric Dumazet
2018-09-24 19:30     ` Song Liu
2018-09-24 19:41       ` Eric Dumazet
2018-09-24 20:00         ` Song Liu
2018-09-24 20:56           ` Eric Dumazet
2018-09-24 21:05             ` Eric Dumazet
2018-09-24 21:18               ` Song Liu
2018-09-25 14:02                 ` Michael Chan
2018-09-25 14:20                   ` Eric Dumazet
2018-09-25 14:43                     ` Michael Chan
2018-09-25 18:25                       ` Song Liu
2018-09-25 21:09                         ` Michael Chan
2018-09-25 23:36     ` Song Liu

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=20180921222752.101307-6-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=andy@greyhouse.net \
    --cc=ariel.elior@cavium.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=j.vosburgh@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=songliubraving@fb.com \
    --cc=tariqt@mellanox.com \
    --cc=vfalico@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.