From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B91CA0525; Fri, 21 Feb 2020 03:03:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 688001BF99; Fri, 21 Feb 2020 03:03:13 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A030325B3 for ; Fri, 21 Feb 2020 03:03:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2020 18:03:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,466,1574150400"; d="scan'208";a="435040842" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 20 Feb 2020 18:03:11 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Feb 2020 18:03:11 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 20 Feb 2020 18:03:11 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 20 Feb 2020 18:03:10 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.97]) with mapi id 14.03.0439.000; Fri, 21 Feb 2020 10:03:08 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v1] test_plans/vf_interrupt_pmd: add vf multi queues interrupt test cases with i40e driver Thread-Index: AQHV559H4n2CGy5ntUaWU5AHU69Xnqgk5t3Q Date: Fri, 21 Feb 2020 02:03:08 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCC928@SHSMSX101.ccr.corp.intel.com> References: <20200219203311.103561-1-yinan.wang@intel.com> In-Reply-To: <20200219203311.103561-1-yinan.wang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 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_plans/vf_interrupt_pmd: add vf multi queues interrupt test cases with i40e driver 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yinan > Sent: Thursday, February 20, 2020 4:33 AM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v1] test_plans/vf_interrupt_pmd: add vf multi queue= s > interrupt test cases with i40e driver >=20 > From: Wang Yinan >=20 > Signed-off-by: Wang Yinan > --- > test_plans/vf_interrupt_pmd_test_plan.rst | 76 ++++++++++++++++++++++- > 1 file changed, 75 insertions(+), 1 deletion(-) >=20 > diff --git a/test_plans/vf_interrupt_pmd_test_plan.rst > b/test_plans/vf_interrupt_pmd_test_plan.rst > index 8f91b14..a8ed3d8 100644 > --- a/test_plans/vf_interrupt_pmd_test_plan.rst > +++ b/test_plans/vf_interrupt_pmd_test_plan.rst > @@ -190,4 +190,78 @@ Test Case4: VF interrupt pmd in VM with vfio-pci >=20 > 7. Check if threads on core 2 have returned to sleep mode:: >=20 > - L3FWD_POWER: lcore 2 sleeps until interrupt triggers > \ No newline at end of file > + L3FWD_POWER: lcore 2 sleeps until interrupt triggers > + > +Test Case5: vf multi-queue interrupt with vfio-pci on i40e > +=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=3D=3D=3D=3D=3D > + > +1. Generate NIC VF, then bind it to vfio drvier:: > + > + echo 1 > /sys/bus/pci/devices/0000\:04\:00.0/sriov_numvfs > + modprobe vfio-pci > + usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:04:10.0(vf_pci) > + > + Notice: If your PF is kernel driver, make sure PF link is up when you= r start > testpmd on VF. > + > +2. Start l3fwd-power with VF:: > + > + examples/l3fwd-power/build/l3fwd-power -c 3f -n 4 -m 2048 -- -P -p 0= x1 - > -config=3D"(0,0,1),(0,1,2),(0,2,3),(0,3,4)" > + > +3. Send UDP packets with random ip and dest mac =3D vf mac addr:: > + > + for x in range(0,10): > + > + sendp(Ether(src=3D"00:00:00:00:01:00",dst=3D"vf_mac")/IP(src=3D'2.1.1.'= + > + str(x),dst=3D'2.1.1.5')/UDP()/"Hello!0",iface=3D"tester_intf") > + > +4. Check if threads on all cores have waked up:: > + > + L3FWD_POWER: lcore 1 is waked up from rx interrupt on port 0 queue 0 > + L3FWD_POWER: lcore 2 is waked up from rx interrupt on port 0 queue 1 > + L3FWD_POWER: lcore 3 is waked up from rx interrupt on port 0 queue 2 > + L3FWD_POWER: lcore 4 is waked up from rx interrupt on port 0 queue > + 3 > + > +Test Case6: VF multi-queue interrupt in VM with vfio-pci on i40e > +=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D > + > +1. Generate NIC VF, then bind it to vfio drvier:: > + > + echo 1 > /sys/bus/pci/devices/0000\:88:00.1/sriov_numvfs > + modprobe vfio-pci > + usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:88:0a.0(vf_pci) > + > + Notice: If your PF is kernel driver, make sure PF link is up when you= r start > testpmd on VF. > + > +2. Passthrough VF 0 to VM0 and start VM0:: > + > + taskset -c 4,5,6,7,8 qemu-system-x86_64 \ > + -name vm0 -enable-kvm -pidfile /tmp/.vm0.pid -daemonize -monitor > unix:/tmp/vm0_monitor.sock,server,nowait \ > + -device e1000,netdev=3Dnttsip1 -netdev > user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6000-:22 \ > + -device vfio-pci,host=3D0000:88:0a.0,id=3Dpt_0 -cpu host -smp 5 -m 1= 0240 \ > + -chardev socket,path=3D/tmp/vm0_qga0.sock,server,nowait,id=3Dvm0_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm0_qga0,name=3Dorg.qemu.guest_agen= t.0 > -vnc :11 \ > + -drive > + file=3D/home/osimg/noiommu- > ubt16.img,format=3Dqcow2,if=3Dvirtio,index=3D0,medi > + a=3Ddisk > + > + Notice: VM needs Kernel version > 4.8.0, mostly linux distribution don= 't > support vfio-noiommu mode by default, so testing this case need rebuild > kernel to enable vfio-noiommu. > + > +3. Bind VF 0 to the vfio-pci driver:: > + > + modprobe -r vfio_iommu_type1 > + modprobe -r vfio > + modprobe vfio enable_unsafe_noiommu_mode=3D1 > + modprobe vfio-pci > + usertools/dpdk-devbind.py -b vfio-pci 0000:00:04.0 > + > +4.Start l3fwd-power in VM:: > + > + ./build/l3fwd-power -l 0-3 -n 4 -m 2048 -- -P -p 0x1 -- > config=3D"(0,0,0),(0,1,1),(0,2,2),(0,3,3)" > + > +5. Send UDP packets with random ip and dest mac =3D vf mac addr:: > + > + for x in range(0,10): > + sendp(Ether(src=3D"00:00:00:00:01:00",dst=3D"vf_mac")/IP(src=3D'2.1= .1.' > + + str(x),dst=3D'2.1.1.5')/UDP()/"Hello!0",iface=3D"tester_intf") > + > +6. Check if threads on core 0 to core 3 can be waked up in VM:: > + > + L3FWD_POWER: lcore 0 is waked up from rx interrupt on port 0 queue 0 > + L3FWD_POWER: lcore 1 is waked up from rx interrupt on port 0 queue 1 > + L3FWD_POWER: lcore 2 is waked up from rx interrupt on port 0 queue 2 > + L3FWD_POWER: lcore 3 is waked up from rx interrupt on port 0 queue > + 3 > \ No newline at end of file > -- > 2.17.1