From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7580A1DA4 for ; Fri, 8 Mar 2019 09:05:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2019 00:05:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,455,1544515200"; d="scan'208";a="132572141" Received: from dpdk-test60.sh.intel.com ([10.67.111.110]) by fmsmga007.fm.intel.com with ESMTP; 08 Mar 2019 00:05:48 -0800 From: Xueqin Lin To: dts@dpdk.org Cc: Xueqin Lin Date: Thu, 7 Mar 2019 21:05:21 -0500 Message-Id: <1552010721-191666-1-git-send-email-xueqin.lin@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dts] [PATCH] test_plan/vf_offload: correct case description and commands X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 08:05:55 -0000 Signed-off-by: Xueqin Lin --- test_plans/vf_offload_test_plan.rst | 67 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst index 5313bc9..c8f863f 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -38,7 +38,7 @@ VF Offload Prerequisites for checksum offload ================================== -If using vfio the kernel must be >= 3.6+ and VT-d must be enabled in bios.When +If using vfio the kernel must be >= 3.6+ and VT-d must be enabled in bios. When using vfio, use the following commands to load the vfio driver and bind it to the device under test:: @@ -46,7 +46,7 @@ to the device under test:: modprobe vfio-pci usertools/dpdk-devbind.py --bind=vfio-pci device_bus_id -Assuming that ports ``0`` and ``2`` are connected to a traffic generator, +Assuming that ports ``0`` and ``1`` are connected to a traffic generator, launch the ``testpmd`` with the following arguments:: ./build/app/testpmd -cffffff -n 1 -- -i --burst=1 --txpt`=32 \ @@ -91,13 +91,13 @@ Setup the ``csum`` forwarding mode:: testpmd> set fwd csum Set csum packet forwarding mode -Enable the IPv4/UDP/TCP/SCTP checksum offload on port 0:: - - testpmd> - 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 +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> port start all testpmd> start csum packet forwarding - CRC stripping disabled - packets/burst=32 nb forwarding cores=1 - nb forwarding ports=10 @@ -110,8 +110,8 @@ Configure the traffic generator to send the multiple packets for the following combination: IPv4/UDP, IPv4/TCP, IPv4/SCTP, IPv6/UDP, IPv6/TCP. Send packets with incorrect checksum, -Verify dpdk can rx it and reported the checksum error, -Verify that the same number of packet are correctly received on the traffic +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 CRC32c need be validated as pass by the tester. @@ -121,17 +121,13 @@ The IPv4 source address will not be changed by testpmd. Test Case: SW checksum offload check ==================================== -Disable HW checksum offload on tx port, SW Checksum check. -Send same packet with incorrect checksum and verify checksum is valid. +Default checksum is SW or enable SW checksum similar to above HW checksum +command. Send same packet with incorrect checksum and verify checksum is valid. Setup the ``csum`` forwarding mode:: testpmd> set fwd csum Set csum packet forwarding mode - -Disable the IPv4/UDP/TCP/SCTP checksum offload on port 0:: - - testpmd> tx_checksum set 0x0 0 testpmd> start csum packet forwarding - CRC stripping disabled - packets/burst=32 nb forwarding cores=1 - nb forwarding ports=10 @@ -144,12 +140,12 @@ Configure the traffic generator to send the multiple packets for the following combination: IPv4/UDP, IPv4/TCP, IPv6/UDP, IPv6/TCP. Send packets with incorrect checksum, -Verify dpdk can rx it and reported the checksum error, -Verify that the same number of packet are correctly received on the traffic +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 need -be validated as pass by the IXIA. +be validated as pass by the tester. -The first byte of source IPv4 address will be increment by testpmd. The checksum +The first byte of source IPv4 address will be increased by testpmd. The checksum is indeed recalculated by software algorithms. Prerequisites for TSO @@ -170,15 +166,16 @@ 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 - set fwd csum + 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> port start all + testpmd> set fwd csum # enable TSO on tx port - *tso set 800 1 - + testpmd> tso set 800 1 Test case: csum fwd engine, use TSO =================================== @@ -192,7 +189,7 @@ 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:: +Capture package rx port on tester:: tcpdump -n -e -i -s 0 -w /tmp/cap @@ -201,10 +198,12 @@ Launch the userland ``testpmd`` application on DUT as follows:: testpmd> set verbose 1 # 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> 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> port start all # enable TSO on tx port testpmd> tso set 800 1 # set fwd engine and start @@ -217,4 +216,4 @@ 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" + 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") -- 2.5.5