net: fix unneeded replacement of TCP checksum 0
authorHongzhi Guo <guohongzhi1@huawei.com>
Fri, 10 Jul 2020 06:55:51 +0000 (14:55 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 10 Jul 2020 22:45:20 +0000 (00:45 +0200)
commitd5df2ae0428a147b80bbb65d623f88f75d28b226
treeb0ba3c83f51c3bb5a8f7d92bf33d071c1faf8f90
parent58902736a4c956b42d4e1e44186cba340d0b84fe
net: fix unneeded replacement of TCP checksum 0

Per RFC768:
If the computed checksum is zero, it is transmitted as all ones.
An all zero transmitted checksum value means that the transmitter
generated no checksum.

RFC793 for TCP has no such special treatment for the checksum of zero.

Fixes: 6006818cfb26 ("net: new checksum functions")
Cc: stable@dpdk.org
Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
lib/librte_net/rte_ip.h