From patchwork Thu Apr 20 07:05:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126296 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 A56F042996; Thu, 20 Apr 2023 10:16:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CD3942B71; Thu, 20 Apr 2023 10:16:12 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 1B00E40687 for ; Thu, 20 Apr 2023 10:16:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681978571; x=1713514571; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=slbY53APZYf8Ic+xMcZTmnNV2ZTGJHO6XWi/rYVM2wM=; b=HVH4XEu80otlZiVJz7qV+bHdq9VVpazjdcWMPPLQX19PQB7Q9D8Dff6A 0gAuD2CqmNPwBnOxZWQ9VVBnq1FI//zEqg5pvlR5ErCNg9sj23Nq31uAn x+1Y33MPAcHpMolvvMbGCD3VG1J65+CGa+PLOcGpMZhInX9reBQ0aUYpM Tfy95lu1qr11EA1Ita3LW4gN6idb4cm8ZAVZInzA+ZoMe7S00efraQpzw IJtaTJp2KT2WfxYSCIyHp5ngj4fDvrU0FpGMxeOb14DGUUs9qP90zlaF0 ZLKJf9Ivo0QhXXI+N3Gm41b4NWbpe0rfStYMCvGNQDKpbYuhWSEvjyYYy Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="325998505" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="325998505" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="642061687" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="642061687" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:15:58 -0700 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V1 1/5] test_plans/vf_macfilter: change "igb_uio" to "vfio-pci" in kernel pf cases Date: Thu, 20 Apr 2023 03:05:02 -0400 Message-Id: <20230420070506.10015-2-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230420070506.10015-1-linglix.chen@intel.com> References: <20230420070506.10015-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 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 Thu Apr 20 07:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126297 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 7FC8342995; Thu, 20 Apr 2023 10:16:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79FE341141; Thu, 20 Apr 2023 10:16:14 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 99DEC40A4B for ; Thu, 20 Apr 2023 10:16:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681978571; x=1713514571; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=VohEE4kSrsUDDbTJQt2BC/CL7/pUHJe6uyyH7rCotNE=; b=CnMvoDuz4AQ/D0u1XXAIsUxY4c96olmgDfeK7ogoIHeR6NRgC7+oJiFx ZNTuD0TBfS/OjynWtvYoSf1HGjADBwBtjXNNhbO3ajTTziYOEcBgygAGr rpuzqZl9RFNt6JwZGzXHoSTXZGdXZ/LDxj+UmPhou2gf4gg5r07wUFzSJ y2BoFJrd3b7lm9x6zAZOkthdAUBAeaJgQ42OAQuuFpuHP8knouk8v1x0l YmGsUCZw7tUkkoHt0Q6LOkOZ8rZTznjxBTC4FXRuaRC0imDZObtxcOomP hWvAq4kUGFrZnxHfXGHK87LzHWUQemlUGmnhkZHCCaDfnz9hunzavXDNe w==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="325998509" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="325998509" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="642061692" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="642061692" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:00 -0700 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V1 2/5] test_plans/ddp_gtp: add note Date: Thu, 20 Apr 2023 03:05:03 -0400 Message-Id: <20230420070506.10015-3-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230420070506.10015-1-linglix.chen@intel.com> References: <20230420070506.10015-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 add bind port note Signed-off-by: Lingli Chen --- test_plans/ddp_gtp_test_plan.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_plans/ddp_gtp_test_plan.rst b/test_plans/ddp_gtp_test_plan.rst index 2dd44640..8275e355 100644 --- a/test_plans/ddp_gtp_test_plan.rst +++ b/test_plans/ddp_gtp_test_plan.rst @@ -55,6 +55,10 @@ Prerequisites .//app/dpdk-testpmd -c f -n 4 -- -i --port-topology=chained --txq=64 --rxq=64 +.. note:: + + if test DPDK PF + DPDK VF, bind port to igb_uio, + if only test PF, bind pf port to vfio-pci or igb_uio. Test Case: Load dynamic device personalization ================================================ From patchwork Thu Apr 20 07:05:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126298 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 A31AB42996; Thu, 20 Apr 2023 10:16:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BF0142C76; Thu, 20 Apr 2023 10:16:14 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id D63A240687 for ; Thu, 20 Apr 2023 10:16:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681978572; x=1713514572; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=7AIB0BlpP8RNiKYVoXExMnZ7oI176b13Tyup/EILQMw=; b=nOeRHjKsQim2B3ZOSY6h/Xpt6HDIm5VpPbR76J+WQ+O+2W5vp6+Qz6Ss UHCcdcyZ4awjxJLsogOO42S7oLIw6+2FkwNq8SwhwAYPZ1Eq4n0szlYKa q6A8Xx+qWN6Z9uiRtnHFpMxOctrESH4vvsMA23j5iEBrBCkiHsfYC8M+h HFCh20cKmLQpMCSsdN9qQJW8zMO1L4ZrzLMjP2iUhDkgZJT+p68kvbwH5 +VSCoO6ken9wFx0MAUzNcbsIKknQyoFLK/g1R0Az2yQy0HMuh/SvX8AUo Xo7yLlohwDLh/CB6PPm+nJ9x65YYYYoQ25bFayhpWr293wAJxpcrsswcj g==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="325998517" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="325998517" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="642061698" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="642061698" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:02 -0700 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V1 3/5] tests/ddp_gtp: skip igb_uio cases Date: Thu, 20 Apr 2023 03:05:04 -0400 Message-Id: <20230420070506.10015-4-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230420070506.10015-1-linglix.chen@intel.com> References: <20230420070506.10015-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 | 63 ++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py index 22e73318..ba1e4566 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" @@ -48,9 +48,11 @@ class TestDdpGtp(TestCase): self.vf_assign_method = "vfio-pci" self.dut.send_expect("modprobe vfio-pci", "#") - def insmod_modprobe(self, modename=""): + def setup_vf_env(self, modename=""): """ Insmod modProbe before run test case + bind VF0 device to igb_uio driver + Start testpmd on host and vm0 """ if modename == "igb_uio": self.dut.send_expect("modprobe uio", "#", 10) @@ -63,26 +65,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 +443,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.setup_vf_env("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.setup_vf_env("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 Thu Apr 20 07:05:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126299 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 1903A42997; Thu, 20 Apr 2023 10:16:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAA2B42D0E; Thu, 20 Apr 2023 10:16:14 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 4480441141 for ; Thu, 20 Apr 2023 10:16:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681978572; x=1713514572; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=R1VFHkYOILQEQ6IeUB5ciI2uQxVVBCksmcYj3LeHHD4=; b=I1MhbiD8kjsF1eWvPB9ABBmh3J2yV9K2ndC2Aj/NIoT2VWzy+Xnlob27 +rzZ595BLQXO4OG81pl0VQQD7pVRXkuHTMT2jmUkMghT5ADmCAnjnOXS1 2iXAVHt/G9uCdaR8NF7Y0SS3BmiRoSokcDJgWTAE9ksMxIdS2hsTGjNs6 nDuEcVbF00CwfViUbTNhiKpMU02Pd3WKuE81OHLCYL/bsIAuy8QzZeofs ND3waWvNnf09PBtDmiHOZ9WBCR5BKN4RR2x2FTH8bLo+nzfyZqeiI/i6J MaKuwO9OCyrmdzlgdRR2wGFwAmLISObsj/MX7KvaXGE4IgmwtENjDaRU4 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="325998529" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="325998529" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="642061702" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="642061702" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:03 -0700 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V1 4/5] test_plans/ddp_mpls: add note Date: Thu, 20 Apr 2023 03:05:05 -0400 Message-Id: <20230420070506.10015-5-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230420070506.10015-1-linglix.chen@intel.com> References: <20230420070506.10015-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 add test PF note Signed-off-by: Lingli Chen --- test_plans/ddp_mpls_test_plan.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test_plans/ddp_mpls_test_plan.rst b/test_plans/ddp_mpls_test_plan.rst index a070d48d..299b8e78 100644 --- a/test_plans/ddp_mpls_test_plan.rst +++ b/test_plans/ddp_mpls_test_plan.rst @@ -25,9 +25,11 @@ Only 25G NIC supports DDP and MPLS so far. Prerequisites ============= +if test DPDK PF + DPDK VF, bind port to igb_uio: + 1. Host PF in DPDK driver. Create 1 VF from 1 PF with DPDK driver:: - ./tools/dpdk-devbind.py -b igb_uio 81:00.0 + ./usertools/dpdk-devbind.py -b igb_uio 81:00.0 echo 1 >/sys/bus/pci/devices/0000:81:00.0/max_vfs 2. Detach VF from the host:: @@ -45,6 +47,16 @@ Prerequisites .//app/dpdk-testpmd -c f -n 4 -- -i --port-topology=chained --txq=4 --rxq=4 +if only test PF: + +1. bind pf port to vfio-pci:: + + ./usertools/dpdk-devbind.py -b vfio-pci 81:00.0 + +2. Start testpmd on host:: + + .//app/dpdk-testpmd -c f -n 4 -- -i --port-topology=chained --txq=64 --rxq=64 + Test Case 1: Load dynamic device personalization ================================================ From patchwork Thu Apr 20 07:05:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 126300 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 51E1742998; Thu, 20 Apr 2023 10:16:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D841D42D16; Thu, 20 Apr 2023 10:16:14 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 7A18242C24 for ; Thu, 20 Apr 2023 10:16:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681978572; x=1713514572; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Uub1A95X29cOa6b6GHH1IE/oyK1GYNE+us7yOAz4WxE=; b=MHGyymOUL46ekj3AvLbAVyQ2N+HGbLi0Wys0/tQ5lmQSjpWjY1eh+qZp aBbdz+rb13Y6w3ozmvelTpV4pPdpOUG469+8+S06iRd7Hs5YJ5Al0neN1 A3FvQyQbGMpPXeXM5vdmupxd1/CSiSNY5uq/LbxrpnRGXTjdg+bfRieN1 WYsPyVmGyKggesS5EZXCYvRw/NylGIMW9CWx+DdGixyOtto3mYOG1rlWN f+06bij6lYYb27IZqdvwfZH0khfgNgFQRw5FxoJPYqDBc7YfXnVJy4GpG a/p/CzbAuSkLHOTQQGTcnlGdCpVx1ObII6Cm/mYXTCAn+gxxRobeGA3lh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="325998533" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="325998533" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="642061705" X-IronPort-AV: E=Sophos;i="5.99,212,1677571200"; d="scan'208";a="642061705" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 01:16:05 -0700 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V1 5/5] tests/ddp_mpls: skip igb_uio cases Date: Thu, 20 Apr 2023 03:05:06 -0400 Message-Id: <20230420070506.10015-6-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230420070506.10015-1-linglix.chen@intel.com> References: <20230420070506.10015-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 Acked-by: Zhimin Huang Tested-by: Weiyuan Li --- tests/TestSuite_ddp_mpls.py | 60 ++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index f0d4ef7d..756d6e8e 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,11 +45,21 @@ 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"): + def setup_vf_env(self, driver="default"): """ Create testing environment with VF generated from 1PF + Start testpmd on host and vm0 """ if self.env_done == False: self.bind_nic_driver(self.dut_ports[:1], driver="igb_uio") @@ -91,8 +101,11 @@ class Testddp_mpls(TestCase): % (VF_MAX_QUEUE, VF_MAX_QUEUE), ) - def destroy_vm_env(self): - + def destroy_vf_env(self): + self.vm0_testpmd.execute_cmd("stop") + self.dut_testpmd.execute_cmd("stop") + self.vm0_testpmd.quit() + self.dut_testpmd.quit() if getattr(self, "vm0", None): self.vm0_dut.kill_all() self.vm0_testpmd = None @@ -211,38 +224,45 @@ 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_vf_env() self.load_profile() self.mpls_test(port="vf id 0", pkt="udp") + self.destroy_vf_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_vf_env() self.load_profile() self.mpls_test(port="vf id 0", pkt="gre") + self.destroy_vf_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 + if self.env_done: + self.destroy_vf_env()