Olivier Matz 45a08ef55e net: introduce functions to verify L4 checksums
Since commit d5df2ae0428a ("net: fix unneeded replacement of TCP
checksum 0"), the functions rte_ipv4_udptcp_cksum() and
rte_ipv6_udptcp_cksum() can return either 0x0000 or 0xffff when used to
verify a packet containing a valid checksum.

Since these functions should be used to calculate the checksum to set in
a packet, introduce 2 new helpers for checksum verification. They return
0 if the checksum is valid in the packet.

Use this new helper in net/tap driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-07-02 19:03:03 +02:00
..
2021-06-17 09:37:11 +02:00
2021-05-11 15:17:55 +02:00
2021-07-07 16:41:53 +02:00
2021-07-05 15:11:30 +02:00
2021-05-10 15:31:42 +02:00
2021-06-04 09:38:08 +02:00
2021-05-11 15:17:55 +02:00
2021-06-24 15:34:45 +02:00