public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Ciara Loftus <ciara.loftus@intel.com>
To: dev@dpdk.org
Cc: Ciara Loftus <ciara.loftus@intel.com>, stable@dpdk.org
Subject: [PATCH 1/4] net/iavf: fix disabling of promiscuous modes on device close
Date: Tue, 31 Mar 2026 13:01:17 +0000	[thread overview]
Message-ID: <20260331130120.2471971-2-ciara.loftus@intel.com> (raw)
In-Reply-To: <20260331130120.2471971-1-ciara.loftus@intel.com>

Commit 41515403f184 ("net/iavf: disable promiscuous mode on close")
introduced logic that disabled promiscuous mode when closing the device.
However this logic was effectively disabled by commit 676d986b4b86
("net/iavf: fix crash after VF reset failure") which prevented the
configuration of promiscuous mode when the adapter was marked as
"closed". Re-enable the disabling logic by moving it to earlier in the
device close function, before the adapter is marked as "closed".

Fixes: 676d986b4b86 ("net/iavf: fix crash after VF reset failure")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/intel/iavf/iavf_ethdev.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 1eca20bc9a..2858cd4cb5 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -2955,6 +2955,12 @@ iavf_dev_close(struct rte_eth_dev *dev)
 		vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
 	}
 
+	/* Disable promiscuous mode before resetting the VF. This is to avoid
+	 * potential issues when the PF is bound to the kernel driver.
+	 */
+	if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
+		iavf_config_promisc(adapter, false, false);
+
 	adapter->closed = true;
 
 	/* free iAVF security device context all related resources */
@@ -2966,14 +2972,6 @@ iavf_dev_close(struct rte_eth_dev *dev)
 	iavf_flow_flush(dev, NULL);
 	iavf_flow_uninit(adapter);
 
-	/*
-	 * disable promiscuous mode before reset vf
-	 * it is a workaround solution when work with kernel driver
-	 * and it is not the normal way
-	 */
-	if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
-		iavf_config_promisc(adapter, false, false);
-
 	iavf_vf_reset(hw);
 	iavf_shutdown_adminq(hw);
 	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
-- 
2.43.0


  reply	other threads:[~2026-03-31 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 13:01 [PATCH 0/4] net/iavf: improve VF reset resilience Ciara Loftus
2026-03-31 13:01 ` Ciara Loftus [this message]
2026-03-31 13:01 ` [PATCH 2/4] net/iavf: enable auto reset by default Ciara Loftus
2026-03-31 13:01 ` [PATCH 3/4] net/iavf: enable post-reset restoration of VF settings Ciara Loftus
2026-03-31 13:01 ` [PATCH 4/4] net/iavf: fix reset handling error log Ciara Loftus
2026-03-31 13:23   ` David Marchand
2026-04-03 16:08 ` [PATCH 0/4] net/iavf: improve VF reset resilience Bruce Richardson
2026-04-03 16:40   ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260331130120.2471971-2-ciara.loftus@intel.com \
    --to=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox