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 76D28A046B for ; Wed, 29 May 2019 04:59:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 45DD52C55; Wed, 29 May 2019 04:59:44 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id ED46E1B19 for ; Wed, 29 May 2019 04:59:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 19:59:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,525,1549958400"; d="scan'208";a="179426903" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 28 May 2019 19:59:41 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 28 May 2019 19:59:41 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 28 May 2019 19:59:41 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0415.000; Wed, 29 May 2019 10:59:39 +0800 From: "Tu, Lijuan" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH v1]test_plans: add softnic_test_plan.rst Thread-Index: AQHVFDwdID3RmSUN9U2TVXYZsHCHJaaBbJbg Date: Wed, 29 May 2019 02:59:39 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA867A3@SHSMSX101.ccr.corp.intel.com> References: <1558927890-75676-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1558927890-75676-1-git-send-email-yuan.peng@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.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWRiYzhiZTUtNTAwOC00NDQzLWJiM2EtMjE0MDU3ODFkMmYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWTBvSG9hNTFVdUpuQmZQaktPTmFPWTJKMERoSE56enQzQ2lnSVlrc1p5bktNWWY4ZVNobVRmamxQOE5JZE1hRiJ9 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 v1]test_plans: add softnic_test_plan.rst 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 Peng Yuan > Sent: Monday, May 27, 2019 11:32 AM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH v1]test_plans: add softnic_test_plan.rst >=20 > Add softnic_test_plan.rst to test_plans >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/test_plans/softnic_test_plan.rst > b/test_plans/softnic_test_plan.rst > new file mode 100644 > index 0000000..9b75b1c > --- /dev/null > +++ b/test_plans/softnic_test_plan.rst > @@ -0,0 +1,137 @@ > +.. Copyright (c) <2019>, Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + - Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + > + - Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + > + - Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > INDIRECT, > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > OR > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > ADVISED > + OF THE POSSIBILITY OF SUCH DAMAGE. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +softnic PMD > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +The SoftNIC allows building custom NIC pipelines in SW. The Soft NIC > +pipeline is configurable through firmware (DPDK Packet Framework script)= . > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. The DUT must have one 10G Ethernet port connected to a port on tester > + that are controlled by the traffic generator:: > + > + dut_port_0 <---> tester_port_0 > + > + Assume the DUT 10G Ethernet port's pci device id is as the following:= : > + > + dut_port_0 : "0000:05:00.0" > + > + Bind it to dpdk igb_uio driver:: > + > + ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 > + > +2. Change ./drivers/net/softnic/firmware.cli to meet the specific test > environment. > + > +3. Start softnic with following command line:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 \ > + --vdev > 'net_softnic0,firmware=3D./drivers/net/softnic/firmware.cli,cpu_id=3D1,co= nn_por > t=3D8086' \ > + -- -i --forward-mode=3Dsoftnic --portmask=3D0x2 > + testpmd> start > + > + Or Start softnic with default hierarchy Qos with following command li= ne:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 \ > + --vdev > 'net_softnic0,firmware=3D./drivers/net/softnic/firmware.cli,cpu_id=3D1,co= nn_por > t=3D8086' \ > + -- -i --forward-mode=3Dsoftnic --portmask=3D0x2 > + testpmd> set port tm hierarchy default 1 > + testpmd> start > + > +Test Case 1: softnic performance > +=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 > +1. Start softnic:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 \ > + --vdev > 'net_softnic0,firmware=3D./drivers/net/softnic/firmware.cli,cpu_id=3D1,co= nn_por > t=3D8086' \ > + -- -i --forward-mode=3Dsoftnic --portmask=3D0x2 > + testpmd> start > + > +2. Send packet at line rate from traffic generator (IXIA or other) with = packet > size from 64~1518B. > +3. Check performance number is same as the physical NIC's performance > number, no performance drop. > + > +Test Case 2: shaping for pipe > +=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 > +1. The specifications of the default Hierarchical Scheduler are as follo= ws: > + > + Root node (x1, level 0) > + Subport node (x1, level 1) > + Pipe node (x4096, level 2) > + Traffic Class node (x16348, level 3) > + Queue node (x65536, level 4) > + > +2. Start softnic with the default hierarchy Qos:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 \ > + --vdev > 'net_softnic0,firmware=3D./drivers/net/softnic/tm_firmware.cli,cpu_id=3D1= ,conn_ > port=3D8086' \ > + -- -i --forward-mode=3Dsoftnic --portmask=3D0x2 > + testpmd> set port tm hierarchy default 1 > + testpmd> start > + > +3. Send per flow traffic with 100% line rate, verify output flow rate is= 1/4096 > subport rate. > + > +Test Case 3: NAT > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +1. Set SNAT with proto tcp test, edit nat_firmware.cli to change "table > action" as below:: > + > + table action profile AP0 ipv4 offset 270 fwd nat src proto tcp > + > +(a). Start softnic:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -l 23-25 -n 4 \ > + --vdev > 'net_softnic0,firmware=3D./drivers/net/softnic/nat_firmware.cli,cpu_id=3D= 1,conn > _port=3D8086' \ > + -- -i --forward-mode=3Dsoftnic --portmask=3D0x2 > + testpmd> start > + > +(b). Sent packet, verify the received packet's ipaddr and port was chang= ed > as expected. > + > +2. Set DNAT with proto tcp test, edit nat_firmware.cli to change "table > action" as below:: > + > + table action profile AP0 ipv4 offset 270 fwd nat dst proto tcp > + > + Then re-run step (a) & step (b). > + > +3. Set SNAT with proto udp test, edit nat_firmware.cli to change "table > action" as below:: > + > + table action profile AP0 ipv4 offset 270 fwd nat src proto udp > + > + Then re-run step (a) & step (b). > + > +4. Set DNAT with proto udp test, edit nat_firmware.cli to change "table > action" as below:: > + > + table action profile AP0 ipv4 offset 270 fwd nat dst proto udp > + > + Then re-run step (a) & step (b). > -- > 2.14.3