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 B74F2C4FE for ; Tue, 28 Apr 2015 11:34:37 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 28 Apr 2015 02:34:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,662,1422950400"; d="scan'208";a="562968532" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by orsmga003.jf.intel.com with ESMTP; 28 Apr 2015 02:34:35 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 28 Apr 2015 17:34:34 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.107]) by shsmsx102.ccr.corp.intel.com ([10.239.4.154]) with mapi id 14.03.0224.002; Tue, 28 Apr 2015 17:34:33 +0800 From: "Qiu, Michael" To: "Liu, Yong" Thread-Topic: [PATCH v2] test_plan: add hotplug_test_plan Thread-Index: AQHQViZvPEBTI59H0k+aItFpqFnGJJ1h+fyAgACGS1A= Date: Tue, 28 Apr 2015 09:34:32 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028604669207@SHSMSX101.ccr.corp.intel.com> References: <1422866813-23729-1-git-send-email-michael.qiu@intel.com> <1425437615-19996-1-git-send-email-michael.qiu@intel.com> <533710CFB86FA344BFBF2D6802E6028604669161@SHSMSX101.ccr.corp.intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E10DD3775@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E10DD3775@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dts@dpdk.org" Subject: Re: [dts] [PATCH v2] test_plan: add hotplug_test_plan 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: Tue, 28 Apr 2015 09:34:38 -0000 Actually, automation depends on free time slot of mine. Thanks, Michael -----Original Message----- From: Liu, Yong=20 Sent: Tuesday, April 28, 2015 5:32 PM To: Qiu, Michael Cc: dts@dpdk.org Subject: RE: [PATCH v2] test_plan: add hotplug_test_plan Michael, This test plan is fine for me. Do we have done the internal code review thu= s can make sure there's no gap in this plan. And do you have schedule for corresponding test suite, look like most of ca= ses in this plan can be automated. =20 > -----Original Message----- > From: Qiu, Michael > Sent: Tuesday, April 28, 2015 5:08 PM > To: Liu, Yong > Cc: dts@dpdk.org > Subject: Re: [PATCH v2] test_plan: add hotplug_test_plan >=20 > Hi, Marvin >=20 > What about this patch? It is hotplug test plan. >=20 > Thanks, > Michael >=20 > On 3/4/2015 10:53 AM, Qiu, Michael wrote: > > As hotplug feature will be supported by DPDK 2.0, the test plan is=20 > > needed for testing affairs, this could help who wants to do hotplug=20 > > testing for their projects. > > > > Signed-off-by: Michael Qiu > > --- > > v2 --> v1: > > Fix typos. > > Add new cases > > Make steps much more clearly > > > > test_plans/hotplug_test_plan.rst | 316 > +++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 316 insertions(+) > > create mode 100644 test_plans/hotplug_test_plan.rst > > > > diff --git a/test_plans/hotplug_test_plan.rst > b/test_plans/hotplug_test_plan.rst > > new file mode 100644 > > index 0000000..0ef329d > > --- /dev/null > > +++ b/test_plans/hotplug_test_plan.rst > > @@ -0,0 +1,316 @@ > > +.. Copyright (c) <2015>, 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=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > +DPDK Hotplug API Feature Tests > > +=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 > > + > > +This test for Hotplug API feature can be run on linux userspace. It=20 > > +will check if NIC port can be attached and detached without exiting=20 > > +the application process. Furthermore, it will check if it can=20 > > +reconfigure new configurations for a port after the port is=20 > > +stopped, and if it is able to restart with those new=20 > > +configurations. It is based on testpmd application. > > + > > +The test is performed by running the testpmd application and using=20 > > +a traffic generator. Port configurations can be set interactively,=20 > > +and still be set at the command line when launching the application=20 > > +in order to be compatible with previous test framework. > > + > > +Prerequisites > > +------------- > > +Assume DPDK managed at least one device for physical or none for > virtual. > > +This feature only supports igb_uio now, for uio_pci_generic is on=20 > > +the way, will test it after enabled. > > + > > +To run the testpmd application in linuxapp environment with 4=20 > > +lcores, > > +4 channels with other default parameters in interactive mode. > > + > > + $ ./testpmd -c 0xf -n 4 -- -i > > + > > +Test ENV: > > + > > +All test cases can be run in 32bit and 64bit platform. > > + > > +OS support: Fedora, Ubuntu, RHEL, SUSE, but freebsd will not be=20 > > +included as hotplug has no plan to support that platform > > + > > +All kernel version(from 2.6) can be support, for vfio need kernel > > + version greater than 3.6. > > + > > +Virtualization support: KVM/VMware/Xen, container is in the roadmap > > + > > +------------------------------------------------------------------- > > +---- > -------- > > +Test Case 1: port detach & attach for physical devices with igb_uio > > +------------------------------------------------------------------- > > +---- > -------- > > + > > +1. Start testpmd > > + $ ./testpmd -c 0xf -n 4 -- -i > > + > > +2. Bind new physical port to igb_uio(assume BDF 0000:02:00.0) > > + # ./tools/dpdk_nic_bind -b igb_uio 0000:02:00.0 > > + > > + > > +3. Attach port 0 > > + run "port attach 0000:02:00.0" > > + > > + run "port start 0" > > + > > + run "show port info 0", check port 0 info display. > > + > > +4. Check package forwarding when startup > > + > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +5. Detach port 0 after port closed > > + run "port stop 0" > > + > > + run "port close 0". > > + > > + run "port detach 0", check port detached successful. > > + > > +6. Re-attach port 0(assume BDF 0000:02:00.0) > > + run "port attach 0000:02:00.0", > > + > > + run "port start 0". > > + > > + run "show port info 0", check port 0 info display. > > + > > +7. Check package forwarding after re-attach > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +------------------------------------------------------------------- > > +---- > -------- > > +Test Case 2: port dettach & attach for physical devices with vfio > > +------------------------------------------------------------------- > > +---- > -------- > > + > > +1. Start testpmd > > + $ ./testpmd -c 0xf -n 4 -- -i > > + > > +2. Bind new physical port to igb_uio(assume BDF 0000:02:00.0) > > + # ./tools/dpdk_nic_bind -b vfio-pci 0000:02:00.0 > > + > > +3. Attach port 0(assume BDF 0000:02:00.0) > > + run "port attach 0000:02:00.0" > > + > > + run "port start 0" > > + > > + run "show port info 0", check port 0 info display. > > + > > +4. Detach port 0 after port closed > > + run "port stop 0", then "show port stats 0", check port stopped. > > + > > + run "port close 0". > > + > > + run "port detach 0", check detach status(should fail as no detach > > + support at the moment for vfio). > > + > > +------------------------------------------------------------------- > > +---- > -------- > > +Test Case 3: port detach & attach for physical devices with > uio_pci_generic > > + This case should be enabled after uio_pci_generic=20 > > + enabled > for DPDK > > +------------------------------------------------------------------- > > +---- > -------- > > + > > +1. Start testpmd > > + $ ./testpmd -c 0xf -n 4 -- -i > > + > > +2. Bind new physical port to igb_uio(assume BDF 0000:02:00.0) > > + # ./tools/dpdk_nic_bind -b uio_pci_generic 0000:02:00.0 > > + > > +3. Attach port 0(assume BDF 0000:02:00.0) > > + run "port attach 0000:02:00.0" > > + > > + run "port start 0" > > + > > + run "show port info 0", check port 0 info display. > > + > > +4. Check package forwarding when startup > > + > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +5. Detach port 0 after port closed > > + run "port stop 0" > > + > > + run "port close 0". > > + > > + run "port detach 0", check port detached successful. > > + > > +6. Re-attach port 0(assume BDF is 0000:02:00.0) > > + run "port attach 0000:02:00.0", > > + > > + run "port start 0". > > + > > + run "show port info 0", check port 0 info display. > > + > > +7. Check package forwarding after re-attach > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +------------------------------------------------------------------- > > +---- > -------- > > +Test Case 4: port detach & attach for physical devices with igb_uio > > + Bind driver before testpmd started, port will start > automatically > > +------------------------------------------------------------------- > > +---- > -------- > > + > > +1. Bind new physical port to igb_uio(assume BDF 0000:02:00.0) > > + # ./tools/dpdk_nic_bind -b uio_pci_generic 0000:02:00.0 > > + > > +2. Start testpmd > > + $ ./testpmd -c 0xf -n 4 -- -i > > + > > +3. Check package forwarding when startup > > + > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +4. Detach port 0 after port closed > > + run "port stop 0" > > + > > + run "port close 0". > > + > > + run "port detach 0", check port detached successful. > > + > > +5. Re-attach port 0(assume BDF 0000:02:00.0) > > + run "port attach 0000:02:00.0", > > + > > + run "port start 0". > > + > > + run "show port info 0", check port 0 info display. > > + > > +6. Check package forwarding after re-attach > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +------------------------------------------------------------------- > > +---- > -------- > > +Test Case 5: port detach & attach for virtual devices > > +------------------------------------------------------------------- > > +---- > -------- > > + > > +1. Start testpmd > > + $ ./testpmd -c 0xf -n 4 -- -i > > + > > +2. Attach virtual device as port 0 > > + run "port attach eth_pcap0,iface=3Dxxxx", where "xxxx" is one > workable ifname. > > + > > + run "port start 0". > > + > > + run "show port info 0", check port 0 info display correctly. > > + > > +3. Check package forwarding after port start > > + > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +4. Detach port 0 after port closed > > + > > + run "port stop 0". > > + > > + run "port close 0". > > + > > + run "port detach 0", check port detached successful. > > + > > +5. Re-attach port 0 > > + > > + run "port attach eth_pcap0,iface=3Dxxxx", where "xxxx" is one > workable ifname. > > + > > + run "port start 0". > > + > > + run "show port info 0", check port 0 info display correctly. > > + > > +6. Check package forwarding after port start > > + > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +------------------------------------------------------------------- > > +---- > -------- > > +Test Case 6: port detach & attach for virtual devices, with "--vdev" > > +------------------------------------------------------------------- > > +---- > -------- > > + > > +1. Start testpmd, ""xxxx" is one workable ifname > > + $ ./testpmd -c 0xf -n 4 --vdev "eth_pcap0,iface=3Dxxxx" -- -i > > + > > +2. Check package forwarding after port start > > + > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +3. Detach port 0 after port closed > > + > > + run "port stop 0". > > + > > + run "port close 0". > > + > > + run "port detach 0", check port detached successful. > > + > > +4. Re-attach port 0 > > + > > + run "port attach eth_pcap0,iface=3Dxxxx", where "xxxx" is one > workable ifname. > > + > > + run "port start 0". > > + > > + run "show port info 0", check port 0 info display correctly. > > + > > +5. Check package forwarding after port start > > + > > + run "start", then "show port stats 0" check forwarding packages > start. > > + > > + run "port detach 0", check the error message of port not stopped. > > + > > + run "stop", then "show port stats 0", check forwarding packages > stopped. > > + > > +successfully