> From: Kaiwen Deng [mailto:[email protected]]
> 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: [email protected]
> 
> Signed-off-by: Kaiwen Deng <[email protected]>
> ---

Reviewed-by: Morten Brørup <[email protected]>

Reply via email to