From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Michal Kubiak <michal.kubiak@intel.com>,
Lorenzo Bianconi <lorenzo@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: [PATCH net v2 3/3] net: airoha: Fix smac_id configuration in bridge mode
Date: Mon, 02 Jun 2025 12:55:39 +0200 [thread overview]
Message-ID: <20250602-airoha-flowtable-ipv6-fix-v2-3-3287f8b55214@kernel.org> (raw)
In-Reply-To: <20250602-airoha-flowtable-ipv6-fix-v2-0-3287f8b55214@kernel.org>
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: cd53f622611f ("net: airoha: Add L2 hw acceleration support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/ethernet/airoha/airoha_ppe.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/airoha/airoha_ppe.c b/drivers/net/ethernet/airoha/airoha_ppe.c
index 557779093a79a4b42a1dc49b8ba0dacbdc219385..9067d2fc7706ecf489bee9fc9b6425de18acb634 100644
--- a/drivers/net/ethernet/airoha/airoha_ppe.c
+++ b/drivers/net/ethernet/airoha/airoha_ppe.c
@@ -660,6 +660,11 @@ airoha_ppe_foe_commit_subflow_entry(struct airoha_ppe *ppe,
if (type >= PPE_PKT_TYPE_IPV6_ROUTE_3T) {
memcpy(&hwe.ipv6.l2, &e->data.bridge.l2, sizeof(hwe.ipv6.l2));
hwe.ipv6.ib2 = e->data.bridge.ib2;
+ /* setting smac_id to 0xf instruct the hw to keep original
+ * source mac address
+ */
+ hwe.ipv6.l2.src_mac_hi = FIELD_PREP(AIROHA_FOE_MAC_SMAC_ID,
+ 0xf);
} else {
memcpy(&hwe.bridge.l2, &e->data.bridge.l2,
sizeof(hwe.bridge.l2));
--
2.49.0
next prev parent reply other threads:[~2025-06-02 10:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 10:55 [PATCH net v2 0/3] net: airoha: Fix IPv6 hw acceleration Lorenzo Bianconi
2025-06-02 10:55 ` [PATCH net v2 1/3] net: airoha: Initialize PPE UPDMEM source-mac table Lorenzo Bianconi
2025-06-03 8:28 ` Simon Horman
2025-06-02 10:55 ` [PATCH net v2 2/3] net: airoha: Fix IPv6 hw acceleration in bridge mode Lorenzo Bianconi
2025-06-03 8:28 ` Simon Horman
2025-06-02 10:55 ` Lorenzo Bianconi [this message]
2025-06-03 8:29 ` [PATCH net v2 3/3] net: airoha: Fix smac_id configuration " Simon Horman
2025-06-03 11:10 ` [PATCH net v2 0/3] net: airoha: Fix IPv6 hw acceleration patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250602-airoha-flowtable-ipv6-fix-v2-3-3287f8b55214@kernel.org \
--to=lorenzo@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).