Skip to content

Commit 8d59de8

Browse files
Erez Shitritdavem330
Erez Shitrit
authored andcommitted
net/mlx4_en: Process all completions in RX rings after port goes up
Currently there is a race between incoming traffic and initialization flow. HW is able to receive the packets after INIT_PORT is done and unicast steering is configured. Before we set priv->port_up NAPI is not scheduled and receive queues become full. Therefore we never get new interrupts about the completions. This issue could happen if running heavy traffic during bringing port up. The resolution is to schedule NAPI once port_up is set. If receive queues were full this will process all cqes and release them. Fixes: c27a02c ("mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC") Signed-off-by: Erez Shitrit <[email protected]> Signed-off-by: Eugenia Emantayev <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4850cf4 commit 8d59de8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/ethernet/mellanox/mlx4/en_netdev.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,6 +1733,13 @@ int mlx4_en_start_port(struct net_device *dev)
17331733
udp_tunnel_get_rx_info(dev);
17341734

17351735
priv->port_up = true;
1736+
1737+
/* Process all completions if exist to prevent
1738+
* the queues freezing if they are full
1739+
*/
1740+
for (i = 0; i < priv->rx_ring_num; i++)
1741+
napi_schedule(&priv->rx_cq[i]->napi);
1742+
17361743
netif_tx_start_all_queues(dev);
17371744
netif_device_attach(dev);
17381745

0 commit comments

Comments
 (0)