From: Yingya Han <yingyax.han@intel.com>
To: dts@dpdk.org
Cc: Yingya Han <yingyax.han@intel.com>
Subject: [dts][PATCH V1]tests/vf_single_core_perf: support IO forwarding mode
Date: Thu, 18 May 2023 02:37:11 +0000 [thread overview]
Message-ID: <20230518023711.119597-1-yingyax.han@intel.com> (raw)
Signed-off-by: Yingya Han <yingyax.han@intel.com>
---
conf/vf_single_core_perf.cfg | 4 ++++
tests/TestSuite_vf_single_core_perf.py | 15 ++++++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/conf/vf_single_core_perf.cfg b/conf/vf_single_core_perf.cfg
index b0546f48..ccdde983 100644
--- a/conf/vf_single_core_perf.cfg
+++ b/conf/vf_single_core_perf.cfg
@@ -8,6 +8,9 @@
# - test_duration is how many seconds each combination performance will
# be recorded.
#
+# - forwarding_mode:
+# testpmd set the packet forwarding mode, support 'io'/'mac'
+#
# - accepted_tolerance defines the accepted tolerance between test
# results and expected numbers.
#
@@ -33,6 +36,7 @@ update_expected = True
test_parameters = {'1C/1T': {64: [512, 2048]},
'1C/2T': {64: [512, 2048]}}
test_duration = 60
+forwarding_mode = 'io'
accepted_tolerance = 1
expected_throughput = {
'I40E_40G-QSFP_A': {
diff --git a/tests/TestSuite_vf_single_core_perf.py b/tests/TestSuite_vf_single_core_perf.py
index 7101e4b9..de68f334 100644
--- a/tests/TestSuite_vf_single_core_perf.py
+++ b/tests/TestSuite_vf_single_core_perf.py
@@ -56,6 +56,7 @@ class TestVfSingleCorePerf(TestCase):
"""
# test parameters include: frames size, descriptor numbers
self.test_parameters = self.get_suite_cfg()["test_parameters"]
+ self.forwarding_mode = self.get_suite_cfg()["forwarding_mode"]
# traffic duraion in second
self.test_duration = self.get_suite_cfg()["test_duration"]
@@ -99,6 +100,13 @@ class TestVfSingleCorePerf(TestCase):
self.dut.send_expect(
"ip link set %s vf 0 mac %s" % (pf_intf, self.vfs_mac[i]), "#"
)
+ if self.forwarding_mode == "io":
+ self.dut.send_expect(
+ "ip link set %s vf 0 trust on" % pf_intf, "#"
+ )
+ self.dut.send_expect(
+ "ip link set %s vf 0 spoofchk off" % pf_intf, "#"
+ )
# bind vf to vf driver
try:
@@ -223,10 +231,10 @@ class TestVfSingleCorePerf(TestCase):
for i in range(port_num):
eal_para += " -a " + self.sriov_vfs_port[i][0].pci
port_mask = utils.create_mask(self.dut_ports)
- # parameters for application/testpmd
- param = " --portmask=%s" % (port_mask)
for fwd_config in list(self.test_parameters.keys()):
+ # parameters for application/testpmd
+ param = " --portmask=%s" % (port_mask)
# the fwd_config just the config for fwd core
# to start testpmd should add 1C to it
core_config = "1S/%s" % fwd_config
@@ -279,7 +287,8 @@ class TestVfSingleCorePerf(TestCase):
self.pmdout.start_testpmd(
core_list, parameter, eal_para, socket=self.socket
)
- self.dut.send_expect("set fwd mac", "testpmd> ", 15)
+ if self.forwarding_mode == "mac":
+ self.dut.send_expect("set fwd mac", "testpmd> ", 15)
self.dut.send_expect("start", "testpmd> ", 15)
vm_config = self.set_fields()
--
2.34.1
reply other threads:[~2023-05-18 2:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230518023711.119597-1-yingyax.han@intel.com \
--to=yingyax.han@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).