aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-09-21 18:27:44 -0400
committerDavid S. Miller <davem@davemloft.net>2018-09-24 00:55:24 -0400
commit0542997edece2d75e0bf3e173dfddf1b2b3ef756 (patch)
tree4babc9d1979fd71c88b2ca95a57cd2b89a119423 /drivers/net/ethernet/intel/igb/igb_main.c
parent2753166e4be9df4677745a7f7d9d8daa94938a08 (diff)
igb: remove ndo_poll_controller
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 can last for unlimited amount of time, since one cpu is generally not able to drain all the queues under load. igb 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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index a32c576c1e65..0796cef96fa3 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -205,10 +205,6 @@ static struct notifier_block dca_notifier = {
205 .priority = 0 205 .priority = 0
206}; 206};
207#endif 207#endif
208#ifdef CONFIG_NET_POLL_CONTROLLER
209/* for netdump / net console */
210static void igb_netpoll(struct net_device *);
211#endif
212#ifdef CONFIG_PCI_IOV 208#ifdef CONFIG_PCI_IOV
213static unsigned int max_vfs; 209static unsigned int max_vfs;
214module_param(max_vfs, uint, 0); 210module_param(max_vfs, uint, 0);
@@ -2881,9 +2877,6 @@ static const struct net_device_ops igb_netdev_ops = {
2881 .ndo_set_vf_spoofchk = igb_ndo_set_vf_spoofchk, 2877 .ndo_set_vf_spoofchk = igb_ndo_set_vf_spoofchk,
2882 .ndo_set_vf_trust = igb_ndo_set_vf_trust, 2878 .ndo_set_vf_trust = igb_ndo_set_vf_trust,
2883 .ndo_get_vf_config = igb_ndo_get_vf_config, 2879 .ndo_get_vf_config = igb_ndo_get_vf_config,
2884#ifdef CONFIG_NET_POLL_CONTROLLER
2885 .ndo_poll_controller = igb_netpoll,
2886#endif
2887 .ndo_fix_features = igb_fix_features, 2880 .ndo_fix_features = igb_fix_features,
2888 .ndo_set_features = igb_set_features, 2881 .ndo_set_features = igb_set_features,
2889 .ndo_fdb_add = igb_ndo_fdb_add, 2882 .ndo_fdb_add = igb_ndo_fdb_add,
@@ -9053,29 +9046,6 @@ static int igb_pci_sriov_configure(struct pci_dev *dev, int num_vfs)
9053 return 0; 9046 return 0;
9054} 9047}
9055 9048
9056#ifdef CONFIG_NET_POLL_CONTROLLER
9057/* Polling 'interrupt' - used by things like netconsole to send skbs
9058 * without having to re-enable interrupts. It's not called while
9059 * the interrupt routine is executing.
9060 */
9061static void igb_netpoll(struct net_device *netdev)
9062{
9063 struct igb_adapter *adapter = netdev_priv(netdev);
9064 struct e1000_hw *hw = &adapter->hw;
9065 struct igb_q_vector *q_vector;
9066 int i;
9067
9068 for (i = 0; i < adapter->num_q_vectors; i++) {
9069 q_vector = adapter->q_vector[i];
9070 if (adapter->flags & IGB_FLAG_HAS_MSIX)
9071 wr32(E1000_EIMC, q_vector->eims_value);
9072 else
9073 igb_irq_disable(adapter);
9074 napi_schedule(&q_vector->napi);
9075 }
9076}
9077#endif /* CONFIG_NET_POLL_CONTROLLER */
9078
9079/** 9049/**
9080 * igb_io_error_detected - called when PCI error is detected 9050 * igb_io_error_detected - called when PCI error is detected
9081 * @pdev: Pointer to PCI device 9051 * @pdev: Pointer to PCI device