* [dts] [PATCH V1] test_plan/vf macfilter add dpdk pf + dpdk vf scenario
@ 2018-04-20 3:28 zhao,meijuan
0 siblings, 0 replies; 3+ messages in thread
From: zhao,meijuan @ 2018-04-20 3:28 UTC (permalink / raw)
To: dts; +Cc: zhao,meijuan
add dpdk pf + dpdk vf test scenario
Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
test_plans/vf_macfilter_test_plan.rst | 177 +++++++++++++++++++++++++++++++++-
1 file changed, 175 insertions(+), 2 deletions(-)
diff --git a/test_plans/vf_macfilter_test_plan.rst b/test_plans/vf_macfilter_test_plan.rst
index 221c05e..247d16a 100644
--- a/test_plans/vf_macfilter_test_plan.rst
+++ b/test_plans/vf_macfilter_test_plan.rst
@@ -111,7 +111,7 @@ Test Case 1: test_kernel_2pf_2vf_1vm_iplink_macfilter
correctly.
7. Also use scapy to send 100 random packets with a wrong MAC to VF, verify
- the packets can't be received by one VF and can be forward to another VF
+ the packets can't be received by one VF and can't be forward to another VF
correctly.
Test Case 2: test_kernel_2pf_2vf_1vm_mac_add_filter
@@ -197,5 +197,178 @@ Test Case 2: test_kernel_2pf_2vf_1vm_mac_add_filter
correctly.
8. Use scapy to send 100 random packets with a wrong MAC to VF0, verify the
- packets can't be received by one VF and can be forward to another VF
+ packets can't be received by one VF and can't be forward to another VF
correctly.
+
+
+Test Case 3: test_dpdk_2pf_2vf_1vm_iplink_macfilter
+=====================================================
+
+1. Get the pci device id of DUT, for example::
+
+ ./dpdk_nic_bind.py --st
+
+ 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=
+
+ usertools/dpdk-devbind.py --force --bind=igb_uio 0000:81:00.0 0000:81:00.0
+
+2. Create 2 VFs from 2 PFs, and set the VF MAC address at PF0::
+
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/max_vfs
+
+ ./dpdk_nic_bind.py --st
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio unused=
+ 0000:81:02.0 'XL710/X710 Virtual Function' unused=
+ 0000:81:0a.0 'XL710/X710 Virtual Function' unused=
+
+
+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;
+
+ ./dpdk_nic_bind.py --st
+
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio 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 driver is pci-stub.
+4. on host start testpmd
+
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6000000006 -n 4 -b 0000:81:02.0 -b 0000:81:0a.0 -- -i
+ testpmd > set vf mac addr 0 0 00:12:34:56:78:01
+
+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, enable CRC strip,
+ disable promisc mode,set it in mac forward mode::
+
+ ./tools/dpdk_nic_bind.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 --portmask=0x3
+ testpmd> set promisc all off
+ testpmd> set fwd mac
+ testpmd> start
+
+7. Use scapy to send 100 random packets with ip link set MAC to VF, verify the
+ packets can be received by one VF and can be forward to another VF
+ correctly.
+
+8. Also use scapy to send 100 random packets with a wrong MAC to VF, verify
+ the packets can't be received by one VF and can't be forward to another VF
+ correctly.
+
+Test Case 4: test_dpdk_2pf_2vf_1vm_mac_add_filter
+===================================================
+
+1. Get the pci device id of DUT, for example::
+
+ ./dpdk_nic_bind.py --st
+
+ 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=
+
+ usertools/dpdk-devbind.py --force --bind=igb_uio 0000:81:00.0 0000:81:00.0
+
+2. Create 2 VFs from 2 PFs, and don't set the VF MAC address at PF0::
+
+
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/max_vfs
+
+ ./dpdk_nic_bind.py --st
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio unused=
+ 0000:81:02.0 'XL710/X710 Virtual Function' unused=
+ 0000:81:0a.0 'XL710/X710 Virtual Function' unused=
+
+3. Detach VFs from the host, bind them to pci-stub driver::
+
+ /sbin/modprobe pci-stub
+
+ using `lspci -nn|grep -i ethernet` to get 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;
+
+ ./dpdk_nic_bind.py --st
+
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio 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 driver is pci-stub.
+
+4. On host start testpmd
+
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6000000006 -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, enable CRC strip on
+ VF, disable promisc mode, add a new MAC to VF0 and then start::
+
+ ./tools/dpdk_nic_bind.py --bind=igb_uio 00:06.0 00:07.0
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 1 -- -i
+ testpmd> set promisc all off
+ testpmd> mac_addr add 0 00:11:22:33:44:55
+ testpmd> set fwd mac
+ testpmd> start
+
+ Note: In Jan, 2016, i40e doesn't support mac_addr add operation, so the
+ case will be failed for FVL/Fort park NICs.
+
+7. Use scapy to send 100 random packets with current VF0's MAC, verify the
+ packets can be received by one VF and can be forward to another VF
+ correctly.
+
+8. Use scapy to send 100 random packets with new added VF0's MAC, verify the
+ packets can be received by one VF and can be forward to another VF
+ correctly.
+
+9. Use scapy to send 100 random packets with a wrong MAC to VF0, verify the
+ packets can't be received by one VF and can't be forward to another VF
+ correctly.
+
+
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1] test_plan/vf macfilter : add dpdk pf + dpdk vf scenario
2018-04-04 6:21 [dts] [PATCH V1] test_plan/vf macfilter : " zhao,meijuan
@ 2018-04-20 1:14 ` Liu, Yong
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2018-04-20 1:14 UTC (permalink / raw)
To: Zhao, MeijuanX, dts; +Cc: Zhao, MeijuanX
Meijuan,
One comment is inline.
Thanks,
Marvin
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhao,meijuan
> Sent: Wednesday, April 04, 2018 2:21 PM
> To: dts@dpdk.org
> Cc: Zhao, MeijuanX <meijuanx.zhao@intel.com>
> Subject: [dts] [PATCH V1] test_plan/vf macfilter : add dpdk pf + dpdk vf
> scenario
>
> add dpdk pf + dpdk vf scenario
>
> Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
> ---
> test_plans/vf_macfilter_test_plan.rst | 173
> ++++++++++++++++++++++++++++++++++
> 1 file changed, 173 insertions(+)
>
> diff --git a/test_plans/vf_macfilter_test_plan.rst
> b/test_plans/vf_macfilter_test_plan.rst
> index 221c05e..bf7bd4e 100644
> --- a/test_plans/vf_macfilter_test_plan.rst
> +++ b/test_plans/vf_macfilter_test_plan.rst
> @@ -199,3 +199,176 @@ Test Case 2: test_kernel_2pf_2vf_1vm_mac_add_filter
> 8. Use scapy to send 100 random packets with a wrong MAC to VF0, verify
> the
> packets can't be received by one VF and can be forward to another VF
> correctly.
> +
> +
> +Test Case 3: test_dpdk_2pf_2vf_1vm_iplink_macfilter
> +=====================================================
> +
> +1. Get the pci device id of DUT, for example::
> +
> + ./dpdk_nic_bind.py --st
> +
> + 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=
> +
> + usertools/dpdk-devbind.py --force --bind=igb_uio 0000:81:00.0
> 0000:81:00.0
> +
> +2. Create 2 VFs from 2 PFs, and set the VF MAC address at PF0::
> +
> + echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs
> + echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/max_vfs
> +
> + ./dpdk_nic_bind.py --st
> + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0
> drv=igb_uio unused=
> + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=igb_uio unused=
> + 0000:81:02.0 'XL710/X710 Virtual Function' unused=
> + 0000:81:0a.0 'XL710/X710 Virtual Function' unused=
> +
> +
> +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;
> +
> + ./dpdk_nic_bind.py --st
> +
> + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0
> drv=igb_uio unused=
> + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=igb_uio 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 driver is pci-stub.
> +4. on host start testpmd
> +
> + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6000000006 -n 4 -b
> 0000:81:02.0 -b 0000:81:0a.0 -- -i
> + testpmd > set vf mac addr 0 0 00:12:34:56:78:01
> +
> +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, enable CRC strip,
> + disable promisc mode,set it in mac forward mode::
> +
> + ./tools/dpdk_nic_bind.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 --portmask=0x3
> + testpmd> set promisc all off
> + testpmd> set fwd mac
> + testpmd> start
> +
> +7. Use scapy to send 100 random packets with ip link set MAC to VF,
> verify the
> + packets can be received by one VF and can be forward to another VF
> + correctly.
> +
> +8. Also use scapy to send 100 random packets with a wrong MAC to VF,
> verify
> + the packets can't be received by one VF and can be forward to another
> VF
> + correctly.
Meijuan, could you please explain more details of step 8? How another VF receive those packets with wrong mac?
> +
> +Test Case 4: test_dpdk_2pf_2vf_1vm_mac_add_filter
> +===================================================
> +
> +1. Get the pci device id of DUT, for example::
> +
> + ./dpdk_nic_bind.py --st
> +
> + 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=
> +
> + usertools/dpdk-devbind.py --force --bind=igb_uio 0000:81:00.0
> 0000:81:00.0
> +
> +2. Create 2 VFs from 2 PFs, and don't set the VF MAC address at PF0::
> +
> +
> + echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs
> + echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/max_vfs
> +
> + ./dpdk_nic_bind.py --st
> + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0
> drv=igb_uio unused=
> + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=igb_uio unused=
> + 0000:81:02.0 'XL710/X710 Virtual Function' unused=
> + 0000:81:0a.0 'XL710/X710 Virtual Function' unused=
> +
> +3. Detach VFs from the host, bind them to pci-stub driver::
> +
> + /sbin/modprobe pci-stub
> +
> + using `lspci -nn|grep -i ethernet` to get 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;
> +
> + ./dpdk_nic_bind.py --st
> +
> + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0
> drv=igb_uio unused=
> + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1
> drv=igb_uio 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 driver is pci-stub.
> +
> +4. On host start testpmd
> +
> + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6000000006 -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, enable CRC strip
> on
> + VF, disable promisc mode, add a new MAC to VF0 and then start::
> +
> + ./tools/dpdk_nic_bind.py --bind=igb_uio 00:06.0 00:07.0
> + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 1 -- -i
> + testpmd> set promisc all off
> + testpmd> mac_addr add 0 00:11:22:33:44:55
> + testpmd> set fwd mac
> + testpmd> start
> +
> + Note: In Jan, 2016, i40e doesn't support mac_addr add operation, so
> the
> + case will be failed for FVL/Fort park NICs.
> +
> +7. Use scapy to send 100 random packets with current VF0's MAC, verify
> the
> + packets can be received by one VF and can be forward to another VF
> + correctly.
> +
> +8. Use scapy to send 100 random packets with new added VF0's MAC, verify
> the
> + packets can be received by one VF and can be forward to another VF
> + correctly.
> +
> +9. Use scapy to send 100 random packets with a wrong MAC to VF0, verify
> the
> + packets can't be received by one VF and can be forward to another VF
> + correctly.
> +
> +
> --
> 1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1] test_plan/vf macfilter : add dpdk pf + dpdk vf scenario
@ 2018-04-04 6:21 zhao,meijuan
2018-04-20 1:14 ` Liu, Yong
0 siblings, 1 reply; 3+ messages in thread
From: zhao,meijuan @ 2018-04-04 6:21 UTC (permalink / raw)
To: dts; +Cc: zhao,meijuan
add dpdk pf + dpdk vf scenario
Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
test_plans/vf_macfilter_test_plan.rst | 173 ++++++++++++++++++++++++++++++++++
1 file changed, 173 insertions(+)
diff --git a/test_plans/vf_macfilter_test_plan.rst b/test_plans/vf_macfilter_test_plan.rst
index 221c05e..bf7bd4e 100644
--- a/test_plans/vf_macfilter_test_plan.rst
+++ b/test_plans/vf_macfilter_test_plan.rst
@@ -199,3 +199,176 @@ Test Case 2: test_kernel_2pf_2vf_1vm_mac_add_filter
8. Use scapy to send 100 random packets with a wrong MAC to VF0, verify the
packets can't be received by one VF and can be forward to another VF
correctly.
+
+
+Test Case 3: test_dpdk_2pf_2vf_1vm_iplink_macfilter
+=====================================================
+
+1. Get the pci device id of DUT, for example::
+
+ ./dpdk_nic_bind.py --st
+
+ 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=
+
+ usertools/dpdk-devbind.py --force --bind=igb_uio 0000:81:00.0 0000:81:00.0
+
+2. Create 2 VFs from 2 PFs, and set the VF MAC address at PF0::
+
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/max_vfs
+
+ ./dpdk_nic_bind.py --st
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio unused=
+ 0000:81:02.0 'XL710/X710 Virtual Function' unused=
+ 0000:81:0a.0 'XL710/X710 Virtual Function' unused=
+
+
+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;
+
+ ./dpdk_nic_bind.py --st
+
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio 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 driver is pci-stub.
+4. on host start testpmd
+
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6000000006 -n 4 -b 0000:81:02.0 -b 0000:81:0a.0 -- -i
+ testpmd > set vf mac addr 0 0 00:12:34:56:78:01
+
+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, enable CRC strip,
+ disable promisc mode,set it in mac forward mode::
+
+ ./tools/dpdk_nic_bind.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 --portmask=0x3
+ testpmd> set promisc all off
+ testpmd> set fwd mac
+ testpmd> start
+
+7. Use scapy to send 100 random packets with ip link set MAC to VF, verify the
+ packets can be received by one VF and can be forward to another VF
+ correctly.
+
+8. Also use scapy to send 100 random packets with a wrong MAC to VF, verify
+ the packets can't be received by one VF and can be forward to another VF
+ correctly.
+
+Test Case 4: test_dpdk_2pf_2vf_1vm_mac_add_filter
+===================================================
+
+1. Get the pci device id of DUT, for example::
+
+ ./dpdk_nic_bind.py --st
+
+ 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=
+
+ usertools/dpdk-devbind.py --force --bind=igb_uio 0000:81:00.0 0000:81:00.0
+
+2. Create 2 VFs from 2 PFs, and don't set the VF MAC address at PF0::
+
+
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.0/max_vfs
+ echo 1 > /sys/bus/pci/devices/0000\:81\:00.1/max_vfs
+
+ ./dpdk_nic_bind.py --st
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio unused=
+ 0000:81:02.0 'XL710/X710 Virtual Function' unused=
+ 0000:81:0a.0 'XL710/X710 Virtual Function' unused=
+
+3. Detach VFs from the host, bind them to pci-stub driver::
+
+ /sbin/modprobe pci-stub
+
+ using `lspci -nn|grep -i ethernet` to get 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;
+
+ ./dpdk_nic_bind.py --st
+
+ 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f0 drv=igb_uio unused=
+ 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=ens259f1 drv=igb_uio 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 driver is pci-stub.
+
+4. On host start testpmd
+
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6000000006 -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, enable CRC strip on
+ VF, disable promisc mode, add a new MAC to VF0 and then start::
+
+ ./tools/dpdk_nic_bind.py --bind=igb_uio 00:06.0 00:07.0
+ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 1 -- -i
+ testpmd> set promisc all off
+ testpmd> mac_addr add 0 00:11:22:33:44:55
+ testpmd> set fwd mac
+ testpmd> start
+
+ Note: In Jan, 2016, i40e doesn't support mac_addr add operation, so the
+ case will be failed for FVL/Fort park NICs.
+
+7. Use scapy to send 100 random packets with current VF0's MAC, verify the
+ packets can be received by one VF and can be forward to another VF
+ correctly.
+
+8. Use scapy to send 100 random packets with new added VF0's MAC, verify the
+ packets can be received by one VF and can be forward to another VF
+ correctly.
+
+9. Use scapy to send 100 random packets with a wrong MAC to VF0, verify the
+ packets can't be received by one VF and can be forward to another VF
+ correctly.
+
+
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-20 3:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 3:28 [dts] [PATCH V1] test_plan/vf macfilter add dpdk pf + dpdk vf scenario zhao,meijuan
-- strict thread matches above, loose matches on Subject: below --
2018-04-04 6:21 [dts] [PATCH V1] test_plan/vf macfilter : " zhao,meijuan
2018-04-20 1:14 ` Liu, Yong
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).