Skip to contentSkip to conversation

net/iavf: fix the order of closing Rx queue

PATCH Applied Zhichao Zeng 2 participants 2 messages Jul 12, 2023 – Jul 13, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix the order of closing Rx queue

The current implementation stops queue before disabling the Rx interrupt, and when there are still unprocessed packets remaining in the queue, this may cause the Rx ring to timeout, leading to IOMMU fault.

This patch disables the Rx interrupt before stopping the queue, ensuring that no packets received when disabling the queues.

Fixes 02d212ca3125 ("net/iavf: rename remaining avf strings")
---
 drivers/net/iavf/iavf_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_ethdev.c +2 -2
index ac7154d720..f2fc5a5621 100644
@@ -1087,8 +1087,6 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 	if (adapter->stopped == 1)
 		return 0;
 
-	iavf_stop_queues(dev);
-
 	/* Disable the interrupt for Rx */
 	rte_intr_efd_disable(intr_handle);
 	/* Rx interrupt vector mapping free */
@@ -1101,6 +1099,8 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 	iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
 				  false);
 
+	iavf_stop_queues(dev);
+
 	adapter->stopped = 1;
 	dev->data->dev_started = 0;
 
Signature · 1 line
2.34.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Wednesday, July 12, 2023 1:36 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; Staszewski, BartoszX <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Ferruh Yigit <[email protected]>; Rong, Leyi <[email protected]>
Subject: [PATCH] net/iavf: fix the order of closing Rx queue

The current implementation stops queue before disabling the Rx interrupt, and when there are still unprocessed packets remaining in the queue, this may cause the Rx ring to timeout, leading to IOMMU fault.

Quoted 7 lines

This patch disables the Rx interrupt before stopping the queue, ensuring that no packets received when disabling the queues.

Fixes 02d212ca3125 ("net/iavf: rename remaining avf strings")

Applied to dpdk-next-net-intel.

Thanks
Qi