test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 1/2] tests/vf packet rxtx:add dpdk pf test scenorio
@ 2018-11-21  5:46 zhao,meijuan
  2018-11-21  5:46 ` [dts] [PATCH V1 2/2] test_plans/vf " zhao,meijuan
  2018-11-22  9:42 ` [dts] [PATCH V1 1/2] tests/vf " Tu, Lijuan
  0 siblings, 2 replies; 4+ messages in thread
From: zhao,meijuan @ 2018-11-21  5:46 UTC (permalink / raw)
  To: dts; +Cc: zhao,meijuan

Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
 tests/TestSuite_vf_packet_rxtx.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
index 6a29d23..c56bdd7 100644
--- a/tests/TestSuite_vf_packet_rxtx.py
+++ b/tests/TestSuite_vf_packet_rxtx.py
@@ -61,7 +61,6 @@ class TestVfPacketRxtx(TestCase):
             vf0_prop = {'opt_host': self.sriov_vfs_port_0[0].pci}
             vf1_prop = {'opt_host': self.sriov_vfs_port_1[0].pci}
 
-
             if driver == 'igb_uio':
                 # start testpmd without the two VFs on the host
                 self.host_testpmd = PmdOutput(self.dut)
@@ -252,10 +251,16 @@ class TestVfPacketRxtx(TestCase):
 
         self.setup_3vf_2vm_env_flag = 0
 
-    def test_vf_reset(self):
+    def test_kernel_pf_vf_reset(self):
 
         self.setup_3vf_2vm_env(driver='')
+        self.vf_reset()
+
+    def test_dpdk_pf_vf_reset(self):
+        self.setup_3vf_2vm_env(driver='igb_uio')
+        self.vf_reset()
 
+    def vf_reset(self):
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
         self.vm1_dut_ports = self.vm_dut_1.get_ports('any')
 
-- 
2.17.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dts] [PATCH V1 2/2] test_plans/vf packet rxtx:add dpdk pf test scenorio
  2018-11-21  5:46 [dts] [PATCH V1 1/2] tests/vf packet rxtx:add dpdk pf test scenorio zhao,meijuan
@ 2018-11-21  5:46 ` zhao,meijuan
  2018-11-22  9:41   ` Tu, Lijuan
  2018-11-22  9:42 ` [dts] [PATCH V1 1/2] tests/vf " Tu, Lijuan
  1 sibling, 1 reply; 4+ messages in thread
From: zhao,meijuan @ 2018-11-21  5:46 UTC (permalink / raw)
  To: dts; +Cc: zhao,meijuan

Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
 test_plans/vf_packet_rxtx_test_plan.rst | 231 +++++++++++++++++++++++-
 1 file changed, 227 insertions(+), 4 deletions(-)

diff --git a/test_plans/vf_packet_rxtx_test_plan.rst b/test_plans/vf_packet_rxtx_test_plan.rst
index 0df9984..773758b 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
 
 1. Got the pci device id of DUT, for example::
 
-      ./dpdk_nic_bind.py --st
+      ./usertools/dpdk-devbind.py -s
 
       0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=i40e unused=
       0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused=
@@ -50,7 +50,7 @@ Test Case 1: VF_packet_IO_kernel_PF_dpdk_VF
 
       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
 
       0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=i40e unused=
       0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused=
@@ -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;
 
-      ./dpdk_nic_bind.py --st
+      ./usertools/dpdk-devbind.py -s
 
       0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=i40e unused=
       0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused=
@@ -95,7 +95,7 @@ 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::
 
-      ./tools/dpdk_nic_bind.py --bind=igb_uio 00:06.0 00:07.0
+      ./usertools/dpdk-devbind.py -s --bind=igb_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=0x3 --tx-offloads=0x8fff
 
@@ -104,3 +104,226 @@ Test Case 1: VF_packet_IO_kernel_PF_dpdk_VF
 
 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
+===========================================
+
+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=ens259f0 drv=i40e unused=
+      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused=
+
+2. bind pf to igb_uio and Create 2 VFs from 2 PFs::
+
+      ./usertools/dpdk-devbind.py --bind=igb_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/unbind
+      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/unbind
+      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=ens259f0 drv=i40e unused=
+      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused=
+      0000:81:02.0 'XL710/X710 Virtual Function' if= drv=pci-stub unused=
+      0000:81:0a.0 'XL710/X710 Virtual Function' if= drv=pci-stub unused=
+
+   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
+
+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=/home/image/sriov-fc20-1.img -vnc :1 \
+      -device pci-assign,host=81:02.0,id=pt_0 \
+      -device pci-assign,host=81:0a.0,id=pt_1
+
+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::
+
+      ./usertools/dpdk-devbind.py --bind=igb_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
+
+      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: pf dpdk vf reset
+===========================================
+this case pf in dpdk
+===========================================
+
+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=ens259f0 drv=i40e unused=
+      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused=
+
+2. bind pf to igb_uio and Create 3 VFs from pf0::
+
+      ./usertools/dpdk-devbind.py --bind=igb_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/unbind
+      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/unbind
+      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/unbind
+      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-stub.
+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=/home/image/sriov-fc20-1.img -vnc :1 \
+      -device pci-assign,host=81:02.0,id=pt_0 \
+      -device pci-assign,host=81:02.1,id=pt_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=/home/image/sriov-fc20-2.img -vnc :2 \
+      -device pci-assign,host=81:02.2,id=pt_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=igb_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: pf kernel vf reset
+===========================================
+this case pf in kernel
+===========================================
+
+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=ens259f0 drv=i40e unused=
+      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=i40e unused=
+
+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/unbind
+      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/unbind
+      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/unbind
+      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-stub.
+
+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=/home/image/sriov-fc20-1.img -vnc :1 \
+      -device pci-assign,host=81:02.0,id=pt_0 \
+      -device pci-assign,host=81:02.1,id=pt_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=/home/image/sriov-fc20-2.img -vnc :2 \
+      -device pci-assign,host=81:02.2,id=pt_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=igb_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
-- 
2.17.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1 2/2] test_plans/vf packet rxtx:add dpdk pf test scenorio
  2018-11-21  5:46 ` [dts] [PATCH V1 2/2] test_plans/vf " zhao,meijuan
@ 2018-11-22  9:41   ` Tu, Lijuan
  0 siblings, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2018-11-22  9:41 UTC (permalink / raw)
  To: Zhao, MeijuanX, dts; +Cc: Zhao, MeijuanX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhao,meijuan
> Sent: Wednesday, November 21, 2018 1:46 PM
> To: dts@dpdk.org
> Cc: Zhao, MeijuanX <meijuanx.zhao@intel.com>
> Subject: [dts] [PATCH V1 2/2] test_plans/vf packet rxtx:add dpdk pf test
> scenorio
> 
> Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
> ---
>  test_plans/vf_packet_rxtx_test_plan.rst | 231 +++++++++++++++++++++++-
>  1 file changed, 227 insertions(+), 4 deletions(-)
> 
> diff --git a/test_plans/vf_packet_rxtx_test_plan.rst
> b/test_plans/vf_packet_rxtx_test_plan.rst
> index 0df9984..773758b 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
> 
>  1. Got the pci device id of DUT, for example::
> 
> -      ./dpdk_nic_bind.py --st
> +      ./usertools/dpdk-devbind.py -s
> 
>        0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0
> drv=i40e unused=
>        0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=i40e unused= @@ -50,7 +50,7 @@ Test Case 1:
> VF_packet_IO_kernel_PF_dpdk_VF
> 
>        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
> 
>        0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0
> drv=i40e unused=
>        0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=i40e unused= @@ -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;
> 
> -      ./dpdk_nic_bind.py --st
> +      ./usertools/dpdk-devbind.py -s
> 
>        0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0
> drv=i40e unused=
>        0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=i40e unused= @@ -95,7 +95,7 @@ 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::
> 
> -      ./tools/dpdk_nic_bind.py --bind=igb_uio 00:06.0 00:07.0
> +      ./usertools/dpdk-devbind.py -s --bind=igb_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=0x3 --tx-offloads=0x8fff
> 
> @@ -104,3 +104,226 @@ Test Case 1: VF_packet_IO_kernel_PF_dpdk_VF
> 
>  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
> +===========================================
> +
> +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=ens259f0
> drv=i40e unused=
> +      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+'
> + if=ens259f1 drv=i40e unused=
> +
> +2. bind pf to igb_uio and Create 2 VFs from 2 PFs::
> +
> +      ./usertools/dpdk-devbind.py --bind=igb_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/unbind
> +      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/unbind
> +      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=ens259f0
> drv=i40e unused=
> +      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=i40e unused=
> +      0000:81:02.0 'XL710/X710 Virtual Function' if= drv=pci-stub unused=
> +      0000:81:0a.0 'XL710/X710 Virtual Function' if= drv=pci-stub
> + unused=
> +
> +   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
> +
> +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=/home/image/sriov-fc20-1.img
> -vnc :1 \
> +      -device pci-assign,host=81:02.0,id=pt_0 \
> +      -device pci-assign,host=81:0a.0,id=pt_1
> +
> +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::
> +
> +      ./usertools/dpdk-devbind.py --bind=igb_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
> +
> +      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: pf dpdk vf reset
> +===========================================
> +this case pf in dpdk
> +===========================================
> +
> +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=ens259f0
> drv=i40e unused=
> +      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+'
> + if=ens259f1 drv=i40e unused=
> +
> +2. bind pf to igb_uio and Create 3 VFs from pf0::
> +
> +      ./usertools/dpdk-devbind.py --bind=igb_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/unbind
> +      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/unbind
> +      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/unbind
> +      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-stub.
> +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=/home/image/sriov-fc20-1.img
> -vnc :1 \
> +      -device pci-assign,host=81:02.0,id=pt_0 \
> +      -device pci-assign,host=81:02.1,id=pt_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=/home/image/sriov-fc20-2.img
> -vnc :2 \
> +      -device pci-assign,host=81:02.2,id=pt_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=igb_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: pf kernel vf reset
> +===========================================
> +this case pf in kernel
> +===========================================
> +
> +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=ens259f0
> drv=i40e unused=
> +      0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+'
> + if=ens259f1 drv=i40e unused=
> +
> +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/unbind
> +      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/unbind
> +      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/unbind
> +      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-stub.
> +
> +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=/home/image/sriov-fc20-1.img
> -vnc :1 \
> +      -device pci-assign,host=81:02.0,id=pt_0 \
> +      -device pci-assign,host=81:02.1,id=pt_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=/home/image/sriov-fc20-2.img
> -vnc :2 \
> +      -device pci-assign,host=81:02.2,id=pt_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=igb_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
> --
> 2.17.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1 1/2] tests/vf packet rxtx:add dpdk pf test scenorio
  2018-11-21  5:46 [dts] [PATCH V1 1/2] tests/vf packet rxtx:add dpdk pf test scenorio zhao,meijuan
  2018-11-21  5:46 ` [dts] [PATCH V1 2/2] test_plans/vf " zhao,meijuan
@ 2018-11-22  9:42 ` Tu, Lijuan
  1 sibling, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2018-11-22  9:42 UTC (permalink / raw)
  To: Zhao, MeijuanX, dts; +Cc: Zhao, MeijuanX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhao,meijuan
> Sent: Wednesday, November 21, 2018 1:46 PM
> To: dts@dpdk.org
> Cc: Zhao, MeijuanX <meijuanx.zhao@intel.com>
> Subject: [dts] [PATCH V1 1/2] tests/vf packet rxtx:add dpdk pf test scenorio
> 
> Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
> ---
>  tests/TestSuite_vf_packet_rxtx.py | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_vf_packet_rxtx.py
> b/tests/TestSuite_vf_packet_rxtx.py
> index 6a29d23..c56bdd7 100644
> --- a/tests/TestSuite_vf_packet_rxtx.py
> +++ b/tests/TestSuite_vf_packet_rxtx.py
> @@ -61,7 +61,6 @@ class TestVfPacketRxtx(TestCase):
>              vf0_prop = {'opt_host': self.sriov_vfs_port_0[0].pci}
>              vf1_prop = {'opt_host': self.sriov_vfs_port_1[0].pci}
> 
> -
>              if driver == 'igb_uio':
>                  # start testpmd without the two VFs on the host
>                  self.host_testpmd = PmdOutput(self.dut) @@ -252,10
> +251,16 @@ class TestVfPacketRxtx(TestCase):
> 
>          self.setup_3vf_2vm_env_flag = 0
> 
> -    def test_vf_reset(self):
> +    def test_kernel_pf_vf_reset(self):
> 
>          self.setup_3vf_2vm_env(driver='')
> +        self.vf_reset()
> +
> +    def test_dpdk_pf_vf_reset(self):
> +        self.setup_3vf_2vm_env(driver='igb_uio')
> +        self.vf_reset()
> 
> +    def vf_reset(self):
>          self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>          self.vm1_dut_ports = self.vm_dut_1.get_ports('any')
> 
> --
> 2.17.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-22  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21  5:46 [dts] [PATCH V1 1/2] tests/vf packet rxtx:add dpdk pf test scenorio zhao,meijuan
2018-11-21  5:46 ` [dts] [PATCH V1 2/2] test_plans/vf " zhao,meijuan
2018-11-22  9:41   ` Tu, Lijuan
2018-11-22  9:42 ` [dts] [PATCH V1 1/2] tests/vf " Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).