From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 --- 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() -- 2.17.1