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 90C40A0471 for ; Fri, 16 Aug 2019 04:15:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 50AC41252; Fri, 16 Aug 2019 04:15:48 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 78C561041 for ; Fri, 16 Aug 2019 04:15:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 19:15:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,391,1559545200"; d="scan'208";a="194892147" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 15 Aug 2019 19:15:46 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 19:15:46 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 19:15:45 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.19]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0439.000; Fri, 16 Aug 2019 10:15:43 +0800 From: "Zhang, Yuwei1" To: "Zhang, YanX A" CC: "dts@dpdk.org" Thread-Topic: [dts][PATCH V1] test_plans/vf_interrupt_pmd_test_plan:add a test case Thread-Index: AQHVUoHr69k6UwcCPESMuptkyVgJBKb9C/8+ Date: Fri, 16 Aug 2019 02:15:42 +0000 Message-ID: <9F37C05D-00D2-4C6E-BE8B-5A321BED07FD@intel.com> References: <1565774861-93518-1-git-send-email-yanx.a.zhang@intel.com> In-Reply-To: <1565774861-93518-1-git-send-email-yanx.a.zhang@intel.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] test_plans/vf_interrupt_pmd_test_plan:add a test case 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" Asked-by: Yuwei Zhang > =1B$B:_=1B(B 2019=1B$BG/=1B(B8=1B$B7n=1B(B14=1B$BF|!$2<8a=1B(B5:23=1B$B!$= =1B(BZhang, YanX A =1B$B=20 > 1. add a test case. > 2. Fix some problems. >=20 > Signed-off-by: zhang,yan > --- > test_plans/vf_interrupt_pmd_test_plan.rst | 57 +++++++++++++++++++++-- > 1 file changed, 54 insertions(+), 3 deletions(-) >=20 > diff --git a/test_plans/vf_interrupt_pmd_test_plan.rst b/test_plans/vf_in= terrupt_pmd_test_plan.rst > index 6464ebc..8f91b14 100644 > --- a/test_plans/vf_interrupt_pmd_test_plan.rst > +++ b/test_plans/vf_interrupt_pmd_test_plan.rst > @@ -71,11 +71,11 @@ in bios. When used vfio, requested to insmod two driv= ers vfio and vfio-pci. > Test Case1: Check Interrupt for PF with vfio driver on ixgbe and 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=3D=3D=3D=3D=3D >=20 > -1. Bind NIC PF to igb_uio drvier:: > +1. Bind NIC PF to vfio-pci drvier:: >=20 > modprobe vfio-pci; >=20 > - usertools/dpdk-devbind.py --bind=3Digb-uio 0000:04:00.0 > + usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:04:00.0 >=20 > 2. start l3fwd-power with PF:: >=20 > @@ -99,7 +99,7 @@ Test Case2: Check Interrupt for PF with igb_uio driver = on ixgbe and i40e > modprobe uio; > insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko; >=20 > - usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:04:00.0 > + usertools/dpdk-devbind.py --bind=3Digb_uio 0000:04:00.0 >=20 > 2. start l3fwd-power with PF:: >=20 > @@ -140,3 +140,54 @@ Test Case3: Check Interrupt for VF with vfio driver = on ixgbe and i40e > 4. Check if threads on core 2 have returned to sleep mode:: >=20 > L3FWD_POWER: lcore 2 sleeps until interrupt triggers > + > +Test Case4: VF interrupt pmd in VM with vfio-pci > +=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) > + > +2. passthrough VF 0 to VM0 and start VM0:: > + > + taskset -c 4,5,6,7 qemu-system-x86_64 \ > + -name vm0 -enable-kvm -pidfile /tmp/.vm0.pid -daemonize -monitor uni= x:/tmp/vm0_monitor.sock,server,nowait \ > + -device e1000,netdev=3Dnttsip1 -netdev user,id=3Dnttsip1,hostfwd=3D= tcp:10.240.176.207:6000-:22 \ > + -device vfio-pci,host=3D0000:04:02.0,id=3Dpt_0 -cpu host -smp 4 -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/image/ubuntu16-0.img,format=3Dqcow2,if=3Dvirtio,= index=3D0,media=3Ddisk > + > +3. Modify the DPDK-l3fwd-power source code and recompile the l3fwd-power= :: > + > + sed -i -e '/DEV_RX_OFFLOAD_CHECKSUM,/d' ./examples/l3fwd-power/main.= c > + > + export RTE_TARGET=3Dx86_64-native-linuxapp-gcc > + export RTE_SDK=3D`/root/DPDK` > + make -C examples/l3fwd-power > + > +4. 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 > + > +5. start l3fwd-power in VM:: > + > + examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --= config '(0,0,2)' > + > +6. Send packet with packet generator to the VM, check that thread core2 = waked up:: > + > + sendp([Ether(dst=3D'vf_mac')/IP()/UDP()/Raw(load=3D'XXXXXXXXXXXXXXXX= XX')], iface=3D"tester_intf") > + > + L3FWD_POWER: lcore 2 is waked up from rx interrupt on port 0 queue 0 > + > +7. Check if threads on core 2 have returned to sleep mode:: > + > + L3FWD_POWER: lcore 2 sleeps until interrupt triggers > \ No newline at end of file > --=20 > 2.17.2 >=20