* [dpdk-dev] [Bug 768] [dpdk-21.08] received pkts with bad ip-checksum when send ip-checksum=0 pkts
@ 2021-08-02 11:03 bugzilla
0 siblings, 0 replies; only message in thread
From: bugzilla @ 2021-08-02 11:03 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=768
Bug ID: 768
Summary: [dpdk-21.08] received pkts with bad ip-checksum when
send ip-checksum=0 pkts
Product: DPDK
Version: 21.08
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: testpmd
Assignee: dev@dpdk.org
Reporter: zhiminx.huang@intel.com
Target Milestone: ---
Bad commit id: b2a9e4a855d0e5b4e3fdba5b126bcf00aa8f0ada
commit b2a9e4a855d0e5b4e3fdba5b126bcf00aa8f0ada (HEAD,
refs/bisect/good-b2a9e4a855d0e5b4e3fdba5b126bcf00aa8f0ada)
Author: Gregory Etelson <getelson@nvidia.com>
Date: Thu Jul 29 20:01:41 2021 +0300
app/testpmd: fix Tx checksum calculation for tunnel
csumonly engine calculates Tx checksum of a tunnelled packet
for outer headers only or separately for outer and inner headers.
The calculation method is determined by checksum configuration options.
If Tx checksum calculation is separated,
the inner headers are processed before outer headers.
Inner headers processing sets checksum values to 0 unconditionally.
If Tx configuration offloads inner checksums only, outer checksum
calculation in software will read 0 instead of real values
and produce wrong result.
The patch zeroes inner checksums only before software calculation.
Fixes: 6b520d54ebfe ("app/testpmd: use Tx preparation in checksum engine")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Olivier Matz olivier.matz@6wind.com
ENV:
21.08-rc3: 90a05c5012049c0973d98d25953ebc600b67105b
os:4.18.0-240.el8.x86_64/Red-Hat8.3
Hardware platform: Intel(R) Xeon(R) Gold 6139 CPU @ 2.30GHz
gcc: gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)
NIC hardware: cvl,fvl
Reproduced Step:
1.
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:18:00.0 0000:18:00.1
2.
x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,2 -n 4 -a 0000:18:00.0 -a
0000:18:00.1 --file-prefix=dpdk_617_20210803002002 -- -i --portmask=0x1
--enable-rx-cksum --port-topology=loop
set verbose 1
set fwd csum
start
3.
tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in
-w /tmp/tester/sniff_ens7.pcap
p = Ether(dst="40:a6:b7:0b:76:28",
src="52:00:00:00:00:00")/IP(src="10.0.0.1",chksum=0x0)/UDP(chksum=0xf)/("X"*46)
sendp(p,iface='ens7')
check /tmp/tester/sniff_ens7.pcap ip checksum:
p = rdpcap("/tmp/tester/sniff_ens7.pcap")
>>> p[0].show2()
WARNING: wrong value: DNS.qdcount=22616
WARNING: wrong value: DNS.ancount=22616
WARNING: more wrong value: DNS.nscount=22616
###[ Ethernet ]###
dst= 02:00:00:00:00:00
src= 40:a6:b7:0b:76:28
type= IPv4
###[ IP ]###
version= 4
ihl= 5
tos= 0x0
len= 74
id= 1
flags=
frag= 0
ttl= 64
proto= udp
chksum= 0x0
src= 10.0.0.1
dst= 127.0.0.1
\options\
###[ UDP ]###
sport= domain
dport= domain
len= 54
chksum= 0x8626
expect output:
>>> p[0].show2()
###[ Ethernet ]###
dst= 02:00:00:00:00:00
src= 40:a6:b7:0b:76:28
type= IPv4
###[ IP ]###
version= 4
ihl= 5
tos= 0x0
len= 74
id= 1
flags=
frag= 0
ttl= 64
proto= udp
chksum= 0xf1a0
src= 10.0.0.1
dst= 127.0.0.1
\options\
###[ UDP ]###
sport= domain
dport= domain
len= 54
chksum= 0x8626
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-02 11:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 11:03 [dpdk-dev] [Bug 768] [dpdk-21.08] received pkts with bad ip-checksum when send ip-checksum=0 pkts bugzilla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).