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

Sokolov Evgeny <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
Kindly reminder
Sorry, But nobody has reviewed my patch
Could you please review this?

-----Original Message-----
From: Sokolov Evgeny <[email protected]> 
Sent: Monday, June 29, 2026 4:59 PM
To: Thomas Monjalon <[email protected]>; Chas Williams <[email protected]>; Min Hu (Connor) <[email protected]>; Declan Doherty <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Sokolov Evgeny <[email protected]>
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: [email protected]

Signed-off-by: Evgeny Sokolov <[email protected]>
Cc: [email protected]
---
 .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 <[email protected]>  Evgeny Efimov <[email protected]>  Evgeny Im <[email protected]>  Evgeny Schemeilin <[email protected]>
+Evgeny Sokolov <[email protected]>
 Fabio Pricoco <[email protected]>  Fady Bader <[email protected]>  Faicker Mo <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.