summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_base.c
diff options
context:
space:
mode:
authorAmritha Nambiar <amritha.nambiar@intel.com>2023-12-01 15:28:40 -0800
committerJakub Kicinski <kuba@kernel.org>2023-12-04 18:04:05 -0800
commit91fdbce7e8d69be255b45bfeb52092629a50e267 (patch)
tree2876db558c4ecb56e2f217671aa3e7ca216499b4 /drivers/net/ethernet/intel/ice/ice_base.c
parent2a502ff0c4e42a739b5aa550c901bf3852795532 (diff)
ice: Add support in the driver for associating queue with napi
After the napi context is initialized, map the napi instance with the queue/queue-set on the corresponding irq line. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Link: https://lore.kernel.org/r/170147332060.5260.13310934657151560599.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_base.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_base.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c
index 7fa43827a3f0..edad5f9ab16c 100644
--- a/drivers/net/ethernet/intel/ice/ice_base.c
+++ b/drivers/net/ethernet/intel/ice/ice_base.c
@@ -189,10 +189,18 @@ static void ice_free_q_vector(struct ice_vsi *vsi, int v_idx)
}
q_vector = vsi->q_vectors[v_idx];
- ice_for_each_tx_ring(tx_ring, q_vector->tx)
+ ice_for_each_tx_ring(tx_ring, q_vector->tx) {
+ if (vsi->netdev)
+ netif_queue_set_napi(vsi->netdev, tx_ring->q_index,
+ NETDEV_QUEUE_TYPE_TX, NULL);
tx_ring->q_vector = NULL;
- ice_for_each_rx_ring(rx_ring, q_vector->rx)
+ }
+ ice_for_each_rx_ring(rx_ring, q_vector->rx) {
+ if (vsi->netdev)
+ netif_queue_set_napi(vsi->netdev, rx_ring->q_index,
+ NETDEV_QUEUE_TYPE_RX, NULL);
rx_ring->q_vector = NULL;
+ }
/* only VSI with an associated netdev is set up with NAPI */
if (vsi->netdev)