netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bonding: 802.3ad: Avoid packet loss when switching aggregator
@ 2024-04-04 11:49 Thomas Bogendoerfer
  2024-04-06 16:03 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas Bogendoerfer @ 2024-04-04 11:49 UTC (permalink / raw)
  To: Jay Vosburgh, Andy Gospodarek, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

If selection logic decides to switch to a new aggregator it disables
all ports of the old aggregator, but doesn't enable ports on
the new aggregator. These ports will eventually be enabled when
the next LACPDU is received, which might take some time and without an
active port transmitted frames are dropped. Avoid this by enabling
already collected ports of the new aggregator immediately.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/net/bonding/bond_3ad.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index c6807e473ab7..529e2a7c51e2 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1876,6 +1876,13 @@ static void ad_agg_selection_logic(struct aggregator *agg,
 				__disable_port(port);
 			}
 		}
+
+		/* enable ports on new active aggregator */
+		for (port = best->lag_ports; port;
+			port = port->next_port_in_aggregator) {
+			__enable_port(port);
+		}
+
 		/* Slave array needs update. */
 		*update_slave_arr = true;
 	}
-- 
2.35.3


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

end of thread, other threads:[~2024-04-15 16:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 11:49 [PATCH net] bonding: 802.3ad: Avoid packet loss when switching aggregator Thomas Bogendoerfer
2024-04-06 16:03 ` Simon Horman
2024-04-09 14:34   ` Thomas Bogendoerfer
2024-04-08 16:06 ` Jay Vosburgh
2024-04-10 15:50   ` Thomas Bogendoerfer
2024-04-11  0:28     ` Jay Vosburgh
2024-04-15 16:57       ` Thomas Bogendoerfer
2024-04-11  2:44 ` Hangbin Liu

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).