Skip to content

Commit 0825ce7

Browse files
edumazetdavem330
authored andcommitted
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: Eric Dumazet <[email protected]> Cc: Jakub Kicinski <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Tested-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 58e0e22 commit 0825ce7

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3146,21 +3146,6 @@ nfp_net_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid)
31463146
return nfp_net_reconfig_mbox(nn, NFP_NET_CFG_MBOX_CMD_CTAG_FILTER_KILL);
31473147
}
31483148

3149-
#ifdef CONFIG_NET_POLL_CONTROLLER
3150-
static void nfp_net_netpoll(struct net_device *netdev)
3151-
{
3152-
struct nfp_net *nn = netdev_priv(netdev);
3153-
int i;
3154-
3155-
/* nfp_net's NAPIs are statically allocated so even if there is a race
3156-
* with reconfig path this will simply try to schedule some disabled
3157-
* NAPI instances.
3158-
*/
3159-
for (i = 0; i < nn->dp.num_stack_tx_rings; i++)
3160-
napi_schedule_irqoff(&nn->r_vecs[i].napi);
3161-
}
3162-
#endif
3163-
31643149
static void nfp_net_stat64(struct net_device *netdev,
31653150
struct rtnl_link_stats64 *stats)
31663151
{
@@ -3519,9 +3504,6 @@ const struct net_device_ops nfp_net_netdev_ops = {
35193504
.ndo_get_stats64 = nfp_net_stat64,
35203505
.ndo_vlan_rx_add_vid = nfp_net_vlan_rx_add_vid,
35213506
.ndo_vlan_rx_kill_vid = nfp_net_vlan_rx_kill_vid,
3522-
#ifdef CONFIG_NET_POLL_CONTROLLER
3523-
.ndo_poll_controller = nfp_net_netpoll,
3524-
#endif
35253507
.ndo_set_vf_mac = nfp_app_set_vf_mac,
35263508
.ndo_set_vf_vlan = nfp_app_set_vf_vlan,
35273509
.ndo_set_vf_spoofchk = nfp_app_set_vf_spoofchk,

0 commit comments

Comments
 (0)