From: Thomas Monjalon <thomas@monjalon.net>
To: Su Sai <spiderdetective.ss@gmail.com>
Cc: stephen@networkplumber.org, dev@dpdk.org,
Marat Khalili <marat.khalili@huawei.com>
Subject: Re: [v3] net/cksum: compute raw cksum for several segments
Date: Mon, 11 Aug 2025 16:42:36 +0200 [thread overview]
Message-ID: <4313463.1IzOArtZ34@thomas> (raw)
In-Reply-To: <20250804035430.4058391-1-spiderdetective.ss@gmail.com>
Hello,
04/08/2025 05:54, Su Sai:
> The rte_raw_cksum_mbuf function is used to compute
> the raw checksum of a packet.
> If the packet payload stored in multi mbuf, the function
> will goto the hard case. In hard case,
> the variable 'tmp' is a type of uint32_t,
> so rte_bswap16 will drop high 16 bit.
> Meanwhile, the variable 'sum' is a type of uint32_t,
> so 'sum += tmp' will drop the carry when overflow.
> Both drop will make cksum incorrect.
> This commit fixes the above bug.
Thank you for the fix and the associated test.
Please could describe the exact condition to get a wrong checksum?
Does it happen with all multiseg packets?
3 segments is a minimum? Any other constraint to reproduce?
next prev parent reply other threads:[~2025-08-11 14:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 9:55 [PATCH] " 苏赛
2025-07-31 10:51 ` Marat Khalili
2025-07-31 11:03 ` Marat Khalili
2025-07-31 11:31 ` [External] " Su Sai
2025-07-31 11:43 ` Marat Khalili
2025-07-31 11:46 ` Marat Khalili
2025-07-31 12:22 ` zhoumin
2025-08-01 7:26 ` Su Sai
2025-08-01 15:28 ` [v2] " Su Sai
2025-08-01 16:39 ` Marat Khalili
2025-08-02 11:08 ` [v3] " Su Sai
2025-08-03 16:08 ` Stephen Hemminger
2025-08-04 3:54 ` Su Sai
2025-08-05 8:55 ` Marat Khalili
2025-08-11 14:42 ` Thomas Monjalon [this message]
2025-08-12 3:03 ` su sai
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=4313463.1IzOArtZ34@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=marat.khalili@huawei.com \
--cc=spiderdetective.ss@gmail.com \
--cc=stephen@networkplumber.org \
/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).