[PATCH net-next] mlxsw: Disable LAG collector when requested

From
Ido Schimmel <idosch@nvidia.com>
Date
2026-11-11 17:10:01
mlxsw_reg_slcor_col_disable_pack() packs the "collector enabled" value
instead of "collector disabled". As a result, once a LAG port is enabled
for collection, it keeps receiving packets even after the LAG master
disables it (e.g., when the port loses link or the LACP partner falls
out of sync).

Fix by packing the correct value. Packets received on a disabled LAG
port are now dropped, as they are in the bond's software datapath.

Note that this does not fix a regression (always broken). Noticed this
while working on independent control support. See commit 240fd405528b
("bonding: Add independent control state machine").

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index 01fcbd1c8d01..9dbeabf5536d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -1491,7 +1491,7 @@ static inline void mlxsw_reg_slcor_col_disable_pack(char *payload,
 						    u16 local_port, u16 lag_id)
 {
 	mlxsw_reg_slcor_pack(payload, local_port, lag_id,
-			     MLXSW_REG_SLCOR_COL_LAG_COLLECTOR_ENABLED);
+			     MLXSW_REG_SLCOR_COL_LAG_COLLECTOR_DISABLED);
 }
 
 /* SPMLR - Switch Port MAC Learning Register
-- 
2.56.0
Thread (3 messages) 3 messages, 3 authors, last reply 1d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help