[v5] net/cksum: compute raw cksum for several segments
Thomas Monjalon
thomas at monjalon.net
Mon Sep 28 11:39:45 CEST 2026
08/07/2026 09:17, 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.
>
> Signed-off-by: Su Sai <spiderdetective.ss at gmail.com>
> Acked-by: Marat Khalili <marat.khalili at huawei.com>
Applied, thanks.
More information about the dev
mailing list