From patchwork Tue Dec 13 09:01:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 120807 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 C1AE7A0542; Tue, 13 Dec 2022 10:03:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC9A440A89; Tue, 13 Dec 2022 10:03:04 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 4D71040146 for ; Tue, 13 Dec 2022 10:03:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670922181; x=1702458181; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0QPmiACD++HcNKEuU5JO6dhY8pV8ohP4RDMv0nSOJI0=; b=PiIUrMwQULonP3f8OZUa6sFwsWxGUxFXpG4ZPviTEPva50dMi/+x5ta5 81mM2cQkDZ/tKrLaudQETHAxf+BOpx2Zb5Krw96A7PdYj3WAIgs1GfYLe vdSPgpA5JmsIW+QHRypxmAph3WYO7sFyt0tlCZ5yQ8pd+jA+fPfhhPxRE jkrasIjThQZlMhVPmCvN4vuXrWF9JiVh5lIhI6fhkLy8Y2tA+OMDJs1m/ r9x3nxCAnr9+xhB+zu9tu4EhkVcK8NTWepWBVe+4fZiTkpzWsPXZOkGLG zfNZP5EwOEABFtjo4fM9DxJJYLRf21SFu/CxbgKXryjefVkWbxzcnuyrq A==; X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="382386469" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="382386469" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2022 01:03:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="755294423" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="755294423" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by fmsmga002.fm.intel.com with ESMTP; 13 Dec 2022 01:02:59 -0800 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, qi.fu@intel.com, lijuan.tu@intel.com Subject: [DTS][PATCH V3 1/2] test_plans/vf_offload: add test cases for tunneling packets Date: Tue, 13 Dec 2022 17:01:40 +0800 Message-Id: <20221213090141.170959-2-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221213090141.170959-1-ke1.xu@intel.com> References: <20221213090141.170959-1-ke1.xu@intel.com> 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 DPDK will support outer checksum offload and tunneling TSO in release 22.11, this commit is intended to cover the new scenario of test these features. Signed-off-by: Ke Xu --- test_plans/vf_offload_test_plan.rst | 233 ++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst index c5e720f2..f80290f5 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -113,6 +113,101 @@ be validated as pass by the tester. The IPv4 source address will not be changed by testpmd. +Test Case: HW tunneling checksum offload check +============================================== +In DPDK 22.11 release, Intel® Ethernet 800 Series NIC with ICE supports HW +checksum offload for tunneling packets for checking both inner and outer +checksum. For the packets involved in this case, a ICE COMMON DDP Package +is required. + +Start testpmd and enable checksum offload on rx port. + +Setup the ``csum`` forwarding mode:: + + testpmd> set fwd csum + Set csum packet forwarding mode + +Enable the IPv4/UDP/TCP/SCTP HW checksum offload on port 0:: + + testpmd> port stop all + testpmd> csum set ip hw 0 + testpmd> csum set tcp hw 0 + testpmd> csum set udp hw 0 + testpmd> csum set sctp hw 0 + testpmd> csum set outer-ip hw 0 + testpmd> csum set outer-udp hw 0 + testpmd> csum parse-tunnel on 0 + testpmd> port start all + testpmd> set promisc 0 on + testpmd> start + csum packet forwarding - CRC stripping disabled - packets/burst=32 + nb forwarding cores=1 - nb forwarding ports=10 + RX queues=1 - RX desc=128 - RX free threshold=64 + RX threshold registers: pthresh=8 hthresh=8 wthresh=4 + TX queues=1 - TX desc=512 - TX free threshold=0 + TX threshold registers: pthresh=32 hthresh=8 wthresh=8 + +Configure the traffic generator to send the multiple packets for the following +combination with inner package of: + + +----------------+----------------------------------------+ + | packet type | packet organization | + +================+========================================+ + | | IPv4 / UDP / payload | + | +----------------------------------------+ + | | IPv4 / TCP / payload | + | +----------------------------------------+ + | inner packets | IPv4 / SCTP / payload | + | for checksum +----------------------------------------+ + | offload test | IPv6 / UDP / payload | + | +----------------------------------------+ + | | IPv6 / TCP / payload | + | +----------------------------------------+ + | | IPv6 / SCTP / payload | + +----------------+----------------------------------------+ + +And outer or tunneling package of : + + +----------------+----------------------------------------+ + | packet type | packet organization | + +================+========================================+ + | | Ether / IPv4 / UDP / VXLAN / Ether | + | +----------------------------------------+ + | | Ether / IPv6 / UDP / VXLAN / Ether | + | +----------------------------------------+ + | | Ether / IPv4 / GRE | + | outer and +----------------------------------------+ + | tunneling | Ether / IPv4 / GRE / Ether | + | packets +----------------------------------------+ + | for checksum | Ether / IPv6 / GRE | + | offload test +----------------------------------------+ + | | Ether / IPv6 / GRE / Ether | + | +----------------------------------------+ + | | Ether / IPv4 / NVGRE | + | +----------------------------------------+ + | | Ether / IPv4 / NVGRE / Ether | + | +----------------------------------------+ + | | Ether / IPv6 / NVGRE | + | +----------------------------------------+ + | | Ether / IPv6 / NVGRE / Ether | + | +----------------------------------------+ + | | Ether / IPv4 / UDP / GTPU | + | +----------------------------------------+ + | | Ether / IPv6 / UDP / GTPU | + +----------------+----------------------------------------+ + +Notice that VxLAN needs DCF to configure, so testing of VxLAN may need to perform +on DCF. + +Send packets with incorrect checksum on outer IPv4, outer UDP (if exists), inner +IP, inner L4, verify dpdk can rx it and report the checksum error, +verify that the same number of packet are correctly received on the traffic +generator side. And IPv4 checksum, TCP checksum, UDP checksum, SCTP checksum need +be validated as pass by the tester. + +The IPv4 source address will not be changed by testpmd. + + Test Case: SW checksum offload check ==================================== @@ -183,6 +278,91 @@ and checksum on rx port. The test commands is below:: # Enable TSO on tx port testpmd> tso set 800 1 +For tunneling cases on Intel® Ethernet 800 Series NIC with ICE, add tunneling support +on csum and enable tunnel tso as below:: + + # Enable hw checksum for tunneling on rx port + testpmd> port stop all + testpmd> csum set outer-ip hw 0 + testpmd> csum set outer-udp hw 0 + testpmd> csum parse-tunnel on 0 + testpmd> port start all + testpmd> tunnel_tso set 800 1 + +Configure the traffic generator to send the multiple packets for the following +combination: + + +----------------+----------------------------------------+ + | packet type | packet organization | + +================+========================================+ + | | Ether / IPv4 / TCP / payload len 128 | + | +----------------------------------------+ + | | Ether / IPv4 / TCP / payload len 800 | + | +----------------------------------------+ + | | Ether / IPv4 / TCP / payload len 801 | + | +----------------------------------------+ + | | Ether / IPv4 / TCP / payload len 1700 | + | non-tunneling +----------------------------------------+ + | packets for | Ether / IPv4 / TCP / payload len 2500 | + | TSO test +----------------------------------------+ + | | Ether / IPv6 / TCP / payload len 128 | + | +----------------------------------------+ + | | Ether / IPv6 / TCP / payload len 800 | + | +----------------------------------------+ + | | Ether / IPv6 / TCP / payload len 801 | + | +----------------------------------------+ + | | Ether / IPv6 / TCP / payload len 1700 | + | +----------------------------------------+ + | | Ether / IPv6 / TCP / payload len 2500 | + +----------------+----------------------------------------+ + | | Ether / IPv4 / UDP / VXLAN / Ether | + | +----------------------------------------+ + | | Ether / IPv6 / UDP / VXLAN / Ether | + | +----------------------------------------+ + | | Ether / IPv4 / GRE | + | outer and +----------------------------------------+ + | tunneling | Ether / IPv4 / GRE / Ether | + | packets +----------------------------------------+ + | for tso test | Ether / IPv6 / GRE | + | +----------------------------------------+ + | | Ether / IPv6 / GRE / Ether | + | +----------------------------------------+ + | | Ether / IPv4 / NVGRE | + | +----------------------------------------+ + | | Ether / IPv4 / NVGRE / Ether | + | +----------------------------------------+ + | | Ether / IPv6 / NVGRE | + | +----------------------------------------+ + | | Ether / IPv6 / NVGRE / Ether | + | +----------------------------------------+ + | | Ether / IPv4 / UDP / GTPU | + | +----------------------------------------+ + | | Ether / IPv6 / UDP / GTPU | + +----------------+----------------------------------------+ + | | IPv4 / TCP / payload len 128 | + | +----------------------------------------+ + | | IPv4 / TCP / payload len 800 | + | +----------------------------------------+ + | | IPv4 / TCP / payload len 801 | + | +----------------------------------------+ + | | IPv4 / TCP / payload len 1700 | + | +----------------------------------------+ + | inner packets | IPv4 / TCP / payload len 2500 | + | for TSO test +----------------------------------------+ + | | IPv6 / TCP / payload len 128 | + | +----------------------------------------+ + | | IPv6 / TCP / payload len 800 | + | +----------------------------------------+ + | | IPv6 / TCP / payload len 801 | + | +----------------------------------------+ + | | IPv6 / TCP / payload len 1700 | + | +----------------------------------------+ + | | IPv6 / TCP / payload len 2500 | + +----------------+----------------------------------------+ + +Notice that VxLAN needs DCF to configure, so testing of VxLAN may need to perform +on DCF. + Test case: csum fwd engine, use TSO =================================== @@ -226,3 +406,56 @@ Test IPv4() in scapy:: Test IPv6() in scapy:: sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + + +Test case: csum fwd engine, use tunnel TSO +========================================== +In DPDK 22.11 release, Intel® Ethernet 800 Series NIC with ICE supports HW +TSO for tunneling packets. For the packets involved in this case, a ICE COMMON +DDP Package is required. + +This test uses ``Scapy`` to send out one large tunneled TCP package. The dut +forwards package with tunnel TSO enable on tx port while rx port turns checksum +on. After package send out by TSO on tx port, the tester receives multiple small +TCP package. + +Turn off tx port by ethtool on tester:: + + ethtool -K rx off tx off tso off gso off gro off lro off + ip l set up + +Capture package rx port on tester:: + + tcpdump -n -e -i -s 0 -w /tmp/cap + +Launch the userland ``testpmd`` application on DUT as follows:: + + testpmd> set verbose 1 + # Enable hw checksum on rx port + testpmd> port stop all + testpmd> csum set ip hw 0 + testpmd> csum set tcp hw 0 + testpmd> csum set udp hw 0 + testpmd> csum set sctp hw 0 + testpmd> csum set outer-ip hw 0 + testpmd> csum set outer-udp hw 0 + testpmd> csum parse-tunnel on 0 + testpmd> set promisc 0 on + testpmd> port start all + + # Enable TSO on tx port + testpmd> tunnel_tso set 800 1 + # Set fwd engine and start + + testpmd> set fwd csum + testpmd> start + +Test IPv4() in scapy:: + + for one_outer_packet in outer_packet_list: + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + +Test IPv6() in scapy:: + + for one_outer_packet in outer_packet_list: + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") From patchwork Tue Dec 13 09:01:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 120808 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 086C5A0540; Tue, 13 Dec 2022 10:03:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0142842D0C; Tue, 13 Dec 2022 10:03:07 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id B976C42D0C for ; Tue, 13 Dec 2022 10:03:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670922184; x=1702458184; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AZQhujhsHoSaC1uQnD+kh1QQb7qlAsptAotrth8rdTA=; b=nRP71JfcoQiNiOGt0oz9+fvV39oPMCVDqjVBipE87NCeLyZqY9c4VUal Px2gM/yS/dYYP7ZiMXm+kg4dNthoNjFtrjSLULto7SP4jxFpR4W2oewKu HvCOVHEx0z3BC09hSNEFa4gJ8IeyJycERWKxIgy25Pp+ik2VIGiyE2h84 0Lkn+/bmBk334voGMiQA1sqVohTCOrMgZsh4d7rK+FKT7HGd1uNrDe0J8 ID+TquzZtTSxLKI0LIaGm4WO1P1NzZdv8ciZVOgFZDH4dimUvXsUtOZTJ 5ixmqrg7GV5FQypgxBKwQ8vKi1J9Ld8RxcnZ1Ve7kL22CWqOhWXuSTkJo w==; X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="382386475" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="382386475" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2022 01:03:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="755294470" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="755294470" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by fmsmga002.fm.intel.com with ESMTP; 13 Dec 2022 01:03:01 -0800 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, qi.fu@intel.com, lijuan.tu@intel.com Subject: [DTS][PATCH V3 2/2] test_plans/vf_offload: format packet organization of previous cases into a table Date: Tue, 13 Dec 2022 17:01:41 +0800 Message-Id: <20221213090141.170959-3-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221213090141.170959-1-ke1.xu@intel.com> References: <20221213090141.170959-1-ke1.xu@intel.com> 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 Format the packet organization into a table to make it better organized to read. Signed-off-by: Ke Xu Acked-by: Lijuan Tu --- test_plans/vf_offload_test_plan.rst | 30 +++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst index f80290f5..00b221ca 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -102,7 +102,21 @@ Enable the IPv4/UDP/TCP/SCTP HW checksum offload on port 0:: TX threshold registers: pthresh=32 hthresh=8 wthresh=8 Configure the traffic generator to send the multiple packets for the following -combination: IPv4/UDP, IPv4/TCP, IPv4/SCTP, IPv6/UDP, IPv6/TCP. +combination: + + +----------------+----------------------------------------+ + | packet type | packet organization | + +================+========================================+ + | | Ether / IPv4 / UDP / payload | + | +----------------------------------------+ + | | Ether / IPv4 / TCP / payload | + | +----------------------------------------+ + | packets | Ether / IPv4 / SCTP / payload | + | for checksum +----------------------------------------+ + | offload test | Ether / IPv6 / UDP / payload | + | +----------------------------------------+ + | | Ether / IPv6 / TCP / payload | + +----------------+----------------------------------------+ Send packets with incorrect checksum, verify dpdk can rx it and report the checksum error, @@ -237,7 +251,19 @@ Enable the IPv4/UDP/TCP/SCTP SW checksum offload on port 0:: TX threshold registers: pthresh=32 hthresh=8 wthresh=8 Configure the traffic generator to send the multiple packets for the following -combination: IPv4/UDP, IPv4/TCP, IPv6/UDP, IPv6/TCP. +combination: + + +----------------+----------------------------------------+ + | packet type | packet organization | + +================+========================================+ + | | Ether / IPv4 / UDP / payload | + | +----------------------------------------+ + | packets | Ether / IPv4 / TCP / payload | + | for checksum +----------------------------------------+ + | offload test | Ether / IPv6 / UDP / payload | + | +----------------------------------------+ + | | Ether / IPv6 / TCP / payload | + +----------------+----------------------------------------+ Send packets with incorrect checksum, verify dpdk can rx it and report the checksum error,