From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 61162A05D3 for ; Sun, 24 Mar 2019 19:32:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 555B22BDB; Sun, 24 Mar 2019 19:32:49 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E474A1DBD for ; Sun, 24 Mar 2019 19:32:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2019 11:32:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="154748787" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 24 Mar 2019 11:32:47 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 24 Mar 2019 11:32:46 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 24 Mar 2019 11:32:46 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.158]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.74]) with mapi id 14.03.0415.000; Mon, 25 Mar 2019 02:32:44 +0800 From: "Tu, Lijuan" To: "Lin, Xueqin" , "dts@dpdk.org" CC: "Lin, Xueqin" Thread-Topic: [dts] [PATCH v2] test_plans/vf_offload: correct case description and commands Thread-Index: AQHU3W4gm3/Yd0aiZEmGv/xsOEd4OqYbJQ0g Date: Sun, 24 Mar 2019 18:32:43 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA45BBB@SHSMSX101.ccr.corp.intel.com> References: <1552880144-113772-1-git-send-email-xueqin.lin@intel.com> In-Reply-To: <1552880144-113772-1-git-send-email-xueqin.lin@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODFkMzcxZjItMDMzMS00NWFjLWJiYTMtMTE2YjI5MjNmZDQ5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRzVacFI3bml5YWh4UzA0a2t4ZTVGSmx6XC9DNm1KWHdXOVVFbXp6WjBVbExYQ0xYamdMeXJHTEMrc2RnYlBjQzcifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v2] test_plans/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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xueqin Lin > Sent: Sunday, March 17, 2019 8:36 PM > To: dts@dpdk.org > Cc: Lin, Xueqin > Subject: [dts] [PATCH v2] test_plans/vf_offload: correct case description= and > commands >=20 > Signed-off-by: Xueqin Lin >=20 > --- > test_plans/vf_offload_test_plan.rst | 90 +++++++++++++++++++++----------= ------ > 1 file changed, 51 insertions(+), 39 deletions(-) >=20 > diff --git a/test_plans/vf_offload_test_plan.rst > b/test_plans/vf_offload_test_plan.rst > index 5313bc9..ee15dca 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > -If using vfio the kernel must be >=3D 3.6+ and VT-d must be enabled in b= ios.When > +If using vfio the kernel must be >=3D 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:: >=20 > @@ -46,12 +46,13 @@ to the device under test:: > modprobe vfio-pci > usertools/dpdk-devbind.py --bind=3Dvfio-pci device_bus_id >=20 > -Assuming that ports ``0`` and ``2`` are connected to a traffic generator= , > +Assuming that ports ``0`` and ``1`` are connected to a traffic > +generator, enable hardware rx checksum offload with > +"--enable-rx-cksum", > launch the ``testpmd`` with the following arguments:: >=20 > ./build/app/testpmd -cffffff -n 1 -- -i --burst=3D1 --txpt`=3D32 \ > --txht=3D8 --txwt=3D0 --txfreet=3D0 --rxfreet=3D64 --mbcache=3D250 --p= ortmask=3D0x5 > - enable-rx-cksum > + --enable-rx-cksum >=20 > Set the verbose level to 1 to display information for each received pack= et:: >=20 > @@ -84,20 +85,21 @@ Verify that how many packets found with Bad-ipcsum or > Bad-l4csum:: >=20 > Test Case: HW checksum offload check > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > -Start testpmd and enable checksum offload on tx port. > +Start testpmd and enable checksum offload on rx port. >=20 > Setup the ``csum`` forwarding mode:: >=20 > testpmd> set fwd csum > Set csum packet forwarding mode >=20 > -Enable the IPv4/UDP/TCP/SCTP checksum offload on port 0:: > +Enable the IPv4/UDP/TCP/SCTP HW checksum offload on port 0:: >=20 > - 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 > + 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=3D32 > nb forwarding cores=3D1 - nb forwarding ports=3D10 @@ -110,9 +112,9 = @@ > Configure the traffic generator to send the multiple packets for the foll= owing > combination: IPv4/UDP, IPv4/TCP, IPv4/SCTP, IPv6/UDP, IPv6/TCP. >=20 > 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 -generator side. A= nd IPv4 > checksum, TCP checksum, UDP checksum, SCTP CRC32c need > +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. >=20 > The IPv4 source address will not be changed by testpmd. > @@ -121,17 +123,22 @@ The IPv4 source address will not be changed by > testpmd. > Test Case: SW checksum offload check > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > -Disable HW checksum offload on tx port, SW Checksum check. > -Send same packet with incorrect checksum and verify checksum is valid. > +Enable SW checksum offload, send same packet with incorrect checksum > +and verify checksum is valid. >=20 > Setup the ``csum`` forwarding mode:: >=20 > testpmd> set fwd csum > Set csum packet forwarding mode >=20 > -Disable the IPv4/UDP/TCP/SCTP checksum offload on port 0:: > +Enable the IPv4/UDP/TCP/SCTP SW checksum offload on port 0:: >=20 > - testpmd> tx_checksum set 0x0 0 > + testpmd> port stop all > + testpmd> csum set ip sw 0 > + testpmd> csum set tcp sw 0 > + testpmd> csum set udp sw 0 > + testpmd> csum set sctp sw 0 > + testpmd> port start all > testpmd> start > csum packet forwarding - CRC stripping disabled - packets/burst=3D32 > nb forwarding cores=3D1 - nb forwarding ports=3D10 @@ -144,12 +151,1= 2 @@ > Configure the traffic generator to send the multiple packets for the foll= owing > combination: IPv4/UDP, IPv4/TCP, IPv6/UDP, IPv6/TCP. >=20 > 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. >=20 > -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. >=20 > Prerequisites for TSO > @@ -169,15 +176,17 @@ On tester, all offload feature should be disabled o= n tx > port, and start rx port On DUT, run pmd with parameter "--enable-rx-cksu= m". > Then enable TSO on tx port and checksum on rx port. The test commands is > below:: >=20 > - #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 > + # 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> port start all > + testpmd> set fwd csum >=20 > - # enable TSO on tx port > - *tso set 800 1 > + # Enable TSO on tx port > + testpmd> tso set 800 1 >=20 >=20 > Test case: csum fwd engine, use TSO > @@ -192,22 +201,25 @@ 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 >=20 > -capture package rx port on tester:: > +Capture package rx port on tester:: >=20 > tcpdump -n -e -i -s 0 -w /tmp/cap >=20 > Launch the userland ``testpmd`` application on DUT as follows:: >=20 > 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 > - # enable TSO on tx port > + # 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> port start all > + > + # Enable TSO on tx port > testpmd> tso set 800 1 > - # set fwd engine and start > + # Set fwd engine and start > + > testpmd> set fwd csum > testpmd> start >=20 > @@ -217,4 +229,4 @@ Test IPv4() in scapy:: >=20 > Test IPv6() in scapy:: >=20 > - sendp([Ether(dst=3D"%s", > src=3D"52:00:00:00:00:00")/IPv6(src=3D"FE80:0:0:0:200:1FF:FE00:200", > dst=3D"3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=3D1021,dport= =3D102 > 1)/Raw(load=3D"\x50"*%s)], iface=3D"%s" > + sendp([Ether(dst=3D"%s", > + src=3D"52:00:00:00:00:00")/IPv6(src=3D"FE80:0:0:0:200:1FF:FE00:200", > + dst=3D"3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=3D1021,dport= =3D10 > + 21)/Raw(load=3D"\x50"*%s)], iface=3D"%s") > -- > 2.5.5