From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 06D251B053 for ; Tue, 10 Jul 2018 03:16:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 18:16:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,332,1526367600"; d="scan'208";a="53182106" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga007.fm.intel.com with ESMTP; 09 Jul 2018 18:16:46 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Jul 2018 18:16:46 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.100]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Tue, 10 Jul 2018 09:16:44 +0800 From: "Liu, Yong" To: "Zhao, MeijuanX" , "dts@dpdk.org" CC: "Zhao, MeijuanX" Thread-Topic: [dts] [PATCH V2 2/2] test_plan:add dpdk pf test scenario Thread-Index: AQHUAhvvsdOF64AlC0+53OCGqDKtbqSH0Kng Date: Tue, 10 Jul 2018 01:16:44 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E630F5899@SHSMSX103.ccr.corp.intel.com> References: <1528787206-53913-1-git-send-email-meijuanx.zhao@intel.com> <1528787206-53913-2-git-send-email-meijuanx.zhao@intel.com> In-Reply-To: <1528787206-53913-2-git-send-email-meijuanx.zhao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWQwOWQyNmUtMzEzOC00YWI3LTk3MGYtOTBlZmNhNDhhOGIxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWnAwXC9GeVN2ZHJkYjdPWVdcL3R4WWYrdUFXXC9JbjFnU01Db1dWcktiMHowREF5ckd1RWU3QXFkOXpnbFFBbExIVSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action 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 2/2] test_plan:add dpdk pf test scenario 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, 10 Jul 2018 01:16:52 -0000 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhao,meijuan > Sent: Tuesday, June 12, 2018 3:07 PM > To: dts@dpdk.org > Cc: Zhao, MeijuanX > Subject: [dts] [PATCH V2 2/2] test_plan:add dpdk pf test scenario >=20 > add dpdk pf and dpdk vf test scenario >=20 > Signed-off-by: zhao,meijuan > --- > test_plans/vf_packet_rxtx_test_plan.rst | 232 > +++++++++++++++++++++++++++++++- > 1 file changed, 227 insertions(+), 5 deletions(-) >=20 > diff --git a/test_plans/vf_packet_rxtx_test_plan.rst > b/test_plans/vf_packet_rxtx_test_plan.rst > index 0df9984..a66080c 100644 > --- a/test_plans/vf_packet_rxtx_test_plan.rst > +++ b/test_plans/vf_packet_rxtx_test_plan.rst > @@ -41,7 +41,7 @@ Test Case 1: VF_packet_IO_kernel_PF_dpdk_VF >=20 > 1. Got the pci device id of DUT, for example:: >=20 > - ./dpdk_nic_bind.py --st > + ./usertools/dpdk-devbind.py -s >=20 > 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Di40e unused=3D > 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > @@ -50,7 +50,7 @@ Test Case 1: VF_packet_IO_kernel_PF_dpdk_VF >=20 Meijuan, Please naming test case with same format, we'd like to use meaningful sente= nce for test case name. Eg. This case name will be better like "dpdk VF packet IO with kernel PF". > echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/sriov_numvfs > echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/sriov_numvfs > - ./dpdk_nic_bind.py --st > + ./usertools/dpdk-devbind.py -s >=20 > 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Di40e unused=3D > 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > @@ -76,7 +76,7 @@ Test Case 1: VF_packet_IO_kernel_PF_dpdk_VF > virsh nodedev-detach pci_0000_81_02_0; > virsh nodedev-detach pci_0000_81_0a_0; >=20 > - ./dpdk_nic_bind.py --st > + ./usertools/dpdk-devbind.py -s >=20 > 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Di40e unused=3D > 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > @@ -95,12 +95,234 @@ Test Case 1: VF_packet_IO_kernel_PF_dpdk_VF > 5. Login vm0, got VFs pci device id in vm0, assume they are 00:06.0 & > 00:07.0, bind them to igb_uio driver, > and then start testpmd, set it in mac forward mode:: >=20 > - ./tools/dpdk_nic_bind.py --bind=3Digb_uio 00:06.0 00:07.0 > + ./usertools/dpdk-devbind.py --bind=3Digb_uio 00:06.0 00:07.0 > ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x0f -n 4 -w 00:06.0 -= w > 00:07.0 \ > - -- -i --portmask=3D0x3 --= tx- > offloads=3D0x8fff > + -- -i >=20 > testpmd> set fwd mac > testpmd> start >=20 > 6. Get mac address of one VF and use it as dest mac, using scapy to send > 2000 random packets from tester, > verify the packets can be received by one VF and can be forward to > another VF correctly. > + > + > +Test Case 2: VF_packet_IO_dpdk_PF_dpdk_VF > +=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. Got the pci device id of DUT, for example:: > + > + ./usertools/dpdk-devbind.py -s > + > + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Di40e unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > + > +2. bind pf to igb_uio and Create 2 VFs from 2 PFs:: > + > + ./usertools/dpdk-devbind.py --bind=3Digb_uio 0000:81:00.0 > 0000:81:00.1 > + echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs > + echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/max_vfs > + > +3. Detach VFs from the host, bind them to pci-stub driver:: > + > + /sbin/modprobe pci-stub > + > + using `lspci -nn|grep -i ethernet` got VF device id, for example > "8086 154c", > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:02.0 > /sys/bus/pci/devices/0000:08:02.0/driver/unbin= d > + echo 0000:81:02.0 > /sys/bus/pci/drivers/pci-stub/bind > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:0a.0 > /sys/bus/pci/devices/0000:08:0a.0/driver/unbin= d > + echo 0000:81:0a.0 > /sys/bus/pci/drivers/pci-stub/bind > + > + or using the following more easy way:: > + > + virsh nodedev-detach pci_0000_81_02_0; > + virsh nodedev-detach pci_0000_81_0a_0; > + > + ./usertools/dpdk-devbind.py -s > + > + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Di40e unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > + 0000:81:02.0 'XL710/X710 Virtual Function' if=3D drv=3Dpci-stub un= used=3D > + 0000:81:0a.0 'XL710/X710 Virtual Function' if=3D drv=3Dpci-stub un= used=3D > + > + it can be seen that VFs 81:02.0 & 81:0a.0 's drv is pci-stub. > +4. Start testpmd on host:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x3e -n 4 -b > 0000:81:02.0 -b 0000:81:0a.0 -- -i Please remove target from test plan. > + > +5. Passthrough VFs 81:02.0 & 81:0a.0 to vm0, and start vm0:: > + > + /usr/bin/qemu-system-x86_64 -name vm0 -enable-kvm \ > + -cpu host -smp 4 -m 2048 -drive file=3D/home/image/sriov-fc20-1.im= g - > vnc :1 \ > + -device pci-assign,host=3D81:02.0,id=3Dpt_0 \ > + -device pci-assign,host=3D81:0a.0,id=3Dpt_1 > + Please remove "/usr/bin" as this is system default path. > +6. Login vm0, got VFs pci device id in vm0, assume they are 00:06.0 & > 00:07.0, bind them to igb_uio driver, > + and then start testpmd, set it in mac forward mode:: Please use multiple lines for this sentence, try to keep each line in 79 ch= aracters.=20 > + > + ./usertools/dpdk-devbind.py --bind=3Digb_uio 00:06.0 00:07.0 > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x0f -n 4 -w 00:06.0 -= w > 00:07.0 \ > + -- -i > + Please remove target. > + testpmd> set fwd mac > + testpmd> start > + > +7. Get mac address of one VF and use it as dest mac, using scapy to send > 2000 random packets from tester, > + verify the packets can be received by one VF and can be forward to > another VF correctly. > + > +Test Case 3: dpdk control pf and vf reset > +=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 > +this case pf in dpdk > +=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. Got the pci device id of DUT, for example:: > + > + ./usertools/dpdk-devbind.py -s > + > + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Di40e unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > + > +2. bind pf to igb_uio and Create 3 VFs from pf0:: > + > + ./usertools/dpdk-devbind.py --bind=3Digb_uio 0000:81:00.0 > + echo 3 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs > + > + > +3. Detach VFs from the host, bind them to pci-stub driver:: > + > + /sbin/modprobe pci-stub > + > + using `lspci -nn|grep -i ethernet` got VF device id, for example > "8086 154c", > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:02.0 > /sys/bus/pci/devices/0000:08:02.0/driver/unbin= d > + echo 0000:81:02.0 > /sys/bus/pci/drivers/pci-stub/bind > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:02.1 > /sys/bus/pci/devices/0000:08:02.1/driver/unbin= d > + echo 0000:81:02.1 > /sys/bus/pci/drivers/pci-stub/bind > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:02.2 > /sys/bus/pci/devices/0000:08:02.2/driver/unbin= d > + echo 0000:81:02.2 > /sys/bus/pci/drivers/pci-stub/bind > + > + > + it can be seen that VFs 81:02.0 & 81:02.1 & 81:02.2 's drv is pci-stu= b. > +4. Start testpmd on host:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x600000000006 -n 4 -= b > 0000:81:02.0 -b 0000:81:02.1 -b 0000:81:02.2 -- -i > + > +5. Passthrough VFs 81:02.0 & 81:02.1 to vm0, and start vm0:: > + > + /usr/bin/qemu-system-x86_64 -name vm0 -enable-kvm \ > + -cpu host -smp 4 -m 2048 -drive file=3D/home/image/sriov-fc20-1.im= g - > vnc :1 \ > + -device pci-assign,host=3D81:02.0,id=3Dpt_0 \ > + -device pci-assign,host=3D81:02.1,id=3Dpt_1 > +6. Passthrough VFs 81:02.2 to vm1, and start vm1:: > + > + /usr/bin/qemu-system-x86_64 -name vm0 -enable-kvm \ > + -cpu host -smp 4 -m 2048 -drive file=3D/home/image/sriov-fc20-2.im= g - > vnc :2 \ > + -device pci-assign,host=3D81:02.2,id=3Dpt_0 > + > +7. Login vm0 and vm1, got VFs pci device id in vm0 and vm1, assume they > are 00:04.0 & 00:05.0 on vm0,00:04.0 on vm1, bind them to igb_uio > driver,for vm0:: > + > + ./usertools/dpdk-devbind.py --bind=3Digb_uio 00:04.0 00:05.0 > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 1 -- -i > + testpmd> set fwd mac > + testpmd> start > +8. On vm 1:: > + > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 1 -- -i > + > +9. On vm0:: > + > + testpmd>clear port stats all > + > +10. Tester loop send packet to vf0 on vm0 > + > +11. On vm1 loop start stop port 1000 times:: > + > + testpmd>port stop all > + testpmd>port start all > + > +12. Tester stop send packet > + > +13. On vm0,check port stats,verify vf0 vf1 can receive packet ,no error > + > + > +Test Case 4: kernel pf dpdk vf reset > +=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 > +this case pf in kernel > +=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 Please remove duplicated header in this test plan, you can move second line= into test description. And I think this information can be included in test case name like "dpdk V= F reset with kernel driver PF". > + > +1. Got the pci device id of DUT, for example:: > + > + ./usertools/dpdk-devbind.py -s > + > + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Di40e unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > + > +2. bind pf to igb_uio and Create 3 VFs from pf0:: > + > + echo 3 > /sys/bus/pci/devices/0000\:81\:00.0/sriov_nums > + > + > +3. Detach VFs from the host, bind them to pci-stub driver:: > + > + /sbin/modprobe pci-stub > + > + using `lspci -nn|grep -i ethernet` got VF device id, for example > "8086 154c", > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:02.0 > /sys/bus/pci/devices/0000:08:02.0/driver/unbin= d > + echo 0000:81:02.0 > /sys/bus/pci/drivers/pci-stub/bind > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:02.1 > /sys/bus/pci/devices/0000:08:02.1/driver/unbin= d > + echo 0000:81:02.1 > /sys/bus/pci/drivers/pci-stub/bind > + > + echo "8086 154c" > /sys/bus/pci/drivers/pci-stub/new_id > + echo 0000:81:02.2 > /sys/bus/pci/devices/0000:08:02.2/driver/unbin= d > + echo 0000:81:02.2 > /sys/bus/pci/drivers/pci-stub/bind > + > + > + it can be seen that VFs 81:02.0 & 81:02.1 & 81:02.2 's drv is pci-stu= b. > + > +4. Passthrough VFs 81:02.0 & 81:02.1 to vm0, and start vm0:: > + > + /usr/bin/qemu-system-x86_64 -name vm0 -enable-kvm \ > + -cpu host -smp 4 -m 2048 -drive file=3D/home/image/sriov-fc20-1.im= g - > vnc :1 \ > + -device pci-assign,host=3D81:02.0,id=3Dpt_0 \ > + -device pci-assign,host=3D81:02.1,id=3Dpt_1 > +5. Passthrough VFs 81:02.2 to vm1, and start vm1:: > + > + /usr/bin/qemu-system-x86_64 -name vm0 -enable-kvm \ > + -cpu host -smp 4 -m 2048 -drive file=3D/home/image/sriov-fc20-2.im= g - > vnc :2 \ > + -device pci-assign,host=3D81:02.2,id=3Dpt_0 > + > +6. Login vm0 and vm1, got VFs pci device id in vm0 and vm1, assume they > are 00:04.0 & 00:05.0 on vm0,00:04.0 on vm1, bind them to igb_uio > driver,for vm0:: > + > + ./usertools/dpdk-devbind.py --bind=3Digb_uio 00:04.0 00:05.0 > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 1 -- -i > + testpmd> set fwd mac > + testpmd> start > +7. On vm 1:: > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 1 -- -i > + > +8. On vm0:: > + > + testpmd>clear port stats all > + > +9. Tester loop send packet to vf0 on vm0 > + > +10. On vm1 loop start stop port 1000 times:: > + > + testpmd>port stop all > + testpmd>port start all > + > +11. Tester stop send packet > + > +12. On vm0,check port stats,verify vf0 vf1 can receive packet ,no error > -- > 1.9.3