Skip to content

Commit f98084d

Browse files
LorenzoBianconigregkh
authored andcommitted
net: airoha: Add missing PPE configurations in airoha_ppe_hw_init()
[ Upstream commit b9d8b85 ] Add the following PPE configuration in airoha_ppe_hw_init routine: - 6RD hw offloading is currently not supported by Netfilter flowtable. Disable explicitly PPE 6RD offloading in order to prevent PPE to learn 6RD flows and eventually interrupt the traffic. - Add missing PPE bind rate configuration for L3 and L2 traffic. PPE bind rate configuration specifies the pps threshold to move a PPE entry state from UNBIND to BIND. Without this configuration this value is random. - Set ageing thresholds to the values used in the vendor SDK in order to improve connection stability under load and avoid packet loss caused by fast aging. Fixes: 00a7678 ("net: airoha: Introduce flowtable offload support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260412-airoha_ppe_hw_init-missing-bits-v1-1-06ac670819e3@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7bad93e commit f98084d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

drivers/net/ethernet/airoha/airoha_ppe.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ static void airoha_ppe_hw_init(struct airoha_ppe *ppe)
8383
airoha_fe_rmw(eth, REG_PPE_BND_AGE0(i),
8484
PPE_BIND_AGE0_DELTA_NON_L4 |
8585
PPE_BIND_AGE0_DELTA_UDP,
86-
FIELD_PREP(PPE_BIND_AGE0_DELTA_NON_L4, 1) |
87-
FIELD_PREP(PPE_BIND_AGE0_DELTA_UDP, 12));
86+
FIELD_PREP(PPE_BIND_AGE0_DELTA_NON_L4, 60) |
87+
FIELD_PREP(PPE_BIND_AGE0_DELTA_UDP, 60));
8888
airoha_fe_rmw(eth, REG_PPE_BND_AGE1(i),
8989
PPE_BIND_AGE1_DELTA_TCP_FIN |
9090
PPE_BIND_AGE1_DELTA_TCP,
9191
FIELD_PREP(PPE_BIND_AGE1_DELTA_TCP_FIN, 1) |
92-
FIELD_PREP(PPE_BIND_AGE1_DELTA_TCP, 7));
92+
FIELD_PREP(PPE_BIND_AGE1_DELTA_TCP, 60));
9393

9494
airoha_fe_rmw(eth, REG_PPE_TB_HASH_CFG(i),
9595
PPE_SRAM_TABLE_EN_MASK |
@@ -111,7 +111,15 @@ static void airoha_ppe_hw_init(struct airoha_ppe *ppe)
111111
FIELD_PREP(PPE_TB_CFG_SEARCH_MISS_MASK, 3) |
112112
FIELD_PREP(PPE_TB_ENTRY_SIZE_MASK, 0));
113113

114+
airoha_fe_rmw(eth, REG_PPE_BIND_RATE(i),
115+
PPE_BIND_RATE_L2B_BIND_MASK |
116+
PPE_BIND_RATE_BIND_MASK,
117+
FIELD_PREP(PPE_BIND_RATE_L2B_BIND_MASK, 0x1e) |
118+
FIELD_PREP(PPE_BIND_RATE_BIND_MASK, 0x1e));
119+
114120
airoha_fe_wr(eth, REG_PPE_HASH_SEED(i), PPE_HASH_SEED);
121+
airoha_fe_clear(eth, REG_PPE_PPE_FLOW_CFG(i),
122+
PPE_FLOW_CFG_IP6_6RD_MASK);
115123

116124
for (p = 0; p < ARRAY_SIZE(eth->ports); p++)
117125
airoha_fe_rmw(eth, REG_PPE_MTU(i, p),

0 commit comments

Comments
 (0)