Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] bonding: 3ad: Receive packets in COLLECTING state
@ 2026-11-11 17:19 Ido Schimmel
  2026-11-11 17:19 ` [PATCH net-next 2/2] selftests: bonding: Add a test for 802.3ad with coupled control disabled Ido Schimmel
  2026-11-12 20:21 ` [PATCH net-next 1/2] bonding: 3ad: Receive packets in COLLECTING state netdev-bot+sashiko
  0 siblings, 2 replies; 4+ messages in thread
From: Ido Schimmel @ 2026-11-11 17:19 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, pabeni, edumazet, jv, andrew+netdev, razor, aahila,
	Ido Schimmel

When coupled control is disabled, a port in COLLECTING state is supposed
to receive packets, but it does not. The bond only delivers packets from
slaves whose 'inactive' flag is cleared, whereas
bond_set_slave_rx_enabled_flags() only clears 'rx_disabled'.

Fix by clearing 'inactive' as well.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---

Notes:
    Targeting at net-next since this never worked.
    
    Known issues that this patch does not address:
    
    1. Changing 'all_slaves_active' from 1 to 0 while a port is in
       COLLECTING state sets its 'inactive' flag and the port stops
       receiving until the next mux state transition. This is not new,
       COLLECTING is a transient state and the option is off by default, so I
       do not think it is worth handling.
    
    2. The 'inactive' flag shares a bitfield with other slave flags. The
       802.3ad state machine writes them under the mode lock, while the
       'all_slaves_active' handler writes 'inactive' under RTNL only. This is
       not new.

 include/net/bonding.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/net/bonding.h b/include/net/bonding.h
index 598d56b1bc97..cb89aff437f4 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -594,6 +594,7 @@ static inline void bond_set_slave_active_flags(struct slave *slave,
 static inline void bond_set_slave_rx_enabled_flags(struct slave *slave,
 					       bool notify)
 {
+	slave->inactive = 0;
 	slave->rx_disabled = 0;
 }
 
-- 
2.56.0


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

end of thread, other threads:[~2026-11-12 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 17:19 [PATCH net-next 1/2] bonding: 3ad: Receive packets in COLLECTING state Ido Schimmel
2026-11-11 17:19 ` [PATCH net-next 2/2] selftests: bonding: Add a test for 802.3ad with coupled control disabled Ido Schimmel
2026-11-12 20:21   ` netdev-bot+sashiko
2026-11-12 20:21 ` [PATCH net-next 1/2] bonding: 3ad: Receive packets in COLLECTING state netdev-bot+sashiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox