[PATCH v5] lib/net: fix tcp/udp cksum with padding data
Morten Brørup
mb at smartsharesystems.com
Thu Dec 14 12:20:18 CET 2023
> From: Kaiwen Deng [mailto:kaiwenx.deng at intel.com]
> Sent: Thursday, 14 December 2023 10.23
>
> IEEE 802 packets may have a minimum size limit. The data fields
> should be padded when necessary. In some cases, the padding data
> is not zero.
>
> In 'rte_ipv4_udptcp_cksum_mbuf()', as payload length
> "mbuf->pkt_len - l4_off" is used, which includes padding and if
> padding is not zero it will end up producing wrong checksum.
>
> This patch will use IP header to get the payload size to calculate
> tcp/udp checksum.
>
> Fixes: d178f693bbfe ("net: add UDP/TCP checksum in mbuf segments")
> Cc: stable at dpdk.org
>
> Signed-off-by: Kaiwen Deng <kaiwenx.deng at intel.com>
> ---
Reviewed-by: Morten Brørup <mb at smartsharesystems.com>
More information about the stable
mailing list