From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 651B8A04F0; Thu, 19 Dec 2019 08:55:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1EA6C1BC25; Thu, 19 Dec 2019 08:55:01 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BB30E1252 for ; Thu, 19 Dec 2019 08:54:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2019 23:54:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,330,1571727600"; d="scan'208";a="218096705" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 18 Dec 2019 23:54:58 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Dec 2019 23:54:58 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Dec 2019 23:54:57 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.72]) with mapi id 14.03.0439.000; Thu, 19 Dec 2019 15:54:55 +0800 From: "Tu, Lijuan" To: "Lu, Nannan" , "dts@dpdk.org" CC: "Lu, Nannan" Thread-Topic: [dts] [PATCH V1] test_plans: add test plan port controls Thread-Index: AQHVrAx0Lq1E3P8f8UucTRcKmte6KqfBKxTA Date: Thu, 19 Dec 2019 07:54:55 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB898B9@SHSMSX101.ccr.corp.intel.com> References: <20191206155657.70413-1-nannan.lu@intel.com> In-Reply-To: <20191206155657.70413-1-nannan.lu@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.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzA4NmMyMjUtYTU0MS00NmNmLWIwYmYtYWZhZjhiN2YzMDI4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoialdzQ2RoV2FaSUFDYUJhZkZFQmVVcldIWDg1a2JwXC9sR1dmVnE1NUk5NEM2c05iaWJGYlhYUTBYQXpJcDd2cTQifQ== 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 test plan port controls 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 Nannan Lu > Sent: Friday, December 6, 2019 11:57 PM > To: dts@dpdk.org > Cc: Lu, Nannan > Subject: [dts] [PATCH V1] test_plans: add test plan port controls >=20 > Signed-off-by: Nannan Lu > --- > test_plans/port_control_test_plan.rst | 257 ++++++++++++++++++++++++++ > 1 file changed, 257 insertions(+) > create mode 100644 test_plans/port_control_test_plan.rst >=20 > diff --git a/test_plans/port_control_test_plan.rst > b/test_plans/port_control_test_plan.rst > new file mode 100644 > index 0000000..2fca8fd > --- /dev/null > +++ b/test_plans/port_control_test_plan.rst > @@ -0,0 +1,257 @@ > +.. 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=3D=3D=3D=3D=3D=3D=3D > +Port Control Tests > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Hardware: > + > + * Fortville > + * Niantic > + * Columbiaville > + * i350 NIC > + * e1000 emulated device > + > + > +Test Case: pf start/stop/reset/close > +=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 > + > +1. Bind the port to dpdk driver:: > + > + ./usertools/dpdk-devbind.py -b igb_uio 18:00.2 > + > +2. Run testpmd:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xff -n 4 -- -i > + > + testpmd> set fwd mac > + testpmd> start > + > + check port info:: > + > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: up > + Link speed: 1000 Mbps > + > + verify that the link status is up. > + > + Using scapy to send 1000 random packets from tester, > + verify the packets can be received and can be forwarded:: > + > + scapy > + >>>sendp([Ether(dst=3D"00:11:22:33:44:11")/IP()/Raw('x'*40)], \ > + iface=3D"enp27s0f2",count=3D1000) > + > +3. Stop and start port:: > + > + testpmd> stop > + testpmd> port stop all > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: down > + Link speed: 0 Mbps > + > + verify that the link status is down. > + > + Then start the port:: > + > + testpmd> port start all > + testpmd> start > + > + check port info:: > + > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: up > + Link speed: 10000 Mbps > + > + verify that the link status is up. > + > + Send the same 1000 packets with scapy from tester, verify the > + packets can be received and forwarded. > + > +4. Reset the port, run the commands:: > + > + testpmd> stop > + testpmd> port stop all > + testpmd> port reset all > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: down > + Link speed: 0 Mbps > + > + verify that the link status is down. > + > + Then start the port:: > + > + testpmd> port start all > + testpmd> start > + > + check port info:: > + > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: up > + Link speed: 10000 Mbps > + > + verify that the link status is up. > + Send the same 1000 packets with scapy from tester, > + verify the packets can be received and forwarded. > + > +5. Close the port, run the commands:: > + > + testpmd> stop > + testpmd> port stop all > + testpmd> port close all > + > + check the port info:: > + > + testpmd> show port info all > + testpmd> > + > + verify that there is no output after executing this command. > + > + > +Test Case: e1000 emulated device start/stop/reset/close > +=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > + > +1. Set up qemu environment > + > + Virtual an e1000 emulated device in vm, then start > + vm with the following command:: > + > + qemu-system-x86_64 -enable-kvm -m 16G -vnc :20 \ > + -smp cores=3D10,sockets=3D1 -cpu host -hda ./u18.img \ > + -device e1000,netdev=3Dnet1,mac=3D00:01:02:33:44:22 \ > + -netdev user,id=3Dnet1,hostfwd=3Dtcp:10.67.119.144:6666-:22 \ > + -device e1000,netdev=3Dnet2,mac=3D00:01:02:33:44:33 \ > + -netdev user,id=3Dnet2,hostfwd=3Dtcp:10.67.119.144:7777-:23 \ > + -monitor stdio > + > + Login vm, get the pci device id of the e1000 emulated device, > + assume it is 0000:00:03.0, bind it to igb_uio driver, and then > + start testpmd:: > + > + ./usertools/dpdk-devbind.py -b igb_uio 0000:00:03.0 > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -- -i > + > + testpmd-> set fwd mac > + testpmd-> start > + > + check port info:: > + > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: up > + Link speed: 1000 Mbps > + > + verify that the link status is up. > + > +2. Stop and start port (not support):: > + > + testpmd> stop > + testpmd> port stop all > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: down > + Link speed: 0 Mbps > + > + verify that the link status is down. > + > + Then start the port:: > + > + testmd-> port start all > + testpmd> start > + > + check the port info:: > + > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: up > + Link speed: 10000 Mbps > + > + verify that the link status is up. > + > +3. Reset the port (not support):: > + > + testpmd> stop > + testpmd> port stop all > + testpmd> port reset all > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: down > + Link speed: 0 Mbps > + > + verify that the link status is down. > + > + Then start the port:: > + > + testpmd> port start all > + testpmd> start > + > + check the port info:: > + > + testpmd> show port info all > + > + ********************* Infos for port 0 ********************* > + Link status: up > + Link speed: 10000 Mbps > + > + verify that the link status is up. > + > +4. Close the port:: > + > + testpmd> stop > + testpmd> port stop all > + testpmd> port close all > + > + check the port info:: > + > + testpmd> show port info all > + testpmd> > + > + verify that there is no output after executing this command. > -- > 2.17.1