From: Lingli Chen <linglix.chen@intel.com>
To: dts@dpdk.org
Cc: Lingli Chen <linglix.chen@intel.com>
Subject: [dts][PATCH V1 3/3] tests/ddp_mpls: skip igb_uio cases
Date: Tue, 18 Apr 2023 05:11:09 -0400 [thread overview]
Message-ID: <20230418091109.3258-3-linglix.chen@intel.com> (raw)
In-Reply-To: <20230418091109.3258-1-linglix.chen@intel.com>
skip DPDK PF + DPDK VF case, modify dts code to run pf case
Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
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
--
2.17.1
prev parent reply other threads:[~2023-04-18 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 9:11 [dts][PATCH V1 1/3] test_plans/vf_macfilter: change "igb_uio" to "vfio-pci" in kernel pf cases Lingli Chen
2023-04-18 9:11 ` [dts][PATCH V1 2/3] tests/ddp_gtp: skip igb_uio cases Lingli Chen
2023-04-18 9:11 ` Lingli Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230418091109.3258-3-linglix.chen@intel.com \
--to=linglix.chen@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).