DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix the order of closing Rx queue
@ 2023-07-12  5:35 Zhichao Zeng
  2023-07-13  9:11 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Zhichao Zeng @ 2023-07-12  5:35 UTC (permalink / raw)
  To: dev
  Cc: stable, qi.z.zhang, bartoszx.staszewski, Zhichao Zeng,
	Jingjing Wu, Beilei Xing, Ferruh Yigit, Leyi Rong

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")
Cc: stable@dpdk.org
Signed-off-by: Bartosz Staszewski <bartoszx.staszewski@intel.com>
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index ac7154d720..f2fc5a5621 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] net/iavf: fix the order of closing Rx queue
  2023-07-12  5:35 [PATCH] net/iavf: fix the order of closing Rx queue Zhichao Zeng
@ 2023-07-13  9:11 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2023-07-13  9:11 UTC (permalink / raw)
  To: Zeng, ZhichaoX, dev
  Cc: stable, Staszewski, BartoszX, Wu, Jingjing, Xing, Beilei,
	Ferruh Yigit, Rong, Leyi



> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Wednesday, July 12, 2023 1:36 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Staszewski, BartoszX
> <bartoszx.staszewski@intel.com>; Zeng, ZhichaoX <zhichaox.zeng@intel.com>;
> Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Ferruh Yigit <ferruh.yigit@intel.com>; Rong, Leyi <leyi.rong@intel.com>
> 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.
> 
> 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")
> Cc: stable@dpdk.org
> Signed-off-by: Bartosz Staszewski <bartoszx.staszewski@intel.com>
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-13  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12  5:35 [PATCH] net/iavf: fix the order of closing Rx queue Zhichao Zeng
2023-07-13  9:11 ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).