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 89102AABE for ; Fri, 20 Apr 2018 03:14:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2018 18:14:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,299,1520924400"; d="scan'208";a="217966268" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 19 Apr 2018 18:14:57 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Apr 2018 18:14:56 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Apr 2018 18:14:56 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by shsmsx102.ccr.corp.intel.com ([169.254.2.79]) with mapi id 14.03.0319.002; Fri, 20 Apr 2018 09:14:54 +0800 From: "Liu, Yong" To: "Zhao, MeijuanX" , "dts@dpdk.org" CC: "Zhao, MeijuanX" Thread-Topic: [dts] [PATCH V1] test_plan/vf macfilter : add dpdk pf + dpdk vf scenario Thread-Index: AQHTy90CZyx4IyRRN0GkQLfTkNdLKqQI8bsg Date: Fri, 20 Apr 2018 01:14:54 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E63024F06@SHSMSX103.ccr.corp.intel.com> References: <1522822870-110299-1-git-send-email-meijuanx.zhao@intel.com> In-Reply-To: <1522822870-110299-1-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDAxYWUyMWUtOWQ0NS00MTYzLTg5NzMtOWZkOTQzOWYwMzQ5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiIwYXdlZzNkQnF5bEdpdE9XWktESnpyTEgzSk9Za2NlbEc5a1o0anpUTVUrOWZvZVZFUWJNRUJ1eklzYVExRGdRIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 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 V1] test_plan/vf macfilter : add dpdk pf + dpdk vf 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: Fri, 20 Apr 2018 01:15:00 -0000 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 > Subject: [dts] [PATCH V1] test_plan/vf macfilter : add dpdk pf + dpdk vf > scenario >=20 > add dpdk pf + dpdk vf scenario >=20 > Signed-off-by: zhao,meijuan > --- > test_plans/vf_macfilter_test_plan.rst | 173 > ++++++++++++++++++++++++++++++++++ > 1 file changed, 173 insertions(+) >=20 > 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 > +=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=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > + > +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=3Dens259= f0 > drv=3Di40e unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > + > + usertools/dpdk-devbind.py --force --bind=3Digb_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=3Dens259= f0 > drv=3Digb_uio unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Digb_uio unused=3D > + 0000:81:02.0 'XL710/X710 Virtual Function' unused=3D > + 0000:81:0a.0 'XL710/X710 Virtual Function' unused=3D > + > + > +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; > + > + ./dpdk_nic_bind.py --st > + > + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Digb_uio unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Digb_uio 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 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=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 > + > +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=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 > + 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 re= ceive those packets with wrong mac? > + > +Test Case 4: test_dpdk_2pf_2vf_1vm_mac_add_filter > +=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=3D=3D=3D=3D=3D=3D= =3D=3D > + > +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=3Dens259= f0 > drv=3Di40e unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Di40e unused=3D > + > + usertools/dpdk-devbind.py --force --bind=3Digb_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=3Dens259= f0 > drv=3Digb_uio unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Digb_uio unused=3D > + 0000:81:02.0 'XL710/X710 Virtual Function' unused=3D > + 0000:81:0a.0 'XL710/X710 Virtual Function' unused=3D > + > +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 exampl= e > "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; > + > + ./dpdk_nic_bind.py --st > + > + 0000:81:00.0 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f0 > drv=3Digb_uio unused=3D > + 0000:81:00.1 'Ethernet Controller X710 for 10GbE SFP+' if=3Dens259= f1 > drv=3Digb_uio 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 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=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 > + > +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=3Digb_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