From patchwork Wed Jan 19 07:54:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 106064 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03F01A0353; Wed, 19 Jan 2022 08:54:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED9A640E50; Wed, 19 Jan 2022 08:54:36 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 42B3D4013F for ; Wed, 19 Jan 2022 08:54:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642578875; x=1674114875; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8+OtZNhhEKuUKxr6K0H/1k/ye/DMHLZ0TK/rr6ozBFg=; b=ELL35B7AM+y6aXzt+iRxXMXK6TnVyJAjqSk0y2ewVgbN8sDy6ED2ZO1P LuOjoX09PtVAJnFVtws0xcGaPNRYvvilPNl27bRImskZ0lITUlw+3ujif ASSwGqEONr4udib7r5S2e9uRuiytq49/KHVbP92gdbRyR197KAeGJ1L/v pwSO7X0BASdHgdksQJXIhTu/uTjGnaAeT0ZFJALBLbwI3aQnb7xOOjEYd klfQuB9XErJdnx5MtTxuPDxgcc/Cst4XFnKq3OwqTNLuB40db/PTuJrR4 PJufi7ONlJsy9hd3FzigLHBXdL6Cux3Q9C5iRgpRktByPJqF39pu7oztG g==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="224986562" X-IronPort-AV: E=Sophos;i="5.88,299,1635231600"; d="scan'208";a="224986562" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 23:54:33 -0800 X-IronPort-AV: E=Sophos;i="5.88,299,1635231600"; d="scan'208";a="532161895" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 23:54:31 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 1/2] test_plans/vf_interrupt_pmd_test_plan: remove change DPDK code steps Date: Wed, 19 Jan 2022 15:54:27 +0800 Message-Id: <20220119075427.919555-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 1.Remove change DPDK code steps. 2.Modify app name from l3fwd-power to dpdk-l3fwd-power. Signed-off-by: Wei Ling --- test_plans/vf_interrupt_pmd_test_plan.rst | 30 +++++++++-------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/test_plans/vf_interrupt_pmd_test_plan.rst b/test_plans/vf_interrupt_pmd_test_plan.rst index a8ed3d8e..59eae680 100644 --- a/test_plans/vf_interrupt_pmd_test_plan.rst +++ b/test_plans/vf_interrupt_pmd_test_plan.rst @@ -57,13 +57,10 @@ Iommu pass through feature has been enabled in kernel:: intel_iommu=on iommu=pt -Modify the DPDK-l3fwd-power source code and recompile the l3fwd-power:: +Compile the dpdk-l3fwd-power:: - sed -i -e '/DEV_RX_OFFLOAD_CHECKSUM,/d' ./examples/l3fwd-power/main.c - - export RTE_TARGET=x86_64-native-linuxapp-gcc - export RTE_SDK=`/root/DPDK` - make -C examples/l3fwd-power + meson configure -Dexamples=l3fwd-power x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc 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. @@ -79,7 +76,7 @@ Test Case1: Check Interrupt for PF with vfio driver on ixgbe and i40e 2. start l3fwd-power with PF:: - examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --config '(0,0,2)' + x86_64-native-linuxapp-gcc/examples/dpdk-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:: @@ -103,7 +100,7 @@ Test Case2: Check Interrupt for PF with igb_uio driver on ixgbe and i40e 2. start l3fwd-power with PF:: - examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --config '(0,0,2)' + x86_64-native-linuxapp-gcc/examples/dpdk-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:: @@ -129,7 +126,7 @@ Test Case3: Check Interrupt for VF with vfio driver on ixgbe and i40e 2. Start l3fwd-power with VF:: - examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --config '(0,0,2)' + x86_64-native-linuxapp-gcc/examples/dpdk-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:: @@ -161,13 +158,10 @@ Test Case4: VF interrupt pmd in VM with vfio-pci -device virtserialport,chardev=vm0_qga0,name=org.qemu.guest_agent.0 -vnc :11 \ -drive file=/home/image/ubuntu16-0.img,format=qcow2,if=virtio,index=0,media=disk -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 +3. Compile the l3fwd-power:: - export RTE_TARGET=x86_64-native-linuxapp-gcc - export RTE_SDK=`/root/DPDK` - make -C examples/l3fwd-power + meson configure -Dexamples=l3fwd-power x86_64-native-linuxapp-gcc + ninja -C x86_64-native-linuxapp-gcc 4. Bind VF 0 to the vfio-pci driver:: @@ -180,7 +174,7 @@ Test Case4: VF interrupt pmd in VM with vfio-pci 5. start l3fwd-power in VM:: - examples/l3fwd-power/build/l3fwd-power -l 1-3 -n 4 -- -P -p 0x01 --config '(0,0,2)' + x86_64-native-linuxapp-gcc/examples/dpdk-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:: @@ -205,7 +199,7 @@ Test Case5: vf multi-queue interrupt with vfio-pci on i40e 2. Start l3fwd-power with VF:: - examples/l3fwd-power/build/l3fwd-power -c 3f -n 4 -m 2048 -- -P -p 0x1 --config="(0,0,1),(0,1,2),(0,2,3),(0,3,4)" + x86_64-native-linuxapp-gcc/examples/dpdk-l3fwd-power -c 3f -n 4 -m 2048 -- -P -p 0x1 --config="(0,0,1),(0,1,2),(0,2,3),(0,3,4)" 3. Send UDP packets with random ip and dest mac = vf mac addr:: @@ -252,7 +246,7 @@ Test Case6: VF multi-queue interrupt in VM with vfio-pci on i40e 4.Start l3fwd-power in VM:: - ./build/l3fwd-power -l 0-3 -n 4 -m 2048 -- -P -p 0x1 --config="(0,0,0),(0,1,1),(0,2,2),(0,3,3)" + x86_64-native-linuxapp-gcc/examples/dpdk-l3fwd-power -l 0-3 -n 4 -m 2048 -- -P -p 0x1 --config="(0,0,0),(0,1,1),(0,2,2),(0,3,3)" 5. Send UDP packets with random ip and dest mac = vf mac addr:: From patchwork Wed Jan 19 07:54:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 106065 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25A48A0353; Wed, 19 Jan 2022 08:54:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 177D6410E1; Wed, 19 Jan 2022 08:54:49 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 9C89F4013F for ; Wed, 19 Jan 2022 08:54:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642578886; x=1674114886; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=BbZhS4ILaFJB3CgGDNDv3kPfoPxHzObYZul4o0Fij78=; b=JpiSAx3347iGDpECkUnpfJx7Besg94ue3sBge1PPHCCLm+2/t4Jj0qAJ TaNHDIP+B2npDbHUFnBPcc51rCYkE/4POVGKjOMWNULdUrhWfVhF3a3Wa sl3tGw8u49Q/PeRKS7sQKeWeMXqxJ83F+bYIp0ATJfymQtHc9Q1Z1JduM xJ7SkvVu4ohdzjbpiCa+ULic7Afei9080EoUom+sOaEI1mM2zmoy3VJGj IydbW2WyZUCKD2rliccVXFeCJaR2EbsoAFgYP/FwuZpk0trg6FJKWZAXt 2umWnoIB+T+toWYjx+d9wGlLhnTR/lJ4DVEzcE16m/CxFCl1pdzJEI3wk g==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="269397449" X-IronPort-AV: E=Sophos;i="5.88,299,1635231600"; d="scan'208";a="269397449" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 23:54:43 -0800 X-IronPort-AV: E=Sophos;i="5.88,299,1635231600"; d="scan'208";a="532161976" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 23:54:41 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 2/2] tests/vf_interrupt_pmd: remove change DPDK code steps Date: Wed, 19 Jan 2022 15:54:37 +0800 Message-Id: <20220119075437.919618-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 v1: Remove change DPDK code steps. v2: Add insmod igb_uio driver step in test_nic_interrupt_PF_igb_uio case. Signed-off-by: Wei Ling Tested-by: Chenyu Huang --- tests/TestSuite_vf_interrupt_pmd.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tests/TestSuite_vf_interrupt_pmd.py b/tests/TestSuite_vf_interrupt_pmd.py index aff1f35a..3f2a77d8 100644 --- a/tests/TestSuite_vf_interrupt_pmd.py +++ b/tests/TestSuite_vf_interrupt_pmd.py @@ -44,7 +44,6 @@ from framework.packet import Packet from framework.test_case import TestCase from framework.virt_common import VM - class TestVfInterruptPmd(TestCase): supported_vf_driver = ['pci-stub', 'vfio-pci'] @@ -88,11 +87,8 @@ class TestVfInterruptPmd(TestCase): def prepare_l3fwd_power(self, use_dut): """ - Change the DPDK source code and recompile + Compile dpdk-l3fwd-power """ - use_dut.send_expect( - "sed -i -e '/DEV_RX_OFFLOAD_CHECKSUM,/d' \ - ./examples/l3fwd-power/main.c", "#", 10) out = use_dut.build_dpdk_apps("./examples/l3fwd-power") self.path = use_dut.apps_name['l3fwd-power'] self.verify("Error" not in out, "compilation error") @@ -101,15 +97,18 @@ class TestVfInterruptPmd(TestCase): """ Send a packet and verify """ + time.sleep(3) pkt = Packet(pkt_type='UDP') pkt.config_layer('ether', {'dst': mac, 'src': self.tester_mac}) pkt.send_pkt(self.tester, tx_port=testinterface) self.out2 = use_dut.get_session_output(timeout=2) + def send_packet_loop(self, mac, testinterface, use_dut, ip_addr): """ Send a packet and verify """ + time.sleep(3) pkt = Packet(pkt_type='UDP') pkt.config_layer('ether', {'dst': mac, 'src': self.tester_mac}) pkt.config_layer('ipv4', {'dst': '2.1.1.5', 'src': '2.1.1.%s' % ip_addr}) @@ -297,6 +296,8 @@ class TestVfInterruptPmd(TestCase): """ self.prepare_l3fwd_power(self.dut) + self.dut.setup_modules_linux(self.target, 'igb_uio', '') + self.dut.ports_info[0]['port'].bind_driver(driver='igb_uio') self.begin_l3fwd_power(self.dut) @@ -362,17 +363,6 @@ class TestVfInterruptPmd(TestCase): config_info += '(0,%d,%d)' % (queue, queue) cmd = self.path + "-c %s -n 4 -- -P -p 0x1" % core_mask_user + " --config='%s'" % config_info self.vm0_dut.send_expect(cmd, "L3FWD_POWER", 60) - time.sleep(1) - try: - self.logger.info("Launch l3fwd_sample sample:") - self.out = self.vm0_dut.send_expect(cmd, "L3FWD_POWER", 60) - if "Error" in self.out: - raise Exception("Launch l3fwd-power sample failed") - else: - self.logger.info("Launch l3fwd-power sample finished") - except Exception as e: - self.logger.error("ERROR: Failed to launch l3fwd-power sample: %s" - % str(e)) stroutput = "" for ip in range(2, 10): self.send_packet_loop(self.vf0_mac, self.rx_intf_0, self.vm0_dut, ip)