Skip to content

Commit 58e0e22

Browse files
edumazetdavem330
authored andcommitted
bnxt: 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. bnxt 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: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d8ea6a9 commit 58e0e22

File tree

1 file changed

+0
-18
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+0
-18
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7672,21 +7672,6 @@ static void bnxt_tx_timeout(struct net_device *dev)
76727672
bnxt_queue_sp_work(bp);
76737673
}
76747674

7675-
#ifdef CONFIG_NET_POLL_CONTROLLER
7676-
static void bnxt_poll_controller(struct net_device *dev)
7677-
{
7678-
struct bnxt *bp = netdev_priv(dev);
7679-
int i;
7680-
7681-
/* Only process tx rings/combined rings in netpoll mode. */
7682-
for (i = 0; i < bp->tx_nr_rings; i++) {
7683-
struct bnxt_tx_ring_info *txr = &bp->tx_ring[i];
7684-
7685-
napi_schedule(&txr->bnapi->napi);
7686-
}
7687-
}
7688-
#endif
7689-
76907675
static void bnxt_timer(struct timer_list *t)
76917676
{
76927677
struct bnxt *bp = from_timer(bp, t, timer);
@@ -8519,9 +8504,6 @@ static const struct net_device_ops bnxt_netdev_ops = {
85198504
.ndo_set_vf_link_state = bnxt_set_vf_link_state,
85208505
.ndo_set_vf_spoofchk = bnxt_set_vf_spoofchk,
85218506
.ndo_set_vf_trust = bnxt_set_vf_trust,
8522-
#endif
8523-
#ifdef CONFIG_NET_POLL_CONTROLLER
8524-
.ndo_poll_controller = bnxt_poll_controller,
85258507
#endif
85268508
.ndo_setup_tc = bnxt_setup_tc,
85278509
#ifdef CONFIG_RFS_ACCEL

0 commit comments

Comments
 (0)