From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2BE44C4FE for ; Tue, 28 Apr 2015 11:08:27 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 28 Apr 2015 02:08:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,662,1422950400"; d="scan'208";a="562959311" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by orsmga003.jf.intel.com with ESMTP; 28 Apr 2015 02:08:26 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 28 Apr 2015 17:08:10 +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:08:09 +0800 From: "Qiu, Michael" To: "Liu, Yong" Thread-Topic: [PATCH v2] test_plan: add hotplug_test_plan Thread-Index: AQHQViZvPEBTI59H0k+aItFpqFnGJA== Date: Tue, 28 Apr 2015 09:08:08 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E6028604669161@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> 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:08:28 -0000 Hi, Marvin=0A= =0A= What about this patch? It is hotplug test plan.=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 3/4/2015 10:53 AM, Qiu, Michael wrote:=0A= > As hotplug feature will be supported by DPDK 2.0, the test plan=0A= > is needed for testing affairs, this could help who wants to do=0A= > hotplug testing for their projects.=0A= >=0A= > Signed-off-by: Michael Qiu =0A= > ---=0A= > v2 --> v1:=0A= > Fix typos.=0A= > Add new cases=0A= > Make steps much more clearly=0A= >=0A= > test_plans/hotplug_test_plan.rst | 316 +++++++++++++++++++++++++++++++++= ++++++=0A= > 1 file changed, 316 insertions(+)=0A= > create mode 100644 test_plans/hotplug_test_plan.rst=0A= >=0A= > diff --git a/test_plans/hotplug_test_plan.rst b/test_plans/hotplug_test_p= lan.rst=0A= > new file mode 100644=0A= > index 0000000..0ef329d=0A= > --- /dev/null=0A= > +++ b/test_plans/hotplug_test_plan.rst=0A= > @@ -0,0 +1,316 @@=0A= > +.. Copyright (c) <2015>, Intel Corporation=0A= > + All rights reserved.=0A= > +=0A= > + Redistribution and use in source and binary forms, with or without=0A= > + modification, are permitted provided that the following conditions=0A= > + are met:=0A= > +=0A= > + - Redistributions of source code must retain the above copyright=0A= > + notice, this list of conditions and the following disclaimer.=0A= > +=0A= > + - Redistributions in binary form must reproduce the above copyright= =0A= > + notice, this list of conditions and the following disclaimer in=0A= > + the documentation and/or other materials provided with the=0A= > + distribution.=0A= > +=0A= > + - Neither the name of Intel Corporation nor the names of its=0A= > + contributors may be used to endorse or promote products derived=0A= > + from this software without specific prior written permission.=0A= > +=0A= > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS= =0A= > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT=0A= > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS=0A= > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE=0A= > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,= =0A= > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES=0A= > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR=0A= > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A= > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,= =0A= > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)=0A= > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED= =0A= > + OF THE POSSIBILITY OF SUCH DAMAGE.=0A= > +=0A= > +=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=0A= > +DPDK Hotplug API Feature Tests=0A= > +=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=0A= > +=0A= > +This test for Hotplug API feature can be run on linux userspace. It=0A= > +will check if NIC port can be attached and detached without exiting the= =0A= > +application process. Furthermore, it will check if it can reconfigure=0A= > +new configurations for a port after the port is stopped, and if it is=0A= > +able to restart with those new configurations. It is based on testpmd=0A= > +application.=0A= > +=0A= > +The test is performed by running the testpmd application and using a=0A= > +traffic generator. Port configurations can be set interactively,=0A= > +and still be set at the command line when launching the application in= =0A= > +order to be compatible with previous test framework.=0A= > +=0A= > +Prerequisites=0A= > +-------------=0A= > +Assume DPDK managed at least one device for physical or none for virtual= .=0A= > +This feature only supports igb_uio now, for uio_pci_generic is=0A= > +on the way, will test it after enabled.=0A= > +=0A= > +To run the testpmd application in linuxapp environment with 4 lcores,=0A= > +4 channels with other default parameters in interactive mode.=0A= > +=0A= > + $ ./testpmd -c 0xf -n 4 -- -i=0A= > +=0A= > +Test ENV:=0A= > +=0A= > +All test cases can be run in 32bit and 64bit platform.=0A= > +=0A= > +OS support: Fedora, Ubuntu, RHEL, SUSE, but freebsd will not be=0A= > +included as hotplug has no plan to support that platform=0A= > +=0A= > +All kernel version(from 2.6) can be support, for vfio need kernel=0A= > + version greater than 3.6.=0A= > +=0A= > +Virtualization support: KVM/VMware/Xen, container is in the roadmap=0A= > +=0A= > +------------------------------------------------------------------------= -------=0A= > +Test Case 1: port detach & attach for physical devices with igb_uio=0A= > +------------------------------------------------------------------------= -------=0A= > +=0A= > +1. Start testpmd=0A= > + $ ./testpmd -c 0xf -n 4 -- -i=0A= > +=0A= > +2. Bind new physical port to igb_uio(assume BDF 0000:02:00.0)=0A= > + # ./tools/dpdk_nic_bind -b igb_uio 0000:02:00.0=0A= > +=0A= > +=0A= > +3. Attach port 0=0A= > + run "port attach 0000:02:00.0"=0A= > +=0A= > + run "port start 0"=0A= > +=0A= > + run "show port info 0", check port 0 info display.=0A= > +=0A= > +4. Check package forwarding when startup=0A= > +=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +5. Detach port 0 after port closed=0A= > + run "port stop 0"=0A= > +=0A= > + run "port close 0".=0A= > +=0A= > + run "port detach 0", check port detached successful.=0A= > +=0A= > +6. Re-attach port 0(assume BDF 0000:02:00.0)=0A= > + run "port attach 0000:02:00.0",=0A= > +=0A= > + run "port start 0".=0A= > +=0A= > + run "show port info 0", check port 0 info display.=0A= > +=0A= > +7. Check package forwarding after re-attach=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +------------------------------------------------------------------------= -------=0A= > +Test Case 2: port dettach & attach for physical devices with vfio=0A= > +------------------------------------------------------------------------= -------=0A= > +=0A= > +1. Start testpmd=0A= > + $ ./testpmd -c 0xf -n 4 -- -i=0A= > +=0A= > +2. Bind new physical port to igb_uio(assume BDF 0000:02:00.0)=0A= > + # ./tools/dpdk_nic_bind -b vfio-pci 0000:02:00.0=0A= > +=0A= > +3. Attach port 0(assume BDF 0000:02:00.0)=0A= > + run "port attach 0000:02:00.0"=0A= > +=0A= > + run "port start 0"=0A= > +=0A= > + run "show port info 0", check port 0 info display.=0A= > +=0A= > +4. Detach port 0 after port closed=0A= > + run "port stop 0", then "show port stats 0", check port stopped.=0A= > +=0A= > + run "port close 0".=0A= > +=0A= > + run "port detach 0", check detach status(should fail as no detach=0A= > + support at the moment for vfio).=0A= > +=0A= > +------------------------------------------------------------------------= -------=0A= > +Test Case 3: port detach & attach for physical devices with uio_pci_gene= ric=0A= > + This case should be enabled after uio_pci_generic enabled f= or DPDK=0A= > +------------------------------------------------------------------------= -------=0A= > +=0A= > +1. Start testpmd=0A= > + $ ./testpmd -c 0xf -n 4 -- -i=0A= > +=0A= > +2. Bind new physical port to igb_uio(assume BDF 0000:02:00.0)=0A= > + # ./tools/dpdk_nic_bind -b uio_pci_generic 0000:02:00.0=0A= > +=0A= > +3. Attach port 0(assume BDF 0000:02:00.0)=0A= > + run "port attach 0000:02:00.0"=0A= > +=0A= > + run "port start 0"=0A= > +=0A= > + run "show port info 0", check port 0 info display.=0A= > +=0A= > +4. Check package forwarding when startup=0A= > +=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +5. Detach port 0 after port closed=0A= > + run "port stop 0"=0A= > +=0A= > + run "port close 0".=0A= > +=0A= > + run "port detach 0", check port detached successful.=0A= > +=0A= > +6. Re-attach port 0(assume BDF is 0000:02:00.0)=0A= > + run "port attach 0000:02:00.0",=0A= > +=0A= > + run "port start 0".=0A= > +=0A= > + run "show port info 0", check port 0 info display.=0A= > +=0A= > +7. Check package forwarding after re-attach=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +------------------------------------------------------------------------= -------=0A= > +Test Case 4: port detach & attach for physical devices with igb_uio=0A= > + Bind driver before testpmd started, port will start automat= ically=0A= > +------------------------------------------------------------------------= -------=0A= > +=0A= > +1. Bind new physical port to igb_uio(assume BDF 0000:02:00.0)=0A= > + # ./tools/dpdk_nic_bind -b uio_pci_generic 0000:02:00.0=0A= > +=0A= > +2. Start testpmd=0A= > + $ ./testpmd -c 0xf -n 4 -- -i=0A= > +=0A= > +3. Check package forwarding when startup=0A= > +=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +4. Detach port 0 after port closed=0A= > + run "port stop 0"=0A= > +=0A= > + run "port close 0".=0A= > +=0A= > + run "port detach 0", check port detached successful.=0A= > +=0A= > +5. Re-attach port 0(assume BDF 0000:02:00.0)=0A= > + run "port attach 0000:02:00.0",=0A= > +=0A= > + run "port start 0".=0A= > +=0A= > + run "show port info 0", check port 0 info display.=0A= > +=0A= > +6. Check package forwarding after re-attach=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +------------------------------------------------------------------------= -------=0A= > +Test Case 5: port detach & attach for virtual devices=0A= > +------------------------------------------------------------------------= -------=0A= > +=0A= > +1. Start testpmd=0A= > + $ ./testpmd -c 0xf -n 4 -- -i=0A= > +=0A= > +2. Attach virtual device as port 0=0A= > + run "port attach eth_pcap0,iface=3Dxxxx", where "xxxx" is one workab= le ifname.=0A= > +=0A= > + run "port start 0".=0A= > +=0A= > + run "show port info 0", check port 0 info display correctly.=0A= > +=0A= > +3. Check package forwarding after port start=0A= > +=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +4. Detach port 0 after port closed=0A= > +=0A= > + run "port stop 0".=0A= > +=0A= > + run "port close 0".=0A= > +=0A= > + run "port detach 0", check port detached successful.=0A= > +=0A= > +5. Re-attach port 0=0A= > +=0A= > + run "port attach eth_pcap0,iface=3Dxxxx", where "xxxx" is one workab= le ifname.=0A= > +=0A= > + run "port start 0".=0A= > +=0A= > + run "show port info 0", check port 0 info display correctly.=0A= > +=0A= > +6. Check package forwarding after port start=0A= > +=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +------------------------------------------------------------------------= -------=0A= > +Test Case 6: port detach & attach for virtual devices, with "--vdev"=0A= > +------------------------------------------------------------------------= -------=0A= > +=0A= > +1. Start testpmd, ""xxxx" is one workable ifname=0A= > + $ ./testpmd -c 0xf -n 4 --vdev "eth_pcap0,iface=3Dxxxx" -- -i=0A= > +=0A= > +2. Check package forwarding after port start=0A= > +=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +3. Detach port 0 after port closed=0A= > +=0A= > + run "port stop 0".=0A= > +=0A= > + run "port close 0".=0A= > +=0A= > + run "port detach 0", check port detached successful.=0A= > +=0A= > +4. Re-attach port 0=0A= > +=0A= > + run "port attach eth_pcap0,iface=3Dxxxx", where "xxxx" is one workab= le ifname.=0A= > +=0A= > + run "port start 0".=0A= > +=0A= > + run "show port info 0", check port 0 info display correctly.=0A= > +=0A= > +5. Check package forwarding after port start=0A= > +=0A= > + run "start", then "show port stats 0" check forwarding packages star= t.=0A= > +=0A= > + run "port detach 0", check the error message of port not stopped.=0A= > +=0A= > + run "stop", then "show port stats 0", check forwarding packages stop= ped.=0A= > +=0A= > +successfully=0A= =0A=