Skip to content

Commit c86fac5

Browse files
LorenzoBianconiPaolo Abeni
authored andcommitted
net: airoha: Fix smac_id configuration in bridge mode
Set PPE entry smac_id field to 0xf in airoha_ppe_foe_commit_subflow_entry routine for IPv6 traffic in order to instruct the hw to keep original source mac address for IPv6 hw accelerated traffic in bridge mode. Fixes: cd53f62 ("net: airoha: Add L2 hw acceleration support") Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 504a577 commit c86fac5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/airoha/airoha_ppe.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,11 @@ airoha_ppe_foe_commit_subflow_entry(struct airoha_ppe *ppe,
660660
if (type >= PPE_PKT_TYPE_IPV6_ROUTE_3T) {
661661
memcpy(&hwe.ipv6.l2, &e->data.bridge.l2, sizeof(hwe.ipv6.l2));
662662
hwe.ipv6.ib2 = e->data.bridge.ib2;
663+
/* setting smac_id to 0xf instruct the hw to keep original
664+
* source mac address
665+
*/
666+
hwe.ipv6.l2.src_mac_hi = FIELD_PREP(AIROHA_FOE_MAC_SMAC_ID,
667+
0xf);
663668
} else {
664669
memcpy(&hwe.bridge.l2, &e->data.bridge.l2,
665670
sizeof(hwe.bridge.l2));

0 commit comments

Comments
 (0)