patch 'net/iavf: fix deletion of primary MAC address' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Mar 19 23:02:02 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/21/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/28f73410bc015ccab2189278b4bcb348c4238571
Thanks.
Luca Boccassi
---
>From 28f73410bc015ccab2189278b4bcb348c4238571 Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Wed, 4 Mar 2026 11:16:06 +0000
Subject: [PATCH] net/iavf: fix deletion of primary MAC address
[ upstream commit d1e200594b98b6126e77bd910c0c452543b97f8b ]
Primary MAC address removal fails when trying to set the default MAC
address on a VF via rte_eth_dev_default_mac_addr_set() when the VF has
not yet been started. This happens because the old MAC is not
set as the primary address until iavf_dev_start() is invoked. Logs
indicate old primary MAC removal failure even though the actual API
rte_eth_dev_default_mac_addr_set() returns success.
This patch fixes the issue by introducing the flag "mac_primary_set" in
the iavf_adapter & is set to 'false' upon VF initialization. It is set
to 'true' when any MAC address gets assigned as
VIRTCHNL_ETHER_ADDR_PRIMARY MAC on the VF. This flags gets enabled only
once for a VF.
Bugzilla ID: 1897
Fixes: b335e7203475 ("net/iavf: fix lack of MAC type when set MAC address")
Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
Tested-by: Aliaksei Belovus <albe19021990 at gmail.com>
---
.mailmap | 2 ++
drivers/net/iavf/iavf.h | 1 +
drivers/net/iavf/iavf_ethdev.c | 19 ++++++++++++++-----
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/.mailmap b/.mailmap
index bb1ca48db2..c9c893660e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -72,6 +72,8 @@ Alex Wang <alex at awakenetworks.com>
Alex Zelezniak <alexz at att.com>
Alfredo Cardigliano <cardigliano at ntop.org>
Ali Alnubani <alialnu at nvidia.com> <alialnu at mellanox.com>
+Ali Volkan Atli <volkan.atli at argela.com.tr>
+Aliaksei Belovus <albe19021990 at gmail.com>
Alice Michael <alice.michael at intel.com>
Alin Rauta <alin.rauta at intel.com>
Ali Volkan Atli <volkan.atli at argela.com.tr>
diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index ad526c644c..bdebf7745a 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -383,6 +383,7 @@ struct iavf_adapter {
enum iavf_tx_burst_type tx_burst_type;
uint16_t fdir_ref_cnt;
struct iavf_devargs devargs;
+ bool mac_primary_set;
};
/* IAVF_DEV_PRIVATE_TO */
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 1f3ef074f7..18551f3120 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1069,6 +1069,9 @@ iavf_dev_start(struct rte_eth_dev *dev)
/* Set all mac addrs */
iavf_add_del_all_mac_addr(adapter, true);
+ if (!adapter->mac_primary_set)
+ adapter->mac_primary_set = true;
+
/* Set all multicast addresses */
iavf_add_del_mc_addr_list(adapter, vf->mc_addrs, vf->mc_addrs_num,
true);
@@ -1741,11 +1744,13 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
if (rte_is_same_ether_addr(old_addr, mac_addr))
return 0;
- ret = iavf_add_del_eth_addr(adapter, old_addr, false, VIRTCHNL_ETHER_ADDR_PRIMARY);
- if (ret)
- PMD_DRV_LOG(ERR, "Fail to delete old MAC:"
- RTE_ETHER_ADDR_PRT_FMT,
- RTE_ETHER_ADDR_BYTES(old_addr));
+ if (adapter->mac_primary_set) { /* delete old PRIMARY MAC only if set */
+ ret = iavf_add_del_eth_addr(adapter, old_addr, false, VIRTCHNL_ETHER_ADDR_PRIMARY);
+ if (ret)
+ PMD_DRV_LOG(ERR, "Fail to delete old MAC:"
+ RTE_ETHER_ADDR_PRT_FMT,
+ RTE_ETHER_ADDR_BYTES(old_addr));
+ }
ret = iavf_add_del_eth_addr(adapter, mac_addr, true, VIRTCHNL_ETHER_ADDR_PRIMARY);
if (ret)
@@ -1756,6 +1761,9 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
if (ret)
return -EIO;
+ if (!adapter->mac_primary_set)
+ adapter->mac_primary_set = true;
+
rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
return 0;
}
@@ -2817,6 +2825,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
hw->back = IAVF_DEV_PRIVATE_TO_ADAPTER(eth_dev->data->dev_private);
adapter->dev_data = eth_dev->data;
adapter->stopped = 1;
+ adapter->mac_primary_set = false;
if (iavf_dev_event_handler_init())
goto init_vf_err;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 22:00:48.185098265 +0000
+++ 0010-net-iavf-fix-deletion-of-primary-MAC-address.patch 2026-03-19 22:00:47.770359371 +0000
@@ -1 +1 @@
-From d1e200594b98b6126e77bd910c0c452543b97f8b Mon Sep 17 00:00:00 2001
+From 28f73410bc015ccab2189278b4bcb348c4238571 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d1e200594b98b6126e77bd910c0c452543b97f8b ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -26,4 +27,4 @@
- .mailmap | 1 +
- drivers/net/intel/iavf/iavf.h | 1 +
- drivers/net/intel/iavf/iavf_ethdev.c | 19 ++++++++++++++-----
- 3 files changed, 16 insertions(+), 5 deletions(-)
+ .mailmap | 2 ++
+ drivers/net/iavf/iavf.h | 1 +
+ drivers/net/iavf/iavf_ethdev.c | 19 ++++++++++++++-----
+ 3 files changed, 17 insertions(+), 5 deletions(-)
@@ -32 +33 @@
-index 388801a5d3..b026947779 100644
+index bb1ca48db2..c9c893660e 100644
@@ -35 +36,2 @@
-@@ -73,6 +73,7 @@ Alexey Kardashevskiy <aik at ozlabs.ru>
+@@ -72,6 +72,8 @@ Alex Wang <alex at awakenetworks.com>
+ Alex Zelezniak <alexz at att.com>
@@ -38 +40 @@
- Ali Volkan Atli <volkan.atli at argela.com.tr>
++Ali Volkan Atli <volkan.atli at argela.com.tr>
@@ -42,7 +44,7 @@
- Allain Legacy <allain.legacy at windriver.com>
-diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
-index f9bb398a77..403c61e2e8 100644
---- a/drivers/net/intel/iavf/iavf.h
-+++ b/drivers/net/intel/iavf/iavf.h
-@@ -384,6 +384,7 @@ struct iavf_adapter {
- enum iavf_tx_func_type tx_func_type;
+ Ali Volkan Atli <volkan.atli at argela.com.tr>
+diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
+index ad526c644c..bdebf7745a 100644
+--- a/drivers/net/iavf/iavf.h
++++ b/drivers/net/iavf/iavf.h
+@@ -383,6 +383,7 @@ struct iavf_adapter {
+ enum iavf_tx_burst_type tx_burst_type;
@@ -55,5 +57,5 @@
-diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
-index 26e7febecf..1eca20bc9a 100644
---- a/drivers/net/intel/iavf/iavf_ethdev.c
-+++ b/drivers/net/intel/iavf/iavf_ethdev.c
-@@ -1042,6 +1042,9 @@ iavf_dev_start(struct rte_eth_dev *dev)
+diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
+index 1f3ef074f7..18551f3120 100644
+--- a/drivers/net/iavf/iavf_ethdev.c
++++ b/drivers/net/iavf/iavf_ethdev.c
+@@ -1069,6 +1069,9 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -69 +71 @@
-@@ -1718,11 +1721,13 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1741,11 +1744,13 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -88 +90 @@
-@@ -1733,6 +1738,9 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1756,6 +1761,9 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -98 +100 @@
-@@ -2799,6 +2807,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2817,6 +2825,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
More information about the stable
mailing list