patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Shiyang He <shiyangx.he@intel.com>, dev@dpdk.org
Cc: yidingx.zhou@intel.com, stable@dpdk.org,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Olivier Matz <olivier.matz@6wind.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>
Subject: Re: [PATCH] app/testpmd: fix IPv6 tunnel packet checksum error
Date: Thu, 1 Jun 2023 23:09:33 +0100	[thread overview]
Message-ID: <bdefb29b-b9ee-be2d-2c11-fb2dea0b6154@amd.com> (raw)
In-Reply-To: <20230530153603.105257-1-shiyangx.he@intel.com>

On 5/30/2023 4:36 PM, Shiyang He wrote:
> In checksum forwarding mode, the checksum of tunnel packet calculated
> incorrectly when outer header is IPv6.
> 
> This patch fixes the issue by setting L4 checksum flag.
> 
> Fixes: daa02b5cddbb ("mbuf: add namespace to offload flags")

This commit just updates the flag name, actual commit that introduce the
commit should be something else.

Probably:
Fixes: c14236f210d8 ("mbuf: replace inner fields by outer fields semantic")
Cc: jijiang.liu@intel.com


> Cc: stable@dpdk.org
> 
> Signed-off-by: Shiyang He <shiyangx.he@intel.com>
> ---
>  app/test-pmd/csumonly.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> index fc85c22a77..bd2fccc458 100644
> --- a/app/test-pmd/csumonly.c
> +++ b/app/test-pmd/csumonly.c
> @@ -582,7 +582,7 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
>  		else
>  			ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
>  	} else
> -		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;
> +		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6 | RTE_MBUF_F_TX_L4_MASK;
>  

When 'or' with MASK, it is same as requesting UDP checksum.
```
#define RTE_MBUF_F_TX_UDP_CKSUM     (3ULL << 52)
#define RTE_MBUF_F_TX_L4_MASK       (3ULL << 52)
```

Can you please describe more the problem, is it UDP checksum missing
(since ipv6 itself doesn't have checksum)?
If so, shouldn't code check first that if UDP checksum offload is requested?
Can you please describe why/how above code change is fixing the issue?

  reply	other threads:[~2023-06-01 22:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 15:36 Shiyang He
2023-06-01 22:09 ` Ferruh Yigit [this message]
2023-06-06  9:39   ` He, ShiyangX
2023-06-08 10:19 ` [PATCH v2] net/ice:fix tunnel packet TX descriptor error Shiyang He
2023-06-12 12:55   ` Zhang, Qi Z
2023-06-14  1:26   ` Xu, Ke1
  -- strict thread matches above, loose matches on Subject: below --
2023-05-30 15:13 [PATCH] app/testpmd: fix IPv6 tunnel packet checksum error Shiyang He

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=bdefb29b-b9ee-be2d-2c11-fb2dea0b6154@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=shiyangx.he@intel.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=stable@dpdk.org \
    --cc=yidingx.zhou@intel.com \
    --cc=yuying.zhang@intel.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).