* [PATCH net] bnxt_en: correct offset handling for IPv6 destination address
@ 2025-09-20 12:11 Alok Tiwari
2025-09-22 2:54 ` Somnath Kotur
2025-09-23 2:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2025-09-20 12:11 UTC (permalink / raw)
To: netdev, somnath.kotur, michael.chan, pavan.chebbi, andrew+netdev,
davem, edumazet, kuba, pabeni, horms
Cc: alok.a.tiwari
In bnxt_tc_parse_pedit(), the code incorrectly writes IPv6
destination values to the source address field (saddr) when
processing pedit offsets within the destination address range.
This patch corrects the assignment to use daddr instead of saddr,
ensuring that pedit operations on IPv6 destination addresses are
applied correctly.
Fixes: 9b9eb518e338 ("bnxt_en: Add support for NAT(L3/L4 rewrite)")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index d72fd248f3aa..2d66bf59cd64 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -244,7 +244,7 @@ bnxt_tc_parse_pedit(struct bnxt *bp, struct bnxt_tc_actions *actions,
offset < offset_of_ip6_daddr + 16) {
actions->nat.src_xlate = false;
idx = (offset - offset_of_ip6_daddr) / 4;
- actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val);
+ actions->nat.l3.ipv6.daddr.s6_addr32[idx] = htonl(val);
} else {
netdev_err(bp->dev,
"%s: IPv6_hdr: Invalid pedit field\n",
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] bnxt_en: correct offset handling for IPv6 destination address
2025-09-20 12:11 [PATCH net] bnxt_en: correct offset handling for IPv6 destination address Alok Tiwari
@ 2025-09-22 2:54 ` Somnath Kotur
2025-09-23 2:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Somnath Kotur @ 2025-09-22 2:54 UTC (permalink / raw)
To: Alok Tiwari
Cc: netdev, michael.chan, pavan.chebbi, andrew+netdev, davem,
edumazet, kuba, pabeni, horms
On Sat, Sep 20, 2025 at 5:42 PM Alok Tiwari <alok.a.tiwari@oracle.com> wrote:
>
> In bnxt_tc_parse_pedit(), the code incorrectly writes IPv6
> destination values to the source address field (saddr) when
> processing pedit offsets within the destination address range.
>
> This patch corrects the assignment to use daddr instead of saddr,
> ensuring that pedit operations on IPv6 destination addresses are
> applied correctly.
>
> Fixes: 9b9eb518e338 ("bnxt_en: Add support for NAT(L3/L4 rewrite)")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> index d72fd248f3aa..2d66bf59cd64 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> @@ -244,7 +244,7 @@ bnxt_tc_parse_pedit(struct bnxt *bp, struct bnxt_tc_actions *actions,
> offset < offset_of_ip6_daddr + 16) {
> actions->nat.src_xlate = false;
> idx = (offset - offset_of_ip6_daddr) / 4;
> - actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val);
> + actions->nat.l3.ipv6.daddr.s6_addr32[idx] = htonl(val);
> } else {
> netdev_err(bp->dev,
> "%s: IPv6_hdr: Invalid pedit field\n",
> --
> 2.50.1
>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] bnxt_en: correct offset handling for IPv6 destination address
2025-09-20 12:11 [PATCH net] bnxt_en: correct offset handling for IPv6 destination address Alok Tiwari
2025-09-22 2:54 ` Somnath Kotur
@ 2025-09-23 2:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-23 2:10 UTC (permalink / raw)
To: ALOK TIWARI
Cc: netdev, somnath.kotur, michael.chan, pavan.chebbi, andrew+netdev,
davem, edumazet, kuba, pabeni, horms
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 20 Sep 2025 05:11:17 -0700 you wrote:
> In bnxt_tc_parse_pedit(), the code incorrectly writes IPv6
> destination values to the source address field (saddr) when
> processing pedit offsets within the destination address range.
>
> This patch corrects the assignment to use daddr instead of saddr,
> ensuring that pedit operations on IPv6 destination addresses are
> applied correctly.
>
> [...]
Here is the summary with links:
- [net] bnxt_en: correct offset handling for IPv6 destination address
https://git.kernel.org/netdev/net/c/3d3aa9472c6d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-23 2:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-20 12:11 [PATCH net] bnxt_en: correct offset handling for IPv6 destination address Alok Tiwari
2025-09-22 2:54 ` Somnath Kotur
2025-09-23 2:10 ` patchwork-bot+netdevbpf
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).