From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FD43A0C41; Mon, 2 Aug 2021 13:03:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23B6E41123; Mon, 2 Aug 2021 13:03:32 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 6AB9240140 for ; Mon, 2 Aug 2021 13:03:30 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 2C2E4A0C4D; Mon, 2 Aug 2021 13:03:30 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Mon, 02 Aug 2021 11:03:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: testpmd X-Bugzilla-Version: 21.08 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zhiminx.huang@intel.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 768] [dpdk-21.08] received pkts with bad ip-checksum when send ip-checksum=0 pkts X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D768 Bug ID: 768 Summary: [dpdk-21.08] received pkts with bad ip-checksum when send ip-checksum=3D0 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 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 engin= e") Cc: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Ori Kam Acked-by: Ajit Khaparde Acked-by: Xiaoyun Li 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=3Dvfio-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=3Ddpdk_617_20210803002002 -- -i --portmask=3D0= x1 --enable-rx-cksum --port-topology=3Dloop set verbose 1 set fwd csum start 3. tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] !=3D 0x88cc' = -Q in -w /tmp/tester/sniff_ens7.pcap p =3D Ether(dst=3D"40:a6:b7:0b:76:28", src=3D"52:00:00:00:00:00")/IP(src=3D"10.0.0.1",chksum=3D0x0)/UDP(chksum=3D0= xf)/("X"*46) sendp(p,iface=3D'ens7') check /tmp/tester/sniff_ens7.pcap ip checksum: p =3D rdpcap("/tmp/tester/sniff_ens7.pcap") >>> p[0].show2() WARNING: wrong value: DNS.qdcount=3D22616 WARNING: wrong value: DNS.ancount=3D22616 WARNING: more wrong value: DNS.nscount=3D22616 ###[ Ethernet ]### dst=3D 02:00:00:00:00:00 src=3D 40:a6:b7:0b:76:28 type=3D IPv4 ###[ IP ]### version=3D 4 ihl=3D 5 tos=3D 0x0 len=3D 74 id=3D 1 flags=3D frag=3D 0 ttl=3D 64 proto=3D udp chksum=3D 0x0 src=3D 10.0.0.1 dst=3D 127.0.0.1 \options\ ###[ UDP ]### sport=3D domain dport=3D domain len=3D 54 chksum=3D 0x8626 expect output: >>> p[0].show2() ###[ Ethernet ]### dst=3D 02:00:00:00:00:00 src=3D 40:a6:b7:0b:76:28 type=3D IPv4 ###[ IP ]### version=3D 4 ihl=3D 5 tos=3D 0x0 len=3D 74 id=3D 1 flags=3D frag=3D 0 ttl=3D 64 proto=3D udp chksum=3D 0xf1a0 src=3D 10.0.0.1 dst=3D 127.0.0.1 \options\ ###[ UDP ]### sport=3D domain dport=3D domain len=3D 54 chksum=3D 0x8626 --=20 You are receiving this mail because: You are the assignee for the bug.=