From 883ebad9ba70010d4ea1973817b1840d461feab6 Mon Sep 17 00:00:00 2001 From: Max Grass Date: Mon, 14 Sep 2026 19:01:38 +0200 Subject: [PATCH] qualcommax: qca_ppe: trap slow-protocol frames to the CPU ppe_ctrlpkt_init() redirects only the STP address 01:80:c2:00:00:00 (RFDB entry 31, APP_CTRL[0]) to the CPU port. The slow-protocols address 01:80:c2:00:00:02 has no entry, so LACPDUs sent by a switch never reach a Linux bond on the LAN ports: the bond keeps "Partner Mac Address: 00:00:00:00:00:00" and every 802.3ad group stays unformed, while the switch side reports the board's own LACPDUs. Add RFDB entry 30 for 01:80:c2:00:00:02 and let APP_CTRL[0] match entries 30 and 31 (bits 32 and 33 of the RFDB index bitmap; the field layout follows the SSDK hppe_ctrlpkt_reg.h / hppe_fdb_reg.h). Tested on a Xiaomi AX3600 against a switch running LACP: lan1+lan2 in an 802.3ad bond converge (both slaves in one aggregator, partner MAC set, port state 0x3f on both ends) and carry ~1.3 Gbit/s per direction over the two 1 GbE links with 8 parallel flows. Before the change the same setup never negotiated. Signed-off-by: Max Grass Link: https://github.com/openwrt/openwrt/pull/25184 Signed-off-by: Robert Marko --- .../drivers/net/ethernet/qualcomm/qca_ppe_main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_ppe_main.c b/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_ppe_main.c index 54b2254878d..b1182a946d4 100644 --- a/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_ppe_main.c +++ b/target/linux/qualcommax/files/drivers/net/ethernet/qualcomm/qca_ppe_main.c @@ -1789,9 +1789,18 @@ static void ppe_ctrlpkt_init(struct qca_ppe_priv *priv) regmap_write(priv->regmap, PPE_RFDB_TBL(31), 0xc2000000); regmap_write(priv->regmap, PPE_RFDB_TBL(31) + 4, 0x00010180); - /* APP_CTRL[0]: match RFDB profile 31, bypass STP, redirect to CPU */ + /* RFDB_TBL[30]: Slow Protocols MAC 01:80:c2:00:00:02 (LACP, marker). + * Without this entry the PPE keeps LACPDUs away from the CPU port and a + * bond over these ports never sees its partner. + */ + regmap_write(priv->regmap, PPE_RFDB_TBL(30), 0xc2000002); + regmap_write(priv->regmap, PPE_RFDB_TBL(30) + 4, 0x00010180); + + /* APP_CTRL[0]: match RFDB profiles 30 and 31 (bits 32 and 33 of the + * RFDB index bitmap), bypass STP, redirect to CPU + */ regmap_write(priv->regmap, PPE_APP_CTRL(0), 0x00000003); - regmap_write(priv->regmap, PPE_APP_CTRL(0) + 4, 0x00000002); + regmap_write(priv->regmap, PPE_APP_CTRL(0) + 4, 0x00000003); regmap_write(priv->regmap, PPE_APP_CTRL(0) + 8, PPE_APP_CTRL_PORT_BITMAP_EN | FIELD_PREP(PPE_APP_CTRL_PORT_BITMAP, ports) |