numam-dpdk/lib/librte_net
Michael Pfeiffer ac0ad5eff8 net: calculate checksum of packet with IPv4 options
Currently, rte_ipv4_cksum() and rte_ipv4_udptcp_cksum() assume all IPv4
headers have sizeof(struct rte_ipv4_hdr) bytes. This is not true for
those (rare) packets with IPv4 options. Thus, both IPv4 and TCP/UDP
checksums are calculated wrong.

This patch fixes the issue by using the actual IPv4 header length from
the packet's IHL field.

Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2020-10-06 17:10:02 +02:00
..
meson.build ethdev: add eCPRI key fields to flow API 2020-07-13 02:11:30 +02:00
net_crc_neon.h lib: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
net_crc_sse.h add missing static keyword to globals 2018-10-29 02:01:08 +01:00
rte_arp.c net: replace htons with constant endian swap 2020-09-10 21:52:28 +02:00
rte_arp.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_ecpri.h ethdev: add eCPRI key fields to flow API 2020-07-13 02:11:30 +02:00
rte_esp.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_ether.c net: build on Windows 2020-09-10 21:53:48 +02:00
rte_ether.h net: check first segment length on SW VLAN insertion 2020-09-18 18:55:10 +02:00
rte_gre.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_gtp.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_higig.h ethdev: add HIGIG2 key field to flow API 2019-10-23 16:43:10 +02:00
rte_icmp.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_ip.h net: calculate checksum of packet with IPv4 options 2020-10-06 17:10:02 +02:00
rte_mpls.h net: fix pedantic build 2020-07-21 17:36:54 +02:00
rte_net_crc.c build: remove deprecated cpuflag macros 2020-09-25 11:13:57 +02:00
rte_net_crc.h net: hide internal CRC defines 2019-10-25 19:00:22 +02:00
rte_net_version.map version: 20.11-rc0 2020-08-12 11:32:16 +02:00
rte_net.c net: add rte prefix to MPLS structure 2019-10-25 19:00:22 +02:00
rte_net.h net: adjust header length parse size 2020-09-18 18:55:12 +02:00
rte_sctp.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_tcp.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_udp.h replace packed attributes 2020-04-16 18:16:46 +02:00
rte_vxlan.h replace packed attributes 2020-04-16 18:16:46 +02:00