* [RFC 0/2] iavf post-reset state restoration updates
@ 2026-07-21 13:08 Ciara Loftus
2026-07-21 13:08 ` [RFC 1/2] net/iavf: remove auto reconfig devarg Ciara Loftus
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ciara Loftus @ 2026-07-21 13:08 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
A deprecation notice [1] has been submitted for the iavf auto_reconfig devarg.
The first patch removes the devarg, restoring promiscuous and all-multicast
modes unconditionally after a VF reset. The second patch limits this
restoration to VF reset only, avoiding unnecessary work on dev_start.
[1] https://mails.dpdk.org/archives/dev/2026-July/341822.html
Ciara Loftus (2):
net/iavf: remove auto reconfig devarg
net/iavf: restore promiscuous mode only after VF reset
doc/guides/nics/intel_vf.rst | 5 ---
doc/guides/rel_notes/release_26_07.rst | 5 +++
drivers/net/intel/iavf/iavf.h | 1 -
drivers/net/intel/iavf/iavf_ethdev.c | 62 +++++++++++++++++---------
4 files changed, 45 insertions(+), 28 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC 1/2] net/iavf: remove auto reconfig devarg
2026-07-21 13:08 [RFC 0/2] iavf post-reset state restoration updates Ciara Loftus
@ 2026-07-21 13:08 ` Ciara Loftus
2026-07-21 13:08 ` [RFC 2/2] net/iavf: restore promiscuous mode only after VF reset Ciara Loftus
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Ciara Loftus @ 2026-07-21 13:08 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The `auto_reconfig` devarg controlled whether the promiscuous and
all-multicast states were restored after a VF reset. Remove it and always
restore those states after a reset, for two reasons.
First, a VF almost always wants those states restored after a reset. For
the rare cases where a different post-reset state is wanted, a post-reset
callback can be registered and used to adjust the state once the
reset completes.
Second, the devarg was inconsistent: it only affected promiscuous and
all-multicast, while MAC addresses, the multicast address list, VLAN
configuration and RSS were restored regardless of its value. The "reconfig"
name was also ambiguous, potentially suggesting it governed all settings
when it did not.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
doc/guides/nics/intel_vf.rst | 5 -----
doc/guides/rel_notes/release_26_07.rst | 5 +++++
drivers/net/intel/iavf/iavf.h | 1 -
drivers/net/intel/iavf/iavf_ethdev.c | 28 ++++++--------------------
4 files changed, 11 insertions(+), 28 deletions(-)
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index 8f8ce32cac..d287a78672 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -106,11 +106,6 @@ IAVF PMD parameters
To disable this functionality,
set the ``auto_reset`` devarg to zero: ``-a 18:01.0,auto_reset=0``
-``auto_reconfig``
- Restore settings (unicast and multicast promiscuous states) on the VF after a reset event.
- Enabled by default.
- To disable it: ``-a 18:01.0,auto_reconfig=0``
-
``no-poll-on-link-down``
Stop polling Rx/Tx hardware queue when link is down.
This is enabled by default because it is required when ``auto_reset`` is enabled
diff --git a/doc/guides/rel_notes/release_26_07.rst b/doc/guides/rel_notes/release_26_07.rst
index 6badd6d91b..a6ff949860 100644
--- a/doc/guides/rel_notes/release_26_07.rst
+++ b/doc/guides/rel_notes/release_26_07.rst
@@ -301,6 +301,11 @@ Removed Items
The ZUC and SNOW 3G crypto drivers are using APIs
that are now deprecated in the Intel IPsec Multi-Buffer library.
+* net/iavf: Removed the ``auto_reconfig`` devarg.
+
+ The restoration of the promiscuous and all-multicast settings after a VF reset is
+ now unconditional.
+
API Changes
-----------
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 293adaf6c9..143ab3c1c0 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -323,7 +323,6 @@ struct iavf_devargs {
uint16_t quanta_size;
uint32_t watchdog_period;
int auto_reset;
- int auto_reconfig;
int no_poll_on_link_down;
uint64_t mbuf_check;
int enable_ptype_lldp;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index d601ec3b6a..829573983a 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -42,7 +42,6 @@
#define IAVF_QUANTA_SIZE_ARG "quanta_size"
#define IAVF_RESET_WATCHDOG_ARG "watchdog_period"
#define IAVF_ENABLE_AUTO_RESET_ARG "auto_reset"
-#define IAVF_ENABLE_AUTO_RECONFIG_ARG "auto_reconfig"
#define IAVF_NO_POLL_ON_LINK_DOWN_ARG "no-poll-on-link-down"
#define IAVF_MBUF_CHECK_ARG "mbuf_check"
#define IAVF_ENABLE_PTYPE_LLDP_ARG "enable_ptype_lldp"
@@ -55,7 +54,6 @@ static const char * const iavf_valid_args[] = {
IAVF_QUANTA_SIZE_ARG,
IAVF_RESET_WATCHDOG_ARG,
IAVF_ENABLE_AUTO_RESET_ARG,
- IAVF_ENABLE_AUTO_RECONFIG_ARG,
IAVF_NO_POLL_ON_LINK_DOWN_ARG,
IAVF_MBUF_CHECK_ARG,
IAVF_ENABLE_PTYPE_LLDP_ARG,
@@ -2468,7 +2466,6 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
ad->devargs.auto_reset = 1;
ad->devargs.no_poll_on_link_down = 1;
- ad->devargs.auto_reconfig = 1;
if (!devargs)
return 0;
@@ -2531,11 +2528,6 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
ad->devargs.no_poll_on_link_down = 1;
}
- ret = rte_kvargs_process(kvlist, IAVF_ENABLE_AUTO_RECONFIG_ARG,
- &parse_bool, &ad->devargs.auto_reconfig);
- if (ret)
- goto bail;
-
ret = rte_kvargs_process(kvlist, IAVF_ENABLE_PTYPE_LLDP_ARG,
&parse_bool, &ad->devargs.enable_ptype_lldp);
if (ret)
@@ -3358,7 +3350,7 @@ iavf_is_reset_detected(struct iavf_adapter *adapter)
static int
iavf_post_reset_reconfig(struct rte_eth_dev *dev)
{
- int ret, status = 0;
+ int ret = 0;
bool allmulti = false, allunicast = false;
struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
@@ -3377,10 +3369,9 @@ iavf_post_reset_reconfig(struct rte_eth_dev *dev)
PMD_DRV_LOG(DEBUG, "Restored unicast promiscuous mode (%s) "
"and multicast promiscuous mode (%s)",
allunicast ? "on" : "off", allmulti ? "on" : "off");
- status |= ret;
}
- return status;
+ return ret;
}
/*
@@ -3435,17 +3426,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
}
/* Restore settings after the reset */
- if (adapter->devargs.auto_reconfig) {
- ret = iavf_post_reset_reconfig(dev);
- if (ret) {
- PMD_DRV_LOG(ERR, "Failed to restore VF settings after reset");
- goto error;
- }
- } else {
- dev->data->promiscuous = 0;
- dev->data->all_multicast = 0;
- vf->promisc_unicast_enabled = false;
- vf->promisc_multicast_enabled = false;
+ ret = iavf_post_reset_reconfig(dev);
+ if (ret) {
+ PMD_DRV_LOG(ERR, "Failed to restore VF settings after reset");
+ goto error;
}
goto exit;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RFC 2/2] net/iavf: restore promiscuous mode only after VF reset
2026-07-21 13:08 [RFC 0/2] iavf post-reset state restoration updates Ciara Loftus
2026-07-21 13:08 ` [RFC 1/2] net/iavf: remove auto reconfig devarg Ciara Loftus
@ 2026-07-21 13:08 ` Ciara Loftus
2026-07-22 10:10 ` [RFC 0/2] iavf post-reset state restoration updates David Marchand
2026-08-05 12:57 ` [PATCH v2 " Ciara Loftus
3 siblings, 0 replies; 7+ messages in thread
From: Ciara Loftus @ 2026-07-21 13:08 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The promiscuous and all-multicast settings persist in hardware across
a port stop/start and are only cleared by a VF reset. Despite this,
the ethdev start path re-applied them on every `dev_start` through the
config restore logic. Together with the driver's own restore after a
reset, a reset followed by a start reprogrammed them twice and issued
redundant requests to the PF.
Implement the `get_restore_flags` callback to clear
`RTE_ETH_RESTORE_PROMISC` and `RTE_ETH_RESTORE_ALLMULTI` so ethdev
skips them on start; the driver restores them only after a VF reset.
A queue reconfiguration in `iavf_dev_configure` also triggers a reset,
so the states are re-applied there too, except during reset recovery
where the reset handler already restores them once.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 34 ++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 829573983a..183d986831 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -163,6 +163,9 @@ static int iavf_set_mc_addr_list(struct rte_eth_dev *dev,
struct rte_ether_addr *mc_addrs,
uint32_t mc_addrs_num);
static int iavf_tm_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg);
+static uint64_t iavf_get_restore_flags(struct rte_eth_dev *dev,
+ enum rte_eth_dev_operation op);
+static int iavf_post_reset_reconfig(struct rte_eth_dev *dev);
static const struct rte_pci_id pci_id_iavf_map[] = {
{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },
@@ -262,6 +265,7 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
.tx_done_cleanup = iavf_dev_tx_done_cleanup,
.get_monitor_addr = iavf_get_monitor_addr,
.tm_ops_get = iavf_tm_ops_get,
+ .get_restore_flags = iavf_get_restore_flags,
};
static int
@@ -282,6 +286,19 @@ iavf_tm_ops_get(struct rte_eth_dev *dev,
return 0;
}
+static uint64_t
+iavf_get_restore_flags(__rte_unused struct rte_eth_dev *dev,
+ __rte_unused enum rte_eth_dev_operation op)
+{
+ /*
+ * The unicast and multicast promiscuous settings persist across a
+ * stop/start; they are only cleared by a VF reset, which the driver
+ * restores itself. So ethdev does not need to restore them on start.
+ */
+ return RTE_ETH_RESTORE_ALL & ~(RTE_ETH_RESTORE_PROMISC |
+ RTE_ETH_RESTORE_ALLMULTI);
+}
+
__rte_unused
static int
iavf_vfr_inprogress(struct iavf_hw *hw)
@@ -673,6 +690,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
uint16_t num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,
dev->data->nb_tx_queues);
+ bool reset_done = false;
int ret;
if (ad->closed)
@@ -702,6 +720,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
ret = iavf_queues_req_reset(dev, num_queue_pairs);
if (ret)
return ret;
+ reset_done = true;
ret = iavf_get_max_rss_queue_region(ad);
if (ret) {
@@ -720,6 +739,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
ret = iavf_queues_req_reset(dev, num_queue_pairs);
if (ret)
return ret;
+ reset_done = true;
vf->lv_enabled = false;
}
@@ -735,6 +755,20 @@ iavf_dev_configure(struct rte_eth_dev *dev)
return -1;
}
}
+
+ /*
+ * A queue reconfiguration above triggers a VF reset, which clears the
+ * promiscuous and all-multicast settings in hardware. Re-apply the
+ * pre-reset states here, unless this configure is itself part of reset
+ * recovery, in which case the reset handler restores them once at the
+ * end (avoiding a double restore).
+ */
+ if (reset_done && !vf->in_reset_recovery) {
+ ret = iavf_post_reset_reconfig(dev);
+ if (ret)
+ return ret;
+ }
+
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RFC 0/2] iavf post-reset state restoration updates
2026-07-21 13:08 [RFC 0/2] iavf post-reset state restoration updates Ciara Loftus
2026-07-21 13:08 ` [RFC 1/2] net/iavf: remove auto reconfig devarg Ciara Loftus
2026-07-21 13:08 ` [RFC 2/2] net/iavf: restore promiscuous mode only after VF reset Ciara Loftus
@ 2026-07-22 10:10 ` David Marchand
2026-08-05 12:57 ` [PATCH v2 " Ciara Loftus
3 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2026-07-22 10:10 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev, Bruce Richardson
On Tue, 21 Jul 2026 at 15:09, Ciara Loftus <ciara.loftus@intel.com> wrote:
>
> A deprecation notice [1] has been submitted for the iavf auto_reconfig devarg.
>
> The first patch removes the devarg, restoring promiscuous and all-multicast
> modes unconditionally after a VF reset. The second patch limits this
> restoration to VF reset only, avoiding unnecessary work on dev_start.
>
> [1] https://mails.dpdk.org/archives/dev/2026-July/341822.html
>
> Ciara Loftus (2):
> net/iavf: remove auto reconfig devarg
> net/iavf: restore promiscuous mode only after VF reset
>
> doc/guides/nics/intel_vf.rst | 5 ---
> doc/guides/rel_notes/release_26_07.rst | 5 +++
> drivers/net/intel/iavf/iavf.h | 1 -
> drivers/net/intel/iavf/iavf_ethdev.c | 62 +++++++++++++++++---------
> 4 files changed, 45 insertions(+), 28 deletions(-)
This lgtm on the principle.
This will conflict with my series that touches mac restoration, but it
should be trivial to resolve.
I'll try to find some time to test this, more likely after the summer period.
--
David Marchand
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 0/2] iavf post-reset state restoration updates
2026-07-21 13:08 [RFC 0/2] iavf post-reset state restoration updates Ciara Loftus
` (2 preceding siblings ...)
2026-07-22 10:10 ` [RFC 0/2] iavf post-reset state restoration updates David Marchand
@ 2026-08-05 12:57 ` Ciara Loftus
2026-08-05 12:57 ` [PATCH v2 1/2] net/iavf: remove auto reconfig devarg Ciara Loftus
2026-08-05 12:57 ` [PATCH v2 2/2] net/iavf: restore promiscuous mode only after VF reset Ciara Loftus
3 siblings, 2 replies; 7+ messages in thread
From: Ciara Loftus @ 2026-08-05 12:57 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The iavf auto_reconfig devarg was marked for deprecation in the last release.
The first patch in this series removes the devarg, restoring promiscuous and
all-multicast modes unconditionally after a VF reset. The second patch limits
this restoration to VF reset only, avoiding unnecessary work on dev_start.
v2:
* Remove deprecation notice
* Move release note update from 26.07 to 26.11
Ciara Loftus (2):
net/iavf: remove auto reconfig devarg
net/iavf: restore promiscuous mode only after VF reset
doc/guides/nics/intel_vf.rst | 5 ---
doc/guides/rel_notes/deprecation.rst | 7 ---
doc/guides/rel_notes/release_26_11.rst | 5 +++
drivers/net/intel/iavf/iavf.h | 1 -
drivers/net/intel/iavf/iavf_ethdev.c | 62 +++++++++++++++++---------
5 files changed, 45 insertions(+), 35 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] net/iavf: remove auto reconfig devarg
2026-08-05 12:57 ` [PATCH v2 " Ciara Loftus
@ 2026-08-05 12:57 ` Ciara Loftus
2026-08-05 12:57 ` [PATCH v2 2/2] net/iavf: restore promiscuous mode only after VF reset Ciara Loftus
1 sibling, 0 replies; 7+ messages in thread
From: Ciara Loftus @ 2026-08-05 12:57 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The `auto_reconfig` devarg controlled whether the promiscuous and
all-multicast states were restored after a VF reset. Remove it and always
restore those states after a reset, for two reasons.
First, a VF almost always wants those states restored after a reset. For
the rare cases where a different post-reset state is wanted, a post-reset
callback can be registered and used to adjust the state once the
reset completes.
Second, the devarg was inconsistent: it only affected promiscuous and
all-multicast, while MAC addresses, the multicast address list, VLAN
configuration and RSS were restored regardless of its value. The "reconfig"
name was also ambiguous, potentially suggesting it governed all settings
when it did not.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
doc/guides/nics/intel_vf.rst | 5 -----
doc/guides/rel_notes/deprecation.rst | 7 -------
doc/guides/rel_notes/release_26_11.rst | 5 +++++
drivers/net/intel/iavf/iavf.h | 1 -
drivers/net/intel/iavf/iavf_ethdev.c | 28 ++++++--------------------
5 files changed, 11 insertions(+), 35 deletions(-)
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index 8f8ce32cac..d287a78672 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -106,11 +106,6 @@ IAVF PMD parameters
To disable this functionality,
set the ``auto_reset`` devarg to zero: ``-a 18:01.0,auto_reset=0``
-``auto_reconfig``
- Restore settings (unicast and multicast promiscuous states) on the VF after a reset event.
- Enabled by default.
- To disable it: ``-a 18:01.0,auto_reconfig=0``
-
``no-poll-on-link-down``
Stop polling Rx/Tx hardware queue when link is down.
This is enabled by default because it is required when ``auto_reset`` is enabled
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 6ad7698c6b..691d3dd071 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -170,10 +170,3 @@ Deprecation Notices
* net/iavf: The dynamic mbuf field used to detect LLDP packets on the
transmit path in the iavf PMD will be removed in a future release.
After removal, only packet type-based detection will be supported.
-
-* net/iavf: The ``auto_reconfig`` devarg is deprecated
- and will be removed in a future release.
- It allows disabling the automatic restoration of device settings
- after a VF reset, but this is of questionable value
- since most applications expect their settings to be preserved
- transparently across a reset.
diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index c8cc86295d..8292279c27 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -77,6 +77,11 @@ Removed Items
``rte_rib6_is_equal``
* table: ``RTE_LPM_IPV6_ADDR_SIZE``
+* net/iavf: Removed the ``auto_reconfig`` devarg.
+
+ The restoration of the promiscuous and all-multicast settings after a VF reset is
+ now unconditional.
+
API Changes
-----------
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 293adaf6c9..143ab3c1c0 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -323,7 +323,6 @@ struct iavf_devargs {
uint16_t quanta_size;
uint32_t watchdog_period;
int auto_reset;
- int auto_reconfig;
int no_poll_on_link_down;
uint64_t mbuf_check;
int enable_ptype_lldp;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index d601ec3b6a..829573983a 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -42,7 +42,6 @@
#define IAVF_QUANTA_SIZE_ARG "quanta_size"
#define IAVF_RESET_WATCHDOG_ARG "watchdog_period"
#define IAVF_ENABLE_AUTO_RESET_ARG "auto_reset"
-#define IAVF_ENABLE_AUTO_RECONFIG_ARG "auto_reconfig"
#define IAVF_NO_POLL_ON_LINK_DOWN_ARG "no-poll-on-link-down"
#define IAVF_MBUF_CHECK_ARG "mbuf_check"
#define IAVF_ENABLE_PTYPE_LLDP_ARG "enable_ptype_lldp"
@@ -55,7 +54,6 @@ static const char * const iavf_valid_args[] = {
IAVF_QUANTA_SIZE_ARG,
IAVF_RESET_WATCHDOG_ARG,
IAVF_ENABLE_AUTO_RESET_ARG,
- IAVF_ENABLE_AUTO_RECONFIG_ARG,
IAVF_NO_POLL_ON_LINK_DOWN_ARG,
IAVF_MBUF_CHECK_ARG,
IAVF_ENABLE_PTYPE_LLDP_ARG,
@@ -2468,7 +2466,6 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
ad->devargs.auto_reset = 1;
ad->devargs.no_poll_on_link_down = 1;
- ad->devargs.auto_reconfig = 1;
if (!devargs)
return 0;
@@ -2531,11 +2528,6 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
ad->devargs.no_poll_on_link_down = 1;
}
- ret = rte_kvargs_process(kvlist, IAVF_ENABLE_AUTO_RECONFIG_ARG,
- &parse_bool, &ad->devargs.auto_reconfig);
- if (ret)
- goto bail;
-
ret = rte_kvargs_process(kvlist, IAVF_ENABLE_PTYPE_LLDP_ARG,
&parse_bool, &ad->devargs.enable_ptype_lldp);
if (ret)
@@ -3358,7 +3350,7 @@ iavf_is_reset_detected(struct iavf_adapter *adapter)
static int
iavf_post_reset_reconfig(struct rte_eth_dev *dev)
{
- int ret, status = 0;
+ int ret = 0;
bool allmulti = false, allunicast = false;
struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
@@ -3377,10 +3369,9 @@ iavf_post_reset_reconfig(struct rte_eth_dev *dev)
PMD_DRV_LOG(DEBUG, "Restored unicast promiscuous mode (%s) "
"and multicast promiscuous mode (%s)",
allunicast ? "on" : "off", allmulti ? "on" : "off");
- status |= ret;
}
- return status;
+ return ret;
}
/*
@@ -3435,17 +3426,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
}
/* Restore settings after the reset */
- if (adapter->devargs.auto_reconfig) {
- ret = iavf_post_reset_reconfig(dev);
- if (ret) {
- PMD_DRV_LOG(ERR, "Failed to restore VF settings after reset");
- goto error;
- }
- } else {
- dev->data->promiscuous = 0;
- dev->data->all_multicast = 0;
- vf->promisc_unicast_enabled = false;
- vf->promisc_multicast_enabled = false;
+ ret = iavf_post_reset_reconfig(dev);
+ if (ret) {
+ PMD_DRV_LOG(ERR, "Failed to restore VF settings after reset");
+ goto error;
}
goto exit;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] net/iavf: restore promiscuous mode only after VF reset
2026-08-05 12:57 ` [PATCH v2 " Ciara Loftus
2026-08-05 12:57 ` [PATCH v2 1/2] net/iavf: remove auto reconfig devarg Ciara Loftus
@ 2026-08-05 12:57 ` Ciara Loftus
1 sibling, 0 replies; 7+ messages in thread
From: Ciara Loftus @ 2026-08-05 12:57 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The promiscuous and all-multicast settings persist in hardware across
a port stop/start and are only cleared by a VF reset. Despite this,
the ethdev start path re-applied them on every `dev_start` through the
config restore logic. Together with the driver's own restore after a
reset, a reset followed by a start reprogrammed them twice and issued
redundant requests to the PF.
Implement the `get_restore_flags` callback to clear
`RTE_ETH_RESTORE_PROMISC` and `RTE_ETH_RESTORE_ALLMULTI` so ethdev
skips them on start; the driver restores them only after a VF reset.
A queue reconfiguration in `iavf_dev_configure` also triggers a reset,
so the states are re-applied there too, except during reset recovery
where the reset handler already restores them once.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 34 ++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 829573983a..183d986831 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -163,6 +163,9 @@ static int iavf_set_mc_addr_list(struct rte_eth_dev *dev,
struct rte_ether_addr *mc_addrs,
uint32_t mc_addrs_num);
static int iavf_tm_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg);
+static uint64_t iavf_get_restore_flags(struct rte_eth_dev *dev,
+ enum rte_eth_dev_operation op);
+static int iavf_post_reset_reconfig(struct rte_eth_dev *dev);
static const struct rte_pci_id pci_id_iavf_map[] = {
{ RTE_PCI_DEVICE(IAVF_INTEL_VENDOR_ID, IAVF_DEV_ID_ADAPTIVE_VF) },
@@ -262,6 +265,7 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
.tx_done_cleanup = iavf_dev_tx_done_cleanup,
.get_monitor_addr = iavf_get_monitor_addr,
.tm_ops_get = iavf_tm_ops_get,
+ .get_restore_flags = iavf_get_restore_flags,
};
static int
@@ -282,6 +286,19 @@ iavf_tm_ops_get(struct rte_eth_dev *dev,
return 0;
}
+static uint64_t
+iavf_get_restore_flags(__rte_unused struct rte_eth_dev *dev,
+ __rte_unused enum rte_eth_dev_operation op)
+{
+ /*
+ * The unicast and multicast promiscuous settings persist across a
+ * stop/start; they are only cleared by a VF reset, which the driver
+ * restores itself. So ethdev does not need to restore them on start.
+ */
+ return RTE_ETH_RESTORE_ALL & ~(RTE_ETH_RESTORE_PROMISC |
+ RTE_ETH_RESTORE_ALLMULTI);
+}
+
__rte_unused
static int
iavf_vfr_inprogress(struct iavf_hw *hw)
@@ -673,6 +690,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
uint16_t num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,
dev->data->nb_tx_queues);
+ bool reset_done = false;
int ret;
if (ad->closed)
@@ -702,6 +720,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
ret = iavf_queues_req_reset(dev, num_queue_pairs);
if (ret)
return ret;
+ reset_done = true;
ret = iavf_get_max_rss_queue_region(ad);
if (ret) {
@@ -720,6 +739,7 @@ iavf_dev_configure(struct rte_eth_dev *dev)
ret = iavf_queues_req_reset(dev, num_queue_pairs);
if (ret)
return ret;
+ reset_done = true;
vf->lv_enabled = false;
}
@@ -735,6 +755,20 @@ iavf_dev_configure(struct rte_eth_dev *dev)
return -1;
}
}
+
+ /*
+ * A queue reconfiguration above triggers a VF reset, which clears the
+ * promiscuous and all-multicast settings in hardware. Re-apply the
+ * pre-reset states here, unless this configure is itself part of reset
+ * recovery, in which case the reset handler restores them once at the
+ * end (avoiding a double restore).
+ */
+ if (reset_done && !vf->in_reset_recovery) {
+ ret = iavf_post_reset_reconfig(dev);
+ if (ret)
+ return ret;
+ }
+
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-08-05 12:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 13:08 [RFC 0/2] iavf post-reset state restoration updates Ciara Loftus
2026-07-21 13:08 ` [RFC 1/2] net/iavf: remove auto reconfig devarg Ciara Loftus
2026-07-21 13:08 ` [RFC 2/2] net/iavf: restore promiscuous mode only after VF reset Ciara Loftus
2026-07-22 10:10 ` [RFC 0/2] iavf post-reset state restoration updates David Marchand
2026-08-05 12:57 ` [PATCH v2 " Ciara Loftus
2026-08-05 12:57 ` [PATCH v2 1/2] net/iavf: remove auto reconfig devarg Ciara Loftus
2026-08-05 12:57 ` [PATCH v2 2/2] net/iavf: restore promiscuous mode only after VF reset Ciara Loftus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox