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 F03CFA00E6 for ; Mon, 5 Aug 2019 10:29:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B33BF1BE0F; Mon, 5 Aug 2019 10:29:38 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5530F1B942 for ; Mon, 5 Aug 2019 10:29:35 +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 fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 01:29:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,349,1559545200"; d="scan'208";a="192366216" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 05 Aug 2019 01:29:35 -0700 From: "zhang,yan" To: dts@dpdk.org Cc: yuwei1.zhang@intel.com, "zhang,yan" Date: Mon, 5 Aug 2019 16:34:11 +0800 Message-Id: <1564994051-117508-1-git-send-email-yanx.a.zhang@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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" 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_interrupt_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. 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 traffic generator. -Assume PF port PCI addresses are 0000:04:00.0 and 0000:04:00.1, their -Interfaces name are p786p1 and p786p2. Assume generated VF PCI address will -be 0000:04:10.0, 0000:04:10.1. +Assume PF port PCI addresses is 0000:04:00.0, their +Interfaces name is p786p0. Assume generated VF PCI address will +be 0000:04:10.0. Iommu pass through feature has been enabled in kernel:: - intel_iommu=on iommu=pt + intel_iommu=on iommu=pt -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 vfio-pci. - -Test Case1: VF interrupt pmd in VM with uio -=========================================== - -Create one VF per Port in host and add these two VFs into VM:: - - - usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:04:00.0 0000:04: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=pci-stub 0000:04:10.0 0000: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:: + sed -i -e '/DEV_RX_OFFLOAD_CHECKSUM,/d' ./examples/l3fwd-power/main.c - l3fwd-power -c 7 -n 4 -- -p 0x3 -P --config="(0,0,1),(1,0,2)" + export RTE_TARGET=x86_64-native-linuxapp-gcc + export RTE_SDK=`/root/DPDK` + make -C examples/l3fwd-power -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 sleep:: - - 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 enable vt-d +in bios. When used vfio, requested to insmod two drivers vfio and vfio-pci. -Send packet flows to VF0 and VF1, check that thread on core1 and core2 will -keep up awake. +Test Case1: Check Interrupt for PF with vfio driver on ixgbe and i40e +===================================================================== -Test Case2: VF interrupt pmd in Host with uio -============================================= +1. Bind NIC PF to igb_uio drvier:: -Create one VF per Port in host and make sure PF interface up -uses kernel driver to create vf:: + modprobe vfio-pci; + usertools/dpdk-devbind.py --bind=igb-uio 0000:04:00.0 - 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:: -Bind VF device to igb_uio:: + examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --config '(0,0,2)' +3. Send packet with packet generator to the pf NIC, check that thread core2 waked up:: - ./usertools/dpdk-devbind.py --bind=igb_uio 0000:04:10.0 0000:04:10.1 + sendp([Ether(dst='pf_mac')/IP()/UDP()/Raw(load='XXXXXXXXXXXXXXXXXX')], iface="tester_intf") -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 0 +4. Check if threads on core 2 have returned to sleep mode:: - l3fwd-power -c 7 -n 4 -- -p 0x3 -P --config="(0,0,1),(1,0,2)" + L3FWD_POWER: lcore 2 sleeps until interrupt triggers -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 i40e +======================================================================== +1. Bind NIC PF to igb_uio drvier:: - 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; -Check the packet has been normally forwarded. + usertools/dpdk-devbind.py --bind=vfio-pci 0000:04:00.0 -After the packet forwarded, thread on core1 and core 2 will return to sleep:: +2. start l3fwd-power with PF:: - 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 --config '(0,0,2)' -Send packet flows to VF0 and VF1, check that thread on core1 and core2 will -keep up awake. +3. Send packet with packet generator to the pf NIC, check that thread core2 waked up:: -Test Case3: VF interrupt pmd in Host with vfio -============================================== + sendp([Ether(dst='pf_mac')/IP()/UDP()/Raw(load='XXXXXXXXXXXXXXXXXX')], iface="tester_intf") -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 0 +4. Check if threads on core 2 have returned to sleep mode:: - 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 -Bind VF device to host igb_uio:: +Test Case3: Check Interrupt for VF with vfio driver on ixgbe and i40e +===================================================================== +1. Generate NIC VF, then bind it to vfio drvier:: - ./usertools/dpdk-devbind.py --bind=vfio-pci 0000:04:10.0 0000:04:10.1 + echo 1 > /sys/bus/pci/devices/0000\:04\:00.0/sriov_numvfs -Start VM and start l3fwd-power with two queues per port in VM:: + modprobe vfio-pci + usertools/dpdk-devbind.py --bind=vfio-pci 0000:04:10.0(vf_pci) + Notice: If your PF is kernel driver, make sure PF link is up when your start testpmd on VF. - l3fwd-power -c 1f -n 4 -- -p 0x3 -P \ - --config="(0,0,1),(0,1,2)(1,0,3),(1,1,4)" +2. Start l3fwd-power with VF:: -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 --config '(0,0,2)' - 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 core2 waked up:: -Check the packet has been normally forwarded. + sendp([Ether(dst='vf_mac')/IP()/UDP()/Raw(load='XXXXXXXXXXXXXXXXXX')], iface="tester_intf") -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 0 - 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:: -Send packet flows to Port0 and Port1, check that thread on core1,core2,core3, -core4 will keep up awake. + L3FWD_POWER: lcore 2 sleeps until interrupt triggers -- 2.17.2