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 D9EA6A00E6 for ; Mon, 5 Aug 2019 10:45:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 991941BE1E; Mon, 5 Aug 2019 10:45:53 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1C0B91BE0F for ; Mon, 5 Aug 2019 10:45:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 01:45:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,349,1559545200"; d="scan'208";a="257656673" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 05 Aug 2019 01:45:49 -0700 Received: from fmsmsx162.amr.corp.intel.com (10.18.125.71) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 5 Aug 2019 01:45:48 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx162.amr.corp.intel.com (10.18.125.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 5 Aug 2019 01:45:47 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.19]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.112]) with mapi id 14.03.0439.000; Mon, 5 Aug 2019 16:45:46 +0800 From: "Zhu, WenhuiX" To: "Zhang, YanX A" , "dts@dpdk.org" CC: "Zhang, Yuwei1" , "Zhang, YanX A" Thread-Topic: [dts] [PATCH V1] test_plans/vf_interrupt_pmd_test_plan:Modify test plan Thread-Index: AQHVS2gAzFAIkLoJUEiisS2SZLN6RqbsPWDw Date: Mon, 5 Aug 2019 08:45:45 +0000 Message-ID: References: <1564994051-117508-1-git-send-email-yanx.a.zhang@intel.com> In-Reply-To: <1564994051-117508-1-git-send-email-yanx.a.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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_test_plan:Modify test plan 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" Tested-by: Zhu, WenhuiX -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhang,yan Sent: Monday, August 5, 2019 4:34 PM To: dts@dpdk.org Cc: Zhang, Yuwei1 ; Zhang, YanX A Subject: [dts] [PATCH V1] test_plans/vf_interrupt_pmd_test_plan:Modify test= plan Modify test_plan. Signed-off-by: zhang,yan --- test_plans/vf_interrupt_pmd_test_plan.rst | 131 +++++++++------------- 1 file changed, 51 insertions(+), 80 deletions(-) diff --git a/test_plans/vf_interrupt_pmd_test_plan.rst b/test_plans/vf_inte= rrupt_pmd_test_plan.rst index 1c4bb7d..6464ebc 100644 --- a/test_plans/vf_interrupt_pmd_test_plan.rst +++ b/test_plans/vf_interrupt_pmd_test_plan.rst @@ -1,4 +1,4 @@ -.. Copyright (c) <2017>, Intel Corporation +.. Copyright (c) <2017-2019>, Intel Corporation All rights reserved. =20 Redistribution and use in source and binary forms, with or without @@ -= 49,123 +49,94 @@ Prerequisites Each of the 10Gb Ethernet* ports of the DUT= is directly connected in full-duplex to a different port of the peer traf= fic generator. =20 -Assume PF port PCI addresses are 0000:04:00.0 and 0000:04:00.1, their -Int= erfaces name are p786p1 and p786p2. Assume generated VF PCI address will -b= e 0000:04:10.0, 0000:04:10.1. +Assume PF port PCI addresses is 0000:04:00.0, their Interfaces name is=20 +p786p0. Assume generated VF PCI address will be 0000:04:10.0. =20 Iommu pass through feature has been enabled in kernel:: =20 - intel_iommu=3Don iommu=3Dpt + intel_iommu=3Don iommu=3Dpt =20 -Support igb_uio and vfio driver, if used vfio, kernel need 3.6+ and enable= vt-d -in bios. When used vfio, requested to insmod two drivers vfio and vf= io-pci. - -Test Case1: VF interrupt pmd in VM with uio -=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 - -Create one VF per Port in host and add these two VFs into VM:: - - - usertools/dpdk-devbind.py --force --bind=3Dvfio-pci 0000:04:00.0 0000:0= 4:00.1 - echo 1 >/sys/bus/pci/devices/0000\:04\:00.0/max_vfs - echo 1 >/sys/bus/pci/devices/0000\:04\:00.1/max_vfs - usertools/dpdk-devbind.py --force --bind=3Dpci-stub 0000:04:10.0 0= 000:04:10.1 - -Start VM and start l3fwd-power with one queue per port in VM:: +Modify the DPDK-l3fwd-power source code and recompile the l3fwd-power:: =20 + sed -i -e '/DEV_RX_OFFLOAD_CHECKSUM,/d'=20 + ./examples/l3fwd-power/main.c =20 - l3fwd-power -c 7 -n 4 -- -p 0x3 -P --config=3D"(0,0,1),(1,0,2)" + export RTE_TARGET=3Dx86_64-native-linuxapp-gcc + export RTE_SDK=3D`/root/DPDK` + make -C examples/l3fwd-power =20 -Send one packet to VF0 and VF1, check that thread on core1 and core2 waked= up:: - - - L3FWD_POWER: lcore 1 is waked up from rx interrupt on port1,rxq0 - L3FWD_POWER: lcore 2 is waked up from rx interrupt on port1,rxq0 - -Check the packet has been normally forwarded. - -After the packet forwarded, thread on core1 and core 2 will return to slee= p:: - - L3FWD_POWER: lcore 1 sleeps until interrupt on port0,rxq0 triggers - L3FWD_POWER: lcore 2 sleeps until interrupt on port0,rxq0 triggers +Support igb_uio and vfio driver, if used vfio, kernel need 3.6+ and=20 +enable vt-d in bios. When used vfio, requested to insmod two drivers vfio = and vfio-pci. =20 -Send packet flows to VF0 and VF1, check that thread on core1 and core2 wil= l -keep up awake. +Test Case1: Check Interrupt for PF with vfio driver on ixgbe and i40e=20 +=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 -Test Case2: VF interrupt pmd in Host with uio -=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. Bind NIC PF to igb_uio drvier:: =20 -Create one VF per Port in host and make sure PF interface up -uses kernel = driver to create vf:: + modprobe vfio-pci; =20 + usertools/dpdk-devbind.py --bind=3Digb-uio 0000:04:00.0 =20 - echo 1 >/sys/bus/pci/devices/0000\:04\:00.1/sriov_numvf - echo 1 >/sys/bus/pci/devices/0000\:04\:00.1/sriov_numvf +2. start l3fwd-power with PF:: =20 -Bind VF device to igb_uio:: + examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --co= nfig '(0,0,2)' =20 +3. Send packet with packet generator to the pf NIC, check that thread core= 2 waked up:: =20 - ./usertools/dpdk-devbind.py --bind=3Digb_uio 0000:04:10.0 0000:04:10.1 + =20 + sendp([Ether(dst=3D'pf_mac')/IP()/UDP()/Raw(load=3D'XXXXXXXXXXXXXXXXXX')]= ,=20 + iface=3D"tester_intf") =20 -Start host and start l3fwd-power with one queue per port in host:: + L3FWD_POWER: lcore 2 is waked up from rx interrupt on port 0 queue=20 + 0 =20 +4. Check if threads on core 2 have returned to sleep mode:: =20 - l3fwd-power -c 7 -n 4 -- -p 0x3 -P --config=3D"(0,0,1),(1,0,2)" + L3FWD_POWER: lcore 2 sleeps until interrupt triggers =20 -Send one packet to VF0 and VF1, check that thread on core1 and core2 waked= up:: +Test Case2: Check Interrupt for PF with igb_uio driver on ixgbe and=20 +i40e=20 +=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=3D=3D +=3D =20 +1. Bind NIC PF to igb_uio drvier:: =20 - L3FWD_POWER: lcore 1 is waked up from rx interrupt on port1,rxq0 - L3FWD_POWER: lcore 2 is waked up from rx interrupt on port1,rxq0 + modprobe uio; + insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko; =20 -Check the packet has been normally forwarded. + usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:04:00.0 =20 -After the packet forwarded, thread on core1 and core 2 will return to slee= p:: +2. start l3fwd-power with PF:: =20 - L3FWD_POWER: lcore 1 sleeps until interrupt on port0,rxq0 triggers - L3FWD_POWER: lcore 2 sleeps until interrupt on port0,rxq0 triggers + examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --co= nfig '(0,0,2)' =20 -Send packet flows to VF0 and VF1, check that thread on core1 and core2 wil= l -keep up awake. +3. Send packet with packet generator to the pf NIC, check that thread core= 2 waked up:: =20 -Test Case3: VF interrupt pmd in Host with vfio -=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 + sendp([Ether(dst=3D'pf_mac')/IP()/UDP()/Raw(load=3D'XXXXXXXXXXXXXXXXXX')]= ,=20 + iface=3D"tester_intf") =20 -Create one VF per Port in host and make sure PF interface up -uses kernel = driver to create vf:: + L3FWD_POWER: lcore 2 is waked up from rx interrupt on port 0 queue=20 + 0 =20 +4. Check if threads on core 2 have returned to sleep mode:: =20 - echo 1 >/sys/bus/pci/devices/0000\:04\:00.1/sriov_numvf - echo 1 >/sys/bus/pci/devices/0000\:04\:00.1/sriov_numvf + L3FWD_POWER: lcore 2 sleeps until interrupt triggers =20 -Bind VF device to host igb_uio:: +Test Case3: Check Interrupt for VF with vfio driver on ixgbe and i40e=20 +=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. Generate NIC VF, then bind it to vfio drvier:: =20 - ./usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:04:10.0 0000:04:10.1 + echo 1 > /sys/bus/pci/devices/0000\:04\:00.0/sriov_numvfs =20 -Start VM and start l3fwd-power with two queues per port in VM:: + modprobe vfio-pci + usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:04:10.0(vf_pci) =20 + Notice: If your PF is kernel driver, make sure PF link is up when your = start testpmd on VF. =20 - l3fwd-power -c 1f -n 4 -- -p 0x3 -P \ - --config=3D"(0,0,1),(0,1,2)(1,0,3),(1,1,4)" +2. Start l3fwd-power with VF:: =20 -Send packets with increased dest IP to Port0 and Port1, check that thread = on -core1,core2,core3,core4 waked up:: + examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --co= nfig '(0,0,2)' =20 - L3FWD_POWER: lcore 1 is waked up from rx interrupt on port1,rxq0 - L3FWD_POWER: lcore 2 is waked up from rx interrupt on port1,rxq1 - L3FWD_POWER: lcore 3 is waked up from rx interrupt on port1,rxq0 - L3FWD_POWER: lcore 4 is waked up from rx interrupt on port1,rxq1 +3. Send packet with packet generator to the pf NIC, check that thread core= 2 waked up:: =20 -Check the packet has been normally forwarded. + =20 + sendp([Ether(dst=3D'vf_mac')/IP()/UDP()/Raw(load=3D'XXXXXXXXXXXXXXXXXX')]= ,=20 + iface=3D"tester_intf") =20 -After the packet forwarded, thread on core1,core2,core3,core4 will return = to -sleep:: + L3FWD_POWER: lcore 2 is waked up from rx interrupt on port 0 queue=20 + 0 =20 - L3FWD_POWER: lcore 1 sleeps until interrupt on port0,rxq0 triggers - L3FWD_POWER: lcore 2 sleeps until interrupt on port0,rxq1 triggers - L3FWD_POWER: lcore 3 sleeps until interrupt on port1,rxq0 triggers - L3FWD_POWER: lcore 4 sleeps until interrupt on port1,rxq1 triggers +4. Check if threads on core 2 have returned to sleep mode:: =20 -Send packet flows to Port0 and Port1, check that thread on core1,core2,cor= e3, -core4 will keep up awake. + L3FWD_POWER: lcore 2 sleeps until interrupt triggers -- 2.17.2