patch 'net/bonding: fix failover time of LACP with mode 4' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Fri Jul 12 12:43:55 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=19010ae677a1e5fb0927c790fdd8730852b15fed
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 19010ae677a1e5fb0927c790fdd8730852b15fed Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang at huawei.com>
Date: Mon, 6 Jun 2022 22:34:45 +0800
Subject: [PATCH] net/bonding: fix failover time of LACP with mode 4
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f ]
When the primary port of bond member with bond mode 4 linked down,
the system id of the other member ports changed.
It may cause some switches to renegotiate, and the process takes a few
seconds. It is not acceptable for any Telcos.
We need sub-second switch-over time like in Linux.
Set the MAC of the bond port to the member port's system to solve the
problem.
Bugzilla ID: 551
Fixes: 46fb43683679 ("bond: add mode 4")
Signed-off-by: Gaoxiang Liu <liugaoxiang at huawei.com>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 79f1b3f1a0..06c21ebe6d 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -865,7 +865,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
struct bond_dev_private *internals = bond_dev->data->dev_private;
struct port *port;
struct rte_eth_link link_info;
- struct rte_ether_addr member_addr;
struct rte_mbuf *lacp_pkt = NULL;
uint16_t member_id;
uint16_t i;
@@ -892,7 +891,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
key = 0;
}
- rte_eth_macaddr_get(member_id, &member_addr);
port = &bond_mode_8023ad_ports[member_id];
key = rte_cpu_to_be_16(key);
@@ -904,8 +902,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
SM_FLAG_SET(port, NTT);
}
- if (!rte_is_same_ether_addr(&port->actor.system, &member_addr)) {
- rte_ether_addr_copy(&member_addr, &port->actor.system);
+ if (!rte_is_same_ether_addr(&internals->mode4.mac_addr, &port->actor.system)) {
+ rte_ether_addr_copy(&internals->mode4.mac_addr, &port->actor.system);
if (port->aggregator_port_id == member_id)
SM_FLAG_SET(port, NTT);
}
@@ -1173,21 +1171,20 @@ void
bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
{
struct bond_dev_private *internals = bond_dev->data->dev_private;
- struct rte_ether_addr member_addr;
struct port *member, *agg_member;
uint16_t member_id, i, j;
bond_mode_8023ad_stop(bond_dev);
+ rte_eth_macaddr_get(internals->port_id, &internals->mode4.mac_addr);
for (i = 0; i < internals->active_member_count; i++) {
member_id = internals->active_members[i];
member = &bond_mode_8023ad_ports[member_id];
- rte_eth_macaddr_get(member_id, &member_addr);
- if (rte_is_same_ether_addr(&member_addr, &member->actor.system))
+ if (rte_is_same_ether_addr(&internals->mode4.mac_addr, &member->actor.system))
continue;
- rte_ether_addr_copy(&member_addr, &member->actor.system);
+ rte_ether_addr_copy(&internals->mode4.mac_addr, &member->actor.system);
/* 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
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-12 18:40:14.755298349 +0800
+++ 0009-net-bonding-fix-failover-time-of-LACP-with-mode-4.patch 2024-07-12 18:40:13.916594250 +0800
@@ -1 +1 @@
-From a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f Mon Sep 17 00:00:00 2001
+From 19010ae677a1e5fb0927c790fdd8730852b15fed Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list