Commit 0825ce70 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

nfp: 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.

nfp uses NAPI for TX completions, so we better let core
networking stack call the napi->poll() to avoid the capture.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Tested-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58e0e22b
...@@ -3146,21 +3146,6 @@ nfp_net_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid) ...@@ -3146,21 +3146,6 @@ nfp_net_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid)
return nfp_net_reconfig_mbox(nn, NFP_NET_CFG_MBOX_CMD_CTAG_FILTER_KILL); return nfp_net_reconfig_mbox(nn, NFP_NET_CFG_MBOX_CMD_CTAG_FILTER_KILL);
} }
#ifdef CONFIG_NET_POLL_CONTROLLER
static void nfp_net_netpoll(struct net_device *netdev)
{
struct nfp_net *nn = netdev_priv(netdev);
int i;
/* nfp_net's NAPIs are statically allocated so even if there is a race
* with reconfig path this will simply try to schedule some disabled
* NAPI instances.
*/
for (i = 0; i < nn->dp.num_stack_tx_rings; i++)
napi_schedule_irqoff(&nn->r_vecs[i].napi);
}
#endif
static void nfp_net_stat64(struct net_device *netdev, static void nfp_net_stat64(struct net_device *netdev,
struct rtnl_link_stats64 *stats) struct rtnl_link_stats64 *stats)
{ {
...@@ -3519,9 +3504,6 @@ const struct net_device_ops nfp_net_netdev_ops = { ...@@ -3519,9 +3504,6 @@ const struct net_device_ops nfp_net_netdev_ops = {
.ndo_get_stats64 = nfp_net_stat64, .ndo_get_stats64 = nfp_net_stat64,
.ndo_vlan_rx_add_vid = nfp_net_vlan_rx_add_vid, .ndo_vlan_rx_add_vid = nfp_net_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = nfp_net_vlan_rx_kill_vid, .ndo_vlan_rx_kill_vid = nfp_net_vlan_rx_kill_vid,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = nfp_net_netpoll,
#endif
.ndo_set_vf_mac = nfp_app_set_vf_mac, .ndo_set_vf_mac = nfp_app_set_vf_mac,
.ndo_set_vf_vlan = nfp_app_set_vf_vlan, .ndo_set_vf_vlan = nfp_app_set_vf_vlan,
.ndo_set_vf_spoofchk = nfp_app_set_vf_spoofchk, .ndo_set_vf_spoofchk = nfp_app_set_vf_spoofchk,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment