DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/bonding: fix MAC address propagation in 802.3ad mode
@ 2025-11-05 18:01 Shani Peretz
  2025-11-05 19:03 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Shani Peretz @ 2025-11-05 18:01 UTC (permalink / raw)
  To: dev
  Cc: Shani Peretz, stable, Chas Williams, Min Hu (Connor),
	Pawel Wodkowski, Declan Doherty

When changing the MAC address of a bonding device in 802.3ad mode,
the new MAC was not propagated to the physical member NIC.
This caused the physical NIC to drop all data packets sent to the
new MAC address, resulting in connectivity loss.

It happens because the MAC update function only updated the
LACP layer (actor.system) but not the physical NIC hardware MAC
addresses.

This fix adds a call to rte_eth_dev_default_mac_addr_set() to update
the hardware MAC on each member port.

Bugzilla ID: 1158
Fixes: 46fb43683679 ("bond: add mode 4")
Cc: stable@dpdk.org

Signed-off-by: Shani Peretz <shperetz@nvidia.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 1677615435..a3579f7bc2 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1186,6 +1186,15 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
 			continue;
 
 		rte_ether_addr_copy(&internals->mode4.mac_addr, &member->actor.system);
+
+		/* Update physical NIC hardware MAC address to match bonding device. */
+		if (rte_eth_dev_default_mac_addr_set(member_id,
+				&internals->mode4.mac_addr) != 0) {
+			RTE_BOND_LOG(ERR,
+				"Failed to update MAC address on member port %u",
+				member_id);
+		}
+
 		/* Do nothing if this port is not an aggregator. In other case
 		 * Set NTT flag on every port that use this aggregator. */
 		if (member->aggregator_port_id != member_id)
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/bonding: fix MAC address propagation in 802.3ad mode
  2025-11-05 18:01 [PATCH] net/bonding: fix MAC address propagation in 802.3ad mode Shani Peretz
@ 2025-11-05 19:03 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2025-11-05 19:03 UTC (permalink / raw)
  To: Shani Peretz
  Cc: dev, stable, Chas Williams, Min Hu (Connor),
	Pawel Wodkowski, Declan Doherty

On Wed, 5 Nov 2025 20:01:35 +0200
Shani Peretz <shperetz@nvidia.com> wrote:

> When changing the MAC address of a bonding device in 802.3ad mode,
> the new MAC was not propagated to the physical member NIC.
> This caused the physical NIC to drop all data packets sent to the
> new MAC address, resulting in connectivity loss.
> 
> It happens because the MAC update function only updated the
> LACP layer (actor.system) but not the physical NIC hardware MAC
> addresses.
> 
> This fix adds a call to rte_eth_dev_default_mac_addr_set() to update
> the hardware MAC on each member port.
> 
> Bugzilla ID: 1158
> Fixes: 46fb43683679 ("bond: add mode 4")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shani Peretz <shperetz@nvidia.com>
> ---

Queued to next-net.
Modified patch to put check on oneline since max line length in DPDK is 100.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-05 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-05 18:01 [PATCH] net/bonding: fix MAC address propagation in 802.3ad mode Shani Peretz
2025-11-05 19:03 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).