netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Somnath Kotur <somnath.kotur@broadcom.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: netdev@vger.kernel.org, michael.chan@broadcom.com,
	 pavan.chebbi@broadcom.com, andrew+netdev@lunn.ch,
	davem@davemloft.net,  edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org
Subject: Re: [PATCH net] bnxt_en: correct offset handling for IPv6 destination address
Date: Mon, 22 Sep 2025 08:24:52 +0530	[thread overview]
Message-ID: <CAOBf=ms2MMk7dMiEH+V04QR_F=YusDOw6K_BH2htLODziRUKcg@mail.gmail.com> (raw)
In-Reply-To: <20250920121157.351921-1-alok.a.tiwari@oracle.com>

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>

  reply	other threads:[~2025-09-22  2:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-09-23  2:10 ` 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='CAOBf=ms2MMk7dMiEH+V04QR_F=YusDOw6K_BH2htLODziRUKcg@mail.gmail.com' \
    --to=somnath.kotur@broadcom.com \
    --cc=alok.a.tiwari@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.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).