From patchwork Tue Apr 18 09:11:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126233 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 44C304297C; Tue, 18 Apr 2023 12:22:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4051440EDF; Tue, 18 Apr 2023 12:22:02 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 8D8EC40698 for ; Tue, 18 Apr 2023 12:22:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681813320; x=1713349320; h=from:to:cc:subject:date:message-id; bh=slbY53APZYf8Ic+xMcZTmnNV2ZTGJHO6XWi/rYVM2wM=; b=Uj0sExfWpKWgjVQOJ3nvuB1Duc7W/Ez8Nm7IBOl5vjiWqHk/Fg9nM2nY ITKTsbovF8lLAAG4945LyaoKr2kNkOp4JwOhpWGpVvsSDzF6jfSheCsY4 Fux3LPZ1JGRU2WOzkPpuGgfZ4ju8QRdUf0KxjM1gHgjfWaG8COznBdNe2 VRYdJI9xbiSgC+lM7wz4WSpoPDCxak24gAdUF1NPiL2DHB4KlVNYlOuVp DhFlXncDfh+ajC3iryr8TccX3VYD3xqrz4B0Ym12VaLgN0JmlMO+j207V NTN+Qpm31ooaNk6efZevhIG4QjE+u70PKtYmZFEXxLiCu8YN8OGdwvyRj w==; X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="408031573" X-IronPort-AV: E=Sophos;i="5.99,207,1677571200"; d="scan'208";a="408031573" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 03:21:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="834830512" X-IronPort-AV: E=Sophos;i="5.99,207,1677571200"; d="scan'208";a="834830512" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 03:21:58 -0700 From: Lingli Chen To: dts@dpdk.org Cc: Lingli Chen Subject: [dts][PATCH V1 1/3] test_plans/vf_macfilter: change "igb_uio" to "vfio-pci" in kernel pf cases Date: Tue, 18 Apr 2023 05:11:07 -0400 Message-Id: <20230418091109.3258-1-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 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 change "igb_uio" to "vfio-pci" in kernel pf cases in the testplan Signed-off-by: Lingli Chen --- test_plans/vf_macfilter_test_plan.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_plans/vf_macfilter_test_plan.rst b/test_plans/vf_macfilter_test_plan.rst index 583d4cae..bcb0ee6a 100644 --- a/test_plans/vf_macfilter_test_plan.rst +++ b/test_plans/vf_macfilter_test_plan.rst @@ -66,10 +66,10 @@ Test Case 1: test_kernel_2pf_2vf_1vm_iplink_macfilter -device pci-assign,host=81:0a.0,id=pt_1 5. Login vm0, got VFs pci device id in vm0, assume they are 00:06.0 & 00:07.0, - bind them to igb_uio driver, and then start testpmd, enable CRC strip, + bind them to vfio-pci driver, and then start testpmd, enable CRC strip, disable promisc mode,set it in mac forward mode:: - ./usertools/dpdk-devbind.py --bind=igb_uio 00:06.0 00:07.0 + ./usertools/dpdk-devbind.py --bind=vfio-pci 00:06.0 00:07.0 if test IAVF, start up VF port:: @@ -155,10 +155,10 @@ Test Case 2: test_kernel_2pf_2vf_1vm_mac_add_filter -device pci-assign,host=81:0a.0,id=pt_1 5. login vm0, got VFs pci device id in vm0, assume they are 00:06.0 & 00:07.0, - bind them to igb_uio driver, and then start testpmd, enable CRC strip on + bind them to vfio-pci driver, and then start testpmd, enable CRC strip on VF, disable promisc mode, add a new MAC to VF0 and then start:: - ./usertools/dpdk-devbind.py --bind=igb_uio 00:06.0 00:07.0 + ./usertools/dpdk-devbind.py --bind=vfio-pci 00:06.0 00:07.0 if test IAVF, start up VF port:: From patchwork Tue Apr 18 09:11:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126234 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 5E4EB4297C; Tue, 18 Apr 2023 12:22:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 599FF41144; Tue, 18 Apr 2023 12:22:03 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 61B1641144 for ; Tue, 18 Apr 2023 12:22:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681813322; x=1713349322; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=GJZmE/KNnd5rRFeykeVjDnTJ/qLXnz68awqPsBjdGlA=; b=JT4wabqFSjETVv+OPA0fGSFMVLhXU7PxqyMToHKo+/llZBKuQ3IhneLs lc3Ll6ryinK/hcjUw1vUhcv8nO5GnO08ARmaO7yQ9QuTP+c28lWXZTyJ1 sMSCqawBozgDVTBWh72818nRpQDeFF60/RB6aVyATgLW5tU+vA3iLOPZL t2ULtCCA2eHErKK2fXBsFl5Jglq2PwWl99e+Uyqs8K0GAyEgbQDYSQYS5 uCnYoYFASh/O/oiQZb+94/9XRYiU12+9hnrctviwxpvUnBmr0xjFjBDUd hUep8KmgTENp+v91sd8NleOJaZO2t6bWz+ZSU6VFzA1zbVUurzhOsiXw0 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="408031579" X-IronPort-AV: E=Sophos;i="5.99,207,1677571200"; d="scan'208";a="408031579" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 03:22:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="834830541" X-IronPort-AV: E=Sophos;i="5.99,207,1677571200"; d="scan'208";a="834830541" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 03:22:00 -0700 From: Lingli Chen To: dts@dpdk.org Cc: Lingli Chen Subject: [dts][PATCH V1 2/3] tests/ddp_gtp: skip igb_uio cases Date: Tue, 18 Apr 2023 05:11:08 -0400 Message-Id: <20230418091109.3258-2-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230418091109.3258-1-linglix.chen@intel.com> References: <20230418091109.3258-1-linglix.chen@intel.com> 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 skip DPDK PF + DPDK VF case, modify dts code to run pf case Signed-off-by: Lingli Chen --- tests/TestSuite_ddp_gtp.py | 59 ++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py index 22e73318..a5f857c3 100644 --- a/tests/TestSuite_ddp_gtp.py +++ b/tests/TestSuite_ddp_gtp.py @@ -11,7 +11,7 @@ import framework.utils as utils from framework.pmd_output import PmdOutput from framework.qemu_kvm import QEMUKvm from framework.settings import get_nic_name -from framework.test_case import TestCase +from framework.test_case import TestCase, skip_unsupported_host_driver VM_CORES_MASK = "all" @@ -63,26 +63,24 @@ class TestDdpGtp(TestCase): out = self.dut.send_expect("lsmod | grep igb_uio", "#") assert "igb_uio" in out, "Failed to insmod igb_uio" + self.bind_nic_driver(self.dut_ports, "igb_uio") + self.setup_vm_env() + self.load_profile() + self.vm0_testpmd.start_testpmd( + VM_CORES_MASK, + "--port-topology=chained --txq=%s --rxq=%s" + % (self.VF_QUEUE, self.VF_QUEUE), + ) + self.vm0_testpmd.execute_cmd("set fwd rxonly") + self.vm0_testpmd.execute_cmd("set verbose 1") + self.vm0_testpmd.execute_cmd("start") def set_up(self): self.dut_testpmd = PmdOutput(self.dut) self.used_dut_port = self.dut_ports[0] tester_port = self.tester.get_local_port(self.used_dut_port) self.tester_intf = self.tester.get_interface(tester_port) - if "vf" in self._suite_result.test_case: - self.insmod_modprobe("igb_uio") - self.bind_nic_driver(self.dut_ports, "igb_uio") - self.setup_vm_env() - self.load_profile() - self.vm0_testpmd.start_testpmd( - VM_CORES_MASK, - "--port-topology=chained --txq=%s --rxq=%s" - % (self.VF_QUEUE, self.VF_QUEUE), - ) - self.vm0_testpmd.execute_cmd("set fwd rxonly") - self.vm0_testpmd.execute_cmd("set verbose 1") - self.vm0_testpmd.execute_cmd("start") - else: + if "pf" in self._suite_result.test_case: self.load_profile() def search_queue_number(self, Q_strip): @@ -443,39 +441,44 @@ class TestDdpGtp(TestCase): self.gtp_test(type="clfter", port="pf", tunnel_pkt="gtpu", inner_L3="ipv4") self.gtp_test(type="clfter", port="pf", tunnel_pkt="gtpu", inner_L3="ipv6") + @skip_unsupported_host_driver(["vfio-pci"]) def test_clfter_gtpc_vf(self): """ GTP is supported by NVM with profile updated. Select cloud filter, send gtpc packet to VF, check PF could receive packet using configured queue, checksum is good. """ + self.insmod_modprobe("igb_uio") self.gtp_test(type="clfter", port="vf id 0", tunnel_pkt="gtpc", inner_L3=None) + self.destroy_vm_env() + @skip_unsupported_host_driver(["vfio-pci"]) def test_clfter_gtpu_vf(self): """ GTP is supported by NVM with profile updated. Select cloud filter, send gtpu packet to VF, check PF could receive packet using configured queue, checksum is good. """ + self.insmod_modprobe("igb_uio") self.gtp_test(type="clfter", port="vf id 0", tunnel_pkt="gtpu", inner_L3=None) self.gtp_test(type="clfter", port="vf id 0", tunnel_pkt="gtpu", inner_L3="ipv4") self.gtp_test(type="clfter", port="vf id 0", tunnel_pkt="gtpu", inner_L3="ipv6") + self.destroy_vm_env() def tear_down(self): - if "vf" in self._suite_result.test_case: - self.destroy_vm_env() - self.dut_testpmd.execute_cmd("stop") - out = self.dut_testpmd.execute_cmd("ddp get list 0") - if "Profile number is: 0" not in out: - self.dut_testpmd.execute_cmd("port stop all") - time.sleep(1) - self.dut_testpmd.execute_cmd("ddp del 0 /tmp/gtp.bak") + if "vf" not in self._suite_result.test_case: + self.dut_testpmd.execute_cmd("stop") out = self.dut_testpmd.execute_cmd("ddp get list 0") - self.verify( - "Profile number is: 0" in out, "Failed to delete ddp profile!!!" - ) - self.dut_testpmd.execute_cmd("port start all") - self.dut_testpmd.quit() + if "Profile number is: 0" not in out: + self.dut_testpmd.execute_cmd("port stop all") + time.sleep(1) + self.dut_testpmd.execute_cmd("ddp del 0 /tmp/gtp.bak") + out = self.dut_testpmd.execute_cmd("ddp get list 0") + self.verify( + "Profile number is: 0" in out, "Failed to delete ddp profile!!!" + ) + self.dut_testpmd.execute_cmd("port start all") + self.dut_testpmd.quit() def tear_down_all(self): if self.env_done: From patchwork Tue Apr 18 09:11:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126235 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 8A85C4297C; Tue, 18 Apr 2023 12:22:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 872B642C24; Tue, 18 Apr 2023 12:22:06 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 681B240698 for ; Tue, 18 Apr 2023 12:22:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681813325; x=1713349325; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=BqLheIB3Xe4N5x7ffOND2I2D94I6WW5DBHDmdRuVEiM=; b=fqNh3ZucwawELr5yT8uktxVk5XWiuyIsQCBd8wkU+uAD2p/KbUpH8WNB 6WGzjRhZ3D+6Smbk4/sqnOViVyeAwPyRDZUFrp+3Y7KKtlgXwEC1odVmV VlTYult24Pp6Y230u5wnC0FZay2eKv75C+Be/apX6houSdPN1GgjUKubU ze+weolfuKHKLzAUxFlPaQ86FMgiADrpAFr7cWo19b8XEOpr9Ken0RCmc zEwSKCVOn3pMPsXCwASmIZVAY2heNQxqjXk76imnYk7c+wA77vkpKBkN2 oQopt5wj3JEz9i53txvQm7jaVpIYCDnRtaf66m/m8WpWmcYj2qEa1HdHj g==; X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="408031583" X-IronPort-AV: E=Sophos;i="5.99,207,1677571200"; d="scan'208";a="408031583" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 03:22:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10683"; a="834830597" X-IronPort-AV: E=Sophos;i="5.99,207,1677571200"; d="scan'208";a="834830597" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2023 03:22:03 -0700 From: Lingli Chen To: dts@dpdk.org Cc: Lingli Chen Subject: [dts][PATCH V1 3/3] tests/ddp_mpls: skip igb_uio cases Date: Tue, 18 Apr 2023 05:11:09 -0400 Message-Id: <20230418091109.3258-3-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230418091109.3258-1-linglix.chen@intel.com> References: <20230418091109.3258-1-linglix.chen@intel.com> 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 skip DPDK PF + DPDK VF case, modify dts code to run pf case Signed-off-by: Lingli Chen --- tests/TestSuite_ddp_mpls.py | 50 ++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index f0d4ef7d..08834a9e 100644 --- a/tests/TestSuite_ddp_mpls.py +++ b/tests/TestSuite_ddp_mpls.py @@ -12,7 +12,7 @@ import framework.utils as utils from framework.pmd_output import PmdOutput from framework.qemu_kvm import QEMUKvm from framework.settings import get_nic_name -from framework.test_case import TestCase +from framework.test_case import TestCase, skip_unsupported_host_driver VM_CORES_MASK = "all" PF_MAX_QUEUE = 64 @@ -45,7 +45,16 @@ class Testddp_mpls(TestCase): self.dut.send_expect("modprobe vfio-pci", "#") def set_up(self): - self.setup_vm_env() + if "vf" not in self._suite_result.test_case: + self.used_dut_port = self.dut_ports[0] + tester_port = self.tester.get_local_port(self.used_dut_port) + self.tester_intf = self.tester.get_interface(tester_port) + self.dut_testpmd = PmdOutput(self.dut) + self.dut_testpmd.start_testpmd( + "Default", + "--port-topology=chained --txq=%s --rxq=%s" + % (PF_MAX_QUEUE, PF_MAX_QUEUE), + ) def setup_vm_env(self, driver="default"): """ @@ -92,7 +101,8 @@ class Testddp_mpls(TestCase): ) def destroy_vm_env(self): - + self.vm0_testpmd.execute_cmd("stop") + self.vm0_testpmd.quit() if getattr(self, "vm0", None): self.vm0_dut.kill_all() self.vm0_testpmd = None @@ -211,38 +221,44 @@ class Testddp_mpls(TestCase): self.load_profile() self.mpls_test(port="pf", pkt="gre") + @skip_unsupported_host_driver(["vfio-pci"]) def test_mpls_udp_vf(self): """ MPLS is supported by NVM with profile updated. Send mpls udp packet to VF, check VF could receive packet using configured queue, checksum is good. """ + self.setup_vm_env() self.load_profile() self.mpls_test(port="vf id 0", pkt="udp") + self.destroy_vm_env() + @skip_unsupported_host_driver(["vfio-pci"]) def test_mpls_gre_vf(self): """ MPLS is supported by NVM with profile updated. Send mpls gre packet to VF, check VF could receive packet using configured queue, checksum is good. """ + self.setup_vm_env() self.load_profile() self.mpls_test(port="vf id 0", pkt="gre") + self.destroy_vm_env() def tear_down(self): - self.vm0_testpmd.execute_cmd("stop") - self.dut_testpmd.execute_cmd("stop") - out = self.dut_testpmd.execute_cmd("ddp get list 0") - if "Profile number is: 0" not in out: - self.dut_testpmd.execute_cmd("port stop all") - time.sleep(1) - self.dut_testpmd.execute_cmd("ddp del 0 /tmp/mpls.bak") + + if "vf" not in self._suite_result.test_case: + self.dut_testpmd.execute_cmd("stop") out = self.dut_testpmd.execute_cmd("ddp get list 0") - self.verify( - "Profile number is: 0" in out, "Failed to delete mpls profile!!!" - ) - self.dut_testpmd.execute_cmd("port start all") - self.vm0_testpmd.quit() - self.dut_testpmd.quit() + if "Profile number is: 0" not in out: + self.dut_testpmd.execute_cmd("port stop all") + time.sleep(1) + self.dut_testpmd.execute_cmd("ddp del 0 /tmp/mpls.bak") + out = self.dut_testpmd.execute_cmd("ddp get list 0") + self.verify( + "Profile number is: 0" in out, "Failed to delete mpls profile!!!" + ) + self.dut_testpmd.execute_cmd("port start all") + + self.dut_testpmd.quit() def tear_down_all(self): - self.destroy_vm_env() pass