Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net/mlx5e: link NAPI instances to queues and IRQs

Make mlx5 compatible with the newly added netlink queue GET APIs.

Signed-off-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20240209202312.30181-1-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Joe Damato and committed by
Jakub Kicinski
f25e7b82 0f37666d

+11 -1
+4 -1
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
··· 935 935 if (test_bit(MLX5E_PTP_STATE_RX, c->state)) { 936 936 mlx5e_ptp_rx_set_fs(c->priv); 937 937 mlx5e_activate_rq(&c->rq); 938 + netif_queue_set_napi(c->netdev, c->rq.ix, NETDEV_QUEUE_TYPE_RX, &c->napi); 938 939 } 939 940 mlx5e_trigger_napi_sched(&c->napi); 940 941 } ··· 944 943 { 945 944 int tc; 946 945 947 - if (test_bit(MLX5E_PTP_STATE_RX, c->state)) 946 + if (test_bit(MLX5E_PTP_STATE_RX, c->state)) { 947 + netif_queue_set_napi(c->netdev, c->rq.ix, NETDEV_QUEUE_TYPE_RX, NULL); 948 948 mlx5e_deactivate_rq(&c->rq); 949 + } 949 950 950 951 if (test_bit(MLX5E_PTP_STATE_TX, c->state)) { 951 952 for (tc = 0; tc < c->num_tc; tc++)
+7
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
··· 1806 1806 set_bit(MLX5E_SQ_STATE_ENABLED, &sq->state); 1807 1807 netdev_tx_reset_queue(sq->txq); 1808 1808 netif_tx_start_queue(sq->txq); 1809 + netif_queue_set_napi(sq->netdev, sq->txq_ix, NETDEV_QUEUE_TYPE_TX, sq->cq.napi); 1809 1810 } 1810 1811 1811 1812 void mlx5e_tx_disable_queue(struct netdev_queue *txq) ··· 1820 1819 { 1821 1820 struct mlx5_wq_cyc *wq = &sq->wq; 1822 1821 1822 + netif_queue_set_napi(sq->netdev, sq->txq_ix, NETDEV_QUEUE_TYPE_TX, NULL); 1823 1823 clear_bit(MLX5E_SQ_STATE_ENABLED, &sq->state); 1824 1824 synchronize_net(); /* Sync with NAPI to prevent netif_tx_wake_queue. */ 1825 1825 ··· 2562 2560 c->lag_port = mlx5e_enumerate_lag_port(priv->mdev, ix); 2563 2561 2564 2562 netif_napi_add(netdev, &c->napi, mlx5e_napi_poll); 2563 + netif_napi_set_irq(&c->napi, irq); 2565 2564 2566 2565 err = mlx5e_open_queues(c, params, cparam); 2567 2566 if (unlikely(err)) ··· 2605 2602 mlx5e_activate_xsk(c); 2606 2603 else 2607 2604 mlx5e_activate_rq(&c->rq); 2605 + 2606 + netif_queue_set_napi(c->netdev, c->ix, NETDEV_QUEUE_TYPE_RX, &c->napi); 2608 2607 } 2609 2608 2610 2609 static void mlx5e_deactivate_channel(struct mlx5e_channel *c) 2611 2610 { 2612 2611 int tc; 2612 + 2613 + netif_queue_set_napi(c->netdev, c->ix, NETDEV_QUEUE_TYPE_RX, NULL); 2613 2614 2614 2615 if (test_bit(MLX5E_CHANNEL_STATE_XSK, c->state)) 2615 2616 mlx5e_deactivate_xsk(c);