[v3] net/cksum: compute raw cksum for several segments
Stephen Hemminger
stephen at networkplumber.org
Sun Aug 3 18:08:37 CEST 2025
On Sat, 2 Aug 2025 04:08:16 -0700
Su Sai <susai.ss at bytedance.com> wrote:
> 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.
>
> Signed-off-by: Su Sai <susai.ss at bytedance.com>
> ---
The patch is getting corrupted by your mail system and
does not apply cleanly. Fix and resubmit.
One option is to use an attachment
More information about the dev
mailing list