[dpdk-dev] [PATCH] bugfix: udptcp_checksum should tread tcp and udp differently

2020-05-27 Thread guohongzhi
From: Hongzhi Guo RFC 768 for UDP specifies: 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. RFC 793 for TCP has no such special treatment for the checksum of zero. Signed-off-by: Hon

[dpdk-dev] [PATCH] bugfix: udptcp_checksum should tread tcp and udp differently

2020-05-27 Thread guohongzhi
RFC 768 for UDP specifies: 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. RFC 793 for TCP has no such special treatment for the checksum of zero. Signed-off-by: guohongzhi --- lib

[dpdk-dev] [PATCH] bugfix: rte_raw_checksum

2020-05-27 Thread guohongzhi
From: Hongzhi Guo __rte_raw_cksum should consider Big Endian. Signed-off-by: Hongzhi Guo --- lib/librte_net/rte_ip.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index 1ceb7b7..eb863d4 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/l

[dpdk-dev] [PATCH] lib/librte_net: fix bug for ipv4 checksum calculating

2020-05-26 Thread guohongzhi
From: Hongzhi Guo 0x is invalid for IPv4 checksum(RFC1624) Fixes: 6006818cfb26 ("net: new checksum functions") Cc: sta...@dpdk.org Reviewed-By: Morten Brørup Acked-by: Olivier Matz Signed-off-by: Hongzhi Guo --- lib/librte_net/rte_ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[dpdk-dev] [PATCH] lib/librte_net: fix bug for ipv4 checksum calculating

2020-05-26 Thread guohongzhi
0x is invalid for IPv4 checksum(RFC1624) Fixes: 6006818cfb26 ("net: new checksum functions") Reviewed-By: Morten Brørup Acked-by: Olivier Matz Signed-off-by: guohongzhi --- lib/librte_net/rte_ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/

[dpdk-dev] [PATCH] lib/librte_net: fix bug for checksum calculating

2020-05-15 Thread guohongzhi
1.rte_ipv4_cksum will return invalid checksum value like 0x.(rfc1624) 2.__rte_raw_cksum should consider Big Endian. 3.checksum 0x is invalid for udp, but valid for tcp.(rfc768) Signed-off-by: guohongzhi --- lib/librte_net/rte_ip.h | 15 ++- 1 file changed, 10 insertions

Re: [dpdk-dev] [PATCH] lib/librte_net: fix bug for ipv4 checksumcalculating

2020-05-14 Thread guohongzhi (A)
Ok, later I will write a patch to solve the problem of tcpdump checksum -Original Message- From: Morten Brørup [mailto:m...@smartsharesystems.com] Sent: Thursday,May 14,2020 20:57 To: guohongzhi (A) ; dev@dpdk.org Cc: olivier.m...@6wind.com; konstantin.anan...@intel.com; jiayu

[dpdk-dev] [PATCH] lib/librte_net: fix bug for ipv4 checksum calculating

2020-05-13 Thread guohongzhi
The function of rte_ipv4_cksum for calculating the checksum of IPv4 header is incorrect. This function will return checksum value like 0x. This value, however, is considered an illegal checksum on some switches(like Trident3). RFC 1624 specifies the IPv4 checksum as follows: https://tools.iet

[dpdk-dev] [PATCH] [PATCH] lib/librte_net: fix bug for ipv4 checksum calculating

2020-05-09 Thread guohongzhi
The function of rte_ipv4_cksum for calculating the checksum of IPv4 header is incorrect. This function will return checksum value like 0x. This value, however, is considered an illegal checksum on some switches(like Trident3). RFC 1624 specifies the IPv4 checksum as follows: https://tools.iet