[PATCH] net/bonding: fix the log MAC address restore failure

Sokolov Evgeny Evgeny.Sokolov at infotecs.ru
Tue Jul 21 12:37:26 CEST 2026


Kindly reminder
Sorry, But nobody has reviewed my patch
Could you please review this?

-----Original Message-----
From: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru> 
Sent: Monday, June 29, 2026 4:59 PM
To: Thomas Monjalon <thomas at monjalon.net>; Chas Williams <3chas3 at gmail.com>; Min Hu (Connor) <humin29 at huawei.com>; Declan Doherty <declan.doherty at intel.com>
Cc: dev at dpdk.org; stable at dpdk.org; chas3 at att.com; Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>
Subject: [PATCH] net/bonding: fix the log MAC address restore failure

Log an error when rte_eth_dev_default_mac_addr_set() fails while restoring the default MAC address of a member device removed from a bonding device.
This improves visibility of failures without changing the existing behavior.

Fixes: aa7791ba8de0 ("net/bonding: fix setting slave MAC addresses")
Cc: chas3 at att.com

Signed-off-by: Evgeny Sokolov <Evgeny.Sokolov at infotecs.ru>
Cc: stable at dpdk.org
---
 .mailmap                               | 1 +
 drivers/net/bonding/rte_eth_bond_api.c | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 8e1153ce58..ddbaaf744f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -461,6 +461,7 @@ Evan Swanson <evan.swanson at intel.com>  Evgeny Efimov <evgeny.efimov at intel.com>  Evgeny Im <evgeny.im at oktetlabs.com>  Evgeny Schemeilin <evgenys at amazon.com>
+Evgeny Sokolov <Evgeny.Sokolov at infotecs.ru>
 Fabio Pricoco <fabio.pricoco at intel.com>  Fady Bader <fady at mellanox.com>  Faicker Mo <faicker.mo at ucloud.cn> diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 9e5df67c18..da2b538b3c 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -706,8 +706,12 @@ __eth_bond_member_remove_lock_free(uint16_t bonding_port_id,
 			&rte_eth_devices[bonding_port_id].data->port_id);
 
 	/* Restore original MAC address of member device */
-	rte_eth_dev_default_mac_addr_set(member_port_id,
-			&internals->members[member_idx].persisted_mac_addr);
+	if (rte_eth_dev_default_mac_addr_set(member_port_id,
+			&internals->members[member_idx].persisted_mac_addr)) {
+		RTE_BOND_LOG(ERR,
+				"Failed to restore MAC address on member port %u",
+				member_port_id);
+	}
 
 	/* remove additional MAC addresses from the member */
 	member_remove_mac_addresses(bonding_eth_dev, member_port_id);
--
2.47.3



More information about the dev mailing list