From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 34690A0526; Thu, 23 Jul 2020 07:21:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2F9B1BF7B; Thu, 23 Jul 2020 07:21:35 +0200 (CEST) Received: from inbox.dpdk.org (xvm-172-178.dc0.ghst.net [95.142.172.178]) by dpdk.org (Postfix) with ESMTP id 3EC7511A2 for ; Thu, 23 Jul 2020 07:21:34 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 06E64A0527; Thu, 23 Jul 2020 07:21:33 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Thu, 23 Jul 2020 05:21:33 +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: 20.08 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xix.zhang@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 513] [dpdk-20.08]tx_preparation/tx_preparation:IPV6/TCP packets TSO checksum incorrect X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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=3D513 Bug ID: 513 Summary: [dpdk-20.08]tx_preparation/tx_preparation:IPV6/TCP packets TSO checksum incorrect Product: DPDK Version: 20.08 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: testpmd Assignee: dev@dpdk.org Reporter: xix.zhang@intel.com Target Milestone: --- DPDK version: Use make showversion or for a non-released version: git remot= e -v && git show-ref --heads 20.08-rc2 3126c6e04118e92364571b7020f7bb1567bac694 Other software versions: name/version for QEMU, OVS, etc. Repeat as require= d. OS:linux64(Ubuntu20.04,Ubuntu18.04,CentOS8.2,REHL8.2.... )5.4.0-26-generic.= .. Compiler: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) & gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5) ... Hardware platform: Intel(R) Xeon(R) Gold 6139 CPU @ 2.30GHz&Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz &Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz ....... NIC hardware: carlsville springville fortville_25g powerville foxville SUS= E15=20 NIC firmware:i40e, igb,igc,ixgbe=20 Test Setup Steps to reproduce 1.tester: ethtool -K eth0 rx off tx off tso off gso off gro off= lro off 2.tester: ifconfig eth0 mtu 9000 3.usertools/dpdk-devbind.py --force --bind=3Dvfio-pci 0000:3d:00.0 0000:3d:= 00.1 4../x86_64-native-linuxapp-gcc/app/testpmd -l 1,2 -n 4 -w 0000:3d:00.0 -w 0000:3d:00.1 --file-prefix=3Ddpdk_9602_20200723104126 -- -i --portmask= =3D1 --port-topology=3Dchained --max-pkt-len=3D9000 --tx-offloads=3D0x8000 5.show port info 0 6.set fwd csum 7.set verbose 1 8.port stop all 9.csum set ip hw 0 10.csum set tcp hw 0 11.csum set udp hw 0 12.tso set 1460 0 13.port start all 14.start 15.tester:tcpdump ether[12:2]!=3D0x88cc and ether src A4:BF:01:3E:21:54 -i = eth0 -n -e -vv -w ./getPackageByTcpdump.cap 2> /dev/null& 16.tester: sendp([Ether(dst=3D"A4:BF:01:3E:21:54")/IPv6()/TCP(flags=3D0x= 10)=20=20=20=20=20 /Raw(RandString(4258))], iface=3D"eth0", count=3D4) 17.tester: tcpdump -nn -e -v -r ./getPackageByTcpdump.cap Expected Result: 10:42:13.463210 a4:bf:01:3e:21:54 > 02:00:00:00:00:00, ethertype IPv6 (0x86= dd), length 1534: (hlim 64, next-header TCP (6) payload length: 1480) ::.20 > ::1.80: Flags [.], cksum 0x6ba5 (correct), seq 0:1460, ack 0, win 8192, len= gth 1460: HTTP Actual results: 10:38:32.600209 a4:bf:01:3e:21:54 > 02:00:00:00:00:00, ethertype IPv6 (0x86= dd), length 1534: (hlim 64, next-header TCP (6) payload length: 1480) ::.20 > ::1.80: Flags [.], cksum 0xf7b6 (incorrect -> 0xf7af), seq 0:1460, ack 0, w= in 8192, length 1460: HTTP Regression Is this issue a regression: Y commit 520059a41aa9b263d4f5dd2337e9e543441277de Author: Andrew Rybchenko Date: Mon Jul 13 15:22:34 2020 +0100 net: check fragmented headers in non-debug as well Pseudo-header checksum calculation requires contiguous headers. There is no any formal requirements on data location and mbuf structure which could be used by the application. Since commit dfc6b2fd8da3 ("mbuf: remove Intel offload checks from generic API") fragmented headers checks are done inside rte_net_intel_cksum_flags_prepare() in RTE_LIBRTE_ETHDEV_DEBUG build because it is moved from rte_validate_tx_offload() which is called under debug only. Make corresponding check to be done in non-debug build as well to avoid bad accesses, incorrect checksum calculation and to return appropriate error from Tx prepare. Make no-offloads check more precise and do it in non-debug build as well to avoid contiguous headers check and Tx prepare failure if it is not actually required. Signed-off-by: Andrew Rybchenko Acked-by: Olivier Matz --=20 You are receiving this mail because: You are the assignee for the bug.=