patch 'net/iavf: fix deletion of primary MAC address' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 19 11:02:14 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

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/23/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/414a8959619bd6104a37fe9682dc83f7351b75d0

Thanks.

Kevin

---
>From 414a8959619bd6104a37fe9682dc83f7351b75d0 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                             |  1 +
 drivers/net/intel/iavf/iavf.h        |  1 +
 drivers/net/intel/iavf/iavf_ethdev.c | 19 ++++++++++++++-----
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/.mailmap b/.mailmap
index 91c01cb0d9..4ac0deebf8 100644
--- a/.mailmap
+++ b/.mailmap
@@ -74,4 +74,5 @@ 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>
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index d78582e05c..3cb2fd0602 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -386,4 +386,5 @@ struct iavf_adapter {
 	uint16_t fdir_ref_cnt;
 	struct iavf_devargs devargs;
+	bool mac_primary_set;
 };
 
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index ab9398dc80..e387fae73b 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -1071,4 +1071,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
 	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,
@@ -1747,9 +1750,11 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
 		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);
@@ -1762,4 +1767,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
 		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;
@@ -2824,4 +2832,5 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 	adapter->dev_data = eth_dev->data;
 	adapter->stopped = 1;
+	adapter->mac_primary_set = false;
 
 	if (iavf_dev_event_handler_init())
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 10:01:07.595111165 +0000
+++ 0016-net-iavf-fix-deletion-of-primary-MAC-address.patch	2026-03-19 10:01:07.069331263 +0000
@@ -1 +1 @@
-From d1e200594b98b6126e77bd910c0c452543b97f8b Mon Sep 17 00:00:00 2001
+From 414a8959619bd6104a37fe9682dc83f7351b75d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d1e200594b98b6126e77bd910c0c452543b97f8b ]
+
@@ -21 +22,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
-index 388801a5d3..b026947779 100644
+index 91c01cb0d9..4ac0deebf8 100644
@@ -42 +43 @@
-index f9bb398a77..403c61e2e8 100644
+index d78582e05c..3cb2fd0602 100644
@@ -45 +46 @@
-@@ -385,4 +385,5 @@ struct iavf_adapter {
+@@ -386,4 +386,5 @@ struct iavf_adapter {
@@ -52 +53 @@
-index 26e7febecf..1eca20bc9a 100644
+index ab9398dc80..e387fae73b 100644
@@ -55 +56 @@
-@@ -1043,4 +1043,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1071,4 +1071,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -63 +64 @@
-@@ -1719,9 +1722,11 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1747,9 +1750,11 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -80 +81 @@
-@@ -1734,4 +1739,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1762,4 +1767,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -88 +89 @@
-@@ -2800,4 +2808,5 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2824,4 +2832,5 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)



More information about the stable mailing list