Skip to content

Commit d8ea6a9

Browse files
edumazetdavem330
authored andcommitted
bnx2x: 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. bnx2x 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: Ariel Elior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9c29bcd commit d8ea6a9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12894,19 +12894,6 @@ static int bnx2x_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1289412894
}
1289512895
}
1289612896

12897-
#ifdef CONFIG_NET_POLL_CONTROLLER
12898-
static void poll_bnx2x(struct net_device *dev)
12899-
{
12900-
struct bnx2x *bp = netdev_priv(dev);
12901-
int i;
12902-
12903-
for_each_eth_queue(bp, i) {
12904-
struct bnx2x_fastpath *fp = &bp->fp[i];
12905-
napi_schedule(&bnx2x_fp(bp, fp->index, napi));
12906-
}
12907-
}
12908-
#endif
12909-
1291012897
static int bnx2x_validate_addr(struct net_device *dev)
1291112898
{
1291212899
struct bnx2x *bp = netdev_priv(dev);
@@ -13113,9 +13100,6 @@ static const struct net_device_ops bnx2x_netdev_ops = {
1311313100
.ndo_tx_timeout = bnx2x_tx_timeout,
1311413101
.ndo_vlan_rx_add_vid = bnx2x_vlan_rx_add_vid,
1311513102
.ndo_vlan_rx_kill_vid = bnx2x_vlan_rx_kill_vid,
13116-
#ifdef CONFIG_NET_POLL_CONTROLLER
13117-
.ndo_poll_controller = poll_bnx2x,
13118-
#endif
1311913103
.ndo_setup_tc = __bnx2x_setup_tc,
1312013104
#ifdef CONFIG_BNX2X_SRIOV
1312113105
.ndo_set_vf_mac = bnx2x_set_vf_mac,

0 commit comments

Comments
 (0)