* [dts][PATCH V2]tests/vf_single_core_perf: support IO forwarding mode
@ 2023-05-25 5:36 Yingya Han
2023-06-07 5:50 ` lijuan.tu
0 siblings, 1 reply; 2+ messages in thread
From: Yingya Han @ 2023-05-25 5:36 UTC (permalink / raw)
To: dts; +Cc: Yingya Han
Signed-off-by: Yingya Han <yingyax.han@intel.com>
---
conf/vf_single_core_perf.cfg | 4 ++++
tests/TestSuite_vf_single_core_perf.py | 11 ++++++++---
2 files changed, 12 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..85bd0d46 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,9 @@ 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 +227,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 +283,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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dts][PATCH V2]tests/vf_single_core_perf: support IO forwarding mode
2023-05-25 5:36 [dts][PATCH V2]tests/vf_single_core_perf: support IO forwarding mode Yingya Han
@ 2023-06-07 5:50 ` lijuan.tu
0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2023-06-07 5:50 UTC (permalink / raw)
To: dts, Yingya Han; +Cc: Yingya Han
On Thu, 25 May 2023 05:36:37 +0000, Yingya Han <yingyax.han@intel.com> wrote:
> Signed-off-by: Yingya Han <yingyax.han@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-07 5:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 5:36 [dts][PATCH V2]tests/vf_single_core_perf: support IO forwarding mode Yingya Han
2023-06-07 5:50 ` lijuan.tu
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).