From patchwork Wed Dec 21 05:06:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 121147 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4ED1FA0032; Wed, 21 Dec 2022 07:04:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49EAD4113F; Wed, 21 Dec 2022 07:04:01 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 2D6D140684 for ; Wed, 21 Dec 2022 07:03:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671602639; x=1703138639; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=90pIrPh6GPGXH/rcFVvwB+o7XGxVPaUcHhAK9MZb8Zg=; b=UelnJjW+x7X9A87g05wMzLsgGYA6EqmHY7REjRa4yh8xn9OO0ulgglrK jy+X3i3Vw8rX5UPMfUqTIq05fQTcw4YmbSzsj3LI+RSb/OJcGxhflpFm+ OY06+TdIa/rOI+HDYKwITtQ1+KekDHL8ykJq1xsfVEeRrvfjQ/ev/20Cz tTOz/hqCOyjSGG9yNfIK4B0iSWM62HEzANcAsO0cUwQndOY2XZCfBOTFZ SVMNJ7ga2WBRTLEXj6X//isVfimbWMKbGcpAmZhYtGS7uZzyRYWSW4Phj EuKMKRqqMbbzCyno5hMK+9JWgs+ToJttVptjPex5f4GkTK4VMGaIuRUBi g==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="299470292" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="299470292" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 22:03:58 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="653381988" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="653381988" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 22:03:56 -0800 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V1] test_plans/tso: update testplan, map the test case command Date: Wed, 21 Dec 2022 00:06:07 -0500 Message-Id: <20221221050607.21526-1-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org delete tx_checksum command, mapping the test case. Signed-off-by: Lingli Chen Acked-by: Lijuan Tu --- test_plans/tso_test_plan.rst | 61 ++++++++++++++++++++++++++---------- tests/TestSuite_tso.py | 18 ++--------- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/test_plans/tso_test_plan.rst b/test_plans/tso_test_plan.rst index a17f8ac5..e5122bb9 100644 --- a/test_plans/tso_test_plan.rst +++ b/test_plans/tso_test_plan.rst @@ -29,6 +29,7 @@ device that is controlled by the Scapy packet generator. The Ethernet interface identifier of the port that Scapy will use must be known. On tester, all offload feature should be disabled on tx port, and start rx port capture:: + ifconfig mtu 9000 ethtool -K rx off tx off tso off gso off gro off lro off ip l set up tcpdump -n -e -i -s 0 -w /tmp/cap @@ -38,10 +39,10 @@ On DUT, run pmd with parameter "--enable-rx-cksum". Then enable TSO on tx port and checksum on rx port. The test commands is below:: #enable hw checksum on rx port - tx_checksum set ip hw 0 - tx_checksum set udp hw 0 - tx_checksum set tcp hw 0 - tx_checksum set sctp hw 0 + csum set ip hw 0 + csum set udp hw 0 + csum set tcp hw 0 + csum set sctp hw 0 set fwd csum # enable TSO on tx port @@ -70,16 +71,21 @@ Launch the userland ``testpmd`` application on DUT as follows:: --burst=32 --rxfreet=64 --mbcache=128 --portmask=0x3 --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32 --enable-rx-cksum testpmd> set verbose 1 - + # should stop ports before set csum and start ports after the settings + testpmd> port stop all # enable hw checksum on rx port - testpmd> tx_checksum set ip hw 0 - testpmd> tx_checksum set udp hw 0 - testpmd> tx_checksum set tcp hw 0 - testpmd> tx_checksum set sctp hw 0 + testpmd> csum set ip hw 0 + testpmd> csum set udp hw 0 + testpmd> csum set tcp hw 0 + testpmd> csum set sctp hw 0 + testpmd> csum set outer-ip hw 0 + testpmd> csum parse-tunnel on 0 # enable TSO on tx port testpmd> tso set 800 1 # set fwd engine and start testpmd> set fwd csum + testpmd> port start all + testpmd> set promisc all off testpmd> start Test IPv4() in scapy:: @@ -92,6 +98,7 @@ Test IPv6() in scapy:: Test case: csum fwd engine, use TSO tunneling ============================================= +not support nic: IXGBE_10G-82599_SFP, IGC-I225_LM, IGC-I226_LM. This test uses ``Scapy`` to send out one large TCP package. The dut forwards package with TSO enable on tx port while rx port turns checksum on. After package send out @@ -113,17 +120,37 @@ Launch the userland ``testpmd`` application on DUT as follows:: --txfreet=32 --txrst=32 --enable-rx-cksum testpmd> set verbose 1 + testpmd> port stop all # enable hw checksum on rx port - testpmd> tx_checksum set ip hw 0 - testpmd> tx_checksum set udp hw 0 - testpmd> tx_checksum set tcp hw 0 - testpmd> tx_checksum set sctp hw 0 - testpmd> tx_checksum set vxlan hw 0 - testpmd> tx_checksum set nvgre hw 0 + testpmd> csum set ip hw 0 + testpmd> csum set udp hw 0 + testpmd> csum set tcp hw 0 + testpmd> csum set sctp hw 0 + testpmd> csum set outer-ip hw 0 + #IntelĀ® Ethernet 700 Series not support outer udp + testpmd> csum set outer-udp hw 0 + testpmd> csum parse-tunnel on 0 + + # enable hw checksum on tx port + testpmd> csum set ip hw 1 + testpmd> csum set udp hw 1 + testpmd> csum set tcp hw 1 + testpmd> csum set sctp hw 1 + #csum set outer-ip must be set to hw if outer L3 is IPv4 + testpmd> csum set outer-ip hw 1 + #csum parse-tunnel must be set so that tunneled packets are recognized + testpmd> csum parse-tunnel on 1 + #IntelĀ® Ethernet 700 Series not support outer udp + testpmd> csum set outer-udp hw 1 + # enable TSO on tx port - testpmd> tso set 800 1 + testpmd> tunnel_tso set 800 1 + # enable VXLAN protocol on ports + testpmd> rx_vxlan_port add 4789 0 # set fwd engine and start testpmd> set fwd csum + testpmd> port start all + testpmd> set promisc all off testpmd> start Test vxlan() in scapy:: @@ -132,7 +159,7 @@ Test vxlan() in scapy:: Test nvgre() in scapy:: - sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2",proto=47)/NVGRE()/Ether(dst=%s,src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport="1021",dport="1021")/("X"*%s)], iface="%s") + sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2",proto=47)/GRE(key_present=1,proto=0x6558,key=0x00001000)/Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s") Test case: TSO performance ========================== diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index fa0f63ad..8cbd7a70 100755 --- a/tests/TestSuite_tso.py +++ b/tests/TestSuite_tso.py @@ -167,7 +167,7 @@ class TestTSO(TestCase): def test_tso(self): """ - TSO IPv4 TCP, IPv6 TCP, VXLan testing + TSO IPv4 TCP, IPv6 TCP """ tx_interface = self.tester.get_interface( self.tester.get_local_port(self.dut_ports[0]) @@ -214,20 +214,6 @@ class TestTSO(TestCase): "csum parse-tunnel on %d" % self.dut_ports[0], "testpmd> ", 120 ) - self.dut.send_expect("csum set ip hw %d" % self.dut_ports[1], "testpmd> ", 120) - self.dut.send_expect("csum set udp hw %d" % self.dut_ports[1], "testpmd> ", 120) - self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[1], "testpmd> ", 120) - if self.nic not in ["cavium_a063", "cavium_a064"]: - self.dut.send_expect( - "csum set sctp hw %d" % self.dut_ports[1], "testpmd> ", 120 - ) - self.dut.send_expect( - "csum set outer-ip hw %d" % self.dut_ports[1], "testpmd> ", 120 - ) - self.dut.send_expect( - "csum parse-tunnel on %d" % self.dut_ports[1], "testpmd> ", 120 - ) - self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120) self.dut.send_expect("set fwd csum", "testpmd> ", 120) self.dut.send_expect("port start all", "testpmd> ", 120) @@ -307,7 +293,7 @@ class TestTSO(TestCase): def test_tso_tunneling(self): """ - TSO IPv4 TCP, IPv6 TCP, VXLan testing + TSO tunneling, VXLan testing, Nvgre testing """ tx_interface = self.tester.get_interface( self.tester.get_local_port(self.dut_ports[0])