[PATCH v5] lib/net: fix tcp/udp cksum with padding data
Thomas Monjalon
thomas at monjalon.net
Mon Feb 19 02:10:17 CET 2024
14/12/2023 12:20, Morten Brørup:
> > 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>
Applied, thanks.
More information about the stable
mailing list