From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org
Cc: Weiyuan Li <weiyuanx.li@intel.com>, Jiale Song <songx.jiale@intel.com>
Subject: [dts][PATCH V2 08/10] test_plans/ice_iavf_fdir: update dts code for dpdk csum change
Date: Fri, 26 Aug 2022 10:43:06 +0800 [thread overview]
Message-ID: <20220826024308.17447-8-weiyuanx.li@intel.com> (raw)
In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com>
According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify
the script adapt to this chagne.
1. Modify VF case to enable promisc.
2. Modify PF case to send packet dst mac is random.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
Tested-by: Jiale Song < songx.jiale@intel.com>
v2:
-Added enable promisc model
tests/TestSuite_ice_iavf_fdir.py | 84 ++++++++++++++++++++++++++++++--
1 file changed, 81 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py
index a4df6151..1cc71f67 100644
--- a/tests/TestSuite_ice_iavf_fdir.py
+++ b/tests/TestSuite_ice_iavf_fdir.py
@@ -8401,6 +8401,14 @@ class TestICEIAVFFdir(TestCase):
self.dut_file_dir = "/tmp/"
self.q_num = TXQ_RXQ_NUMBER
+ def ip_link_set(self, host_intf=None, cmd=None, port=None, types=None, value=0):
+ if host_intf is None or cmd is None or port is None or types is None:
+ return
+ set_command = f"ip link set {host_intf} {cmd} {port} {types} {value}"
+ out = self.dut.send_expect(set_command, "# ")
+ if "RTNETLINK answers: Invalid argument" in out:
+ self.dut.send_expect(set_command, "# ")
+
def set_up(self):
"""
Run before each test case.
@@ -8422,6 +8430,42 @@ class TestICEIAVFFdir(TestCase):
self.sriov_vfs_pf0 = self.dut.ports_info[self.used_dut_port_0]["vfs_port"]
self.sriov_vfs_pf1 = self.dut.ports_info[self.used_dut_port_1]["vfs_port"]
+ self.host_intf_0 = self.dut.ports_info[self.used_dut_port_0]["intf"]
+ self.host_intf_1 = self.dut.ports_info[self.used_dut_port_0]["intf"]
+
+ if self.running_case in [
+ "test_pfcp_vlan_strip_off_sw_checksum",
+ "test_pfcp_vlan_strip_on_hw_checksum",
+ ]:
+ self.ip_link_set(
+ host_intf=self.host_intf_0,
+ cmd="vf",
+ port=0,
+ types="trust",
+ value="on",
+ )
+ self.ip_link_set(
+ host_intf=self.host_intf_0,
+ cmd="vf",
+ port=0,
+ types="spoofchk",
+ value="off",
+ )
+ self.ip_link_set(
+ host_intf=self.host_intf_1,
+ cmd="vf",
+ port=0,
+ types="trust",
+ value="on",
+ )
+ self.ip_link_set(
+ host_intf=self.host_intf_1,
+ cmd="vf",
+ port=0,
+ types="spoofchk",
+ value="off",
+ )
+
self.dut.send_expect(
"ip link set %s vf 0 mac 00:11:22:33:44:55" % self.pf0_intf, "#"
)
@@ -10760,6 +10804,7 @@ class TestICEIAVFFdir(TestCase):
self.dut.send_expect("csum set ip %s %d" % (hw, port), "testpmd>")
self.dut.send_expect("csum set udp %s %d" % (hw, port), "testpmd>")
self.dut.send_expect("port start all", "testpmd>")
+ self.dut.send_expect("set promisc 0 on", "testpmd>")
self.dut.send_expect("start", "testpmd>")
def get_chksum_values(self, packets_expected):
@@ -10791,7 +10836,7 @@ class TestICEIAVFFdir(TestCase):
tx_interface = self.tester_iface0
rx_interface = self.tester_iface0
- sniff_src = "00:11:22:33:44:55"
+ sniff_src = "52:00:00:00:00:00"
result = dict()
pkt = Packet()
chksum = self.get_chksum_values(packets_expected)
@@ -10896,7 +10941,7 @@ class TestICEIAVFFdir(TestCase):
socket=self.ports_socket,
)
vlan = 51
- mac = "00:11:22:33:44:55"
+ mac = "00:11:22:33:44:56"
sndIP = "10.0.0.1"
sndIPv6 = "::1"
pkts_sent = {
@@ -11051,7 +11096,7 @@ class TestICEIAVFFdir(TestCase):
socket=self.ports_socket,
)
vlan = 51
- mac = "00:11:22:33:44:55"
+ mac = "00:11:22:33:44:56"
sndIP = "10.0.0.1"
sndIPv6 = "::1"
pkts_sent = {
@@ -11610,6 +11655,39 @@ class TestICEIAVFFdir(TestCase):
if getattr(self, "session_third", None):
self.dut.close_session(self.session_third)
+ if self.running_case in [
+ "test_pfcp_vlan_strip_off_sw_checksum",
+ "test_pfcp_vlan_strip_on_hw_checksum",
+ ]:
+ self.ip_link_set(
+ host_intf=self.host_intf_0,
+ cmd="vf",
+ port=0,
+ types="trust",
+ value="off",
+ )
+ self.ip_link_set(
+ host_intf=self.host_intf_0,
+ cmd="vf",
+ port=0,
+ types="spoofchk",
+ value="on",
+ )
+ self.ip_link_set(
+ host_intf=self.host_intf_1,
+ cmd="vf",
+ port=0,
+ types="trust",
+ value="off",
+ )
+ self.ip_link_set(
+ host_intf=self.host_intf_1,
+ cmd="vf",
+ port=0,
+ types="spoofchk",
+ value="on",
+ )
+
def tear_down_all(self):
self.dut.kill_all()
self.destroy_env()
--
2.25.1
next prev parent reply other threads:[~2022-08-26 2:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: " Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 02/10] test_plans/vf_offload: " Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 03/10] tests/checksum_offload: " Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 04/10] tests/ice_advanced_iavf_rss: " Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 05/10] test_plans/ice_advanced_iavf_rss: " Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 06/10] tests/ice_advanced_rss: " Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 07/10] test_plans/ice_advanced_rss: " Weiyuan Li
2022-08-26 2:43 ` Weiyuan Li [this message]
2022-08-26 2:43 ` [dts][PATCH V2 09/10] tests/tx_preparation: " Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 10/10] test_plans/ice_iavf_fdir: " Weiyuan Li
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=20220826024308.17447-8-weiyuanx.li@intel.com \
--to=weiyuanx.li@intel.com \
--cc=dts@dpdk.org \
--cc=songx.jiale@intel.com \
/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).