* [dts][PATCH V2 02/10] test_plans/vf_offload: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 03/10] tests/checksum_offload: " Weiyuan Li
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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>
test_plans/vf_offload_test_plan.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst
index 522fc017..d8cf8f1c 100644
--- a/test_plans/vf_offload_test_plan.rst
+++ b/test_plans/vf_offload_test_plan.rst
@@ -17,6 +17,11 @@ to the device under test::
modprobe vfio-pci
usertools/dpdk-devbind.py --bind=vfio-pci device_bus_id
+IP link set VF trust on and spoofchk off on DUT::
+
+ ip link set $PF_INTF vf 0 trust on
+ ip link set $PF_INTF vf 0 spoofchk off
+
Assuming that ports ``0`` and ``1`` are connected to a traffic generator,
enable hardware rx checksum offload with "--enable-rx-cksum",
launch the ``testpmd`` with the following arguments::
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 03/10] tests/checksum_offload: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 02/10] test_plans/vf_offload: " Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 04/10] tests/ice_advanced_iavf_rss: " Weiyuan Li
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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:
-modify dst mac address
tests/TestSuite_checksum_offload.py | 35 +++++++++++++----------------
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 3554f5eb..1ccc884c 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -204,11 +204,10 @@ class TestChecksumOffload(TestCase):
self.tester.get_local_port(self.dut_ports[0])
)
- sniff_src = self.dut.get_mac_address(self.dut_ports[0])
+ sniff_src = "52:00:00:00:00:00"
result = dict()
chksum = self.get_chksum_values(packets_expected)
-
inst = self.tester.tcpdump_sniff_packets(
intf=rx_interface,
count=len(packets_sent) * 4,
@@ -424,8 +423,9 @@ class TestChecksumOffload(TestCase):
):
if os.path.isfile(capture_file_path):
os.remove(capture_file_path)
+ src_mac = "52:00:00:00:00:00"
self.tester.send_expect(
- f"tcpdump -i '{iface}' ether src {dut_mac} -s 0 -w {capture_file_path} &",
+ f"tcpdump -i '{iface}' ether src {src_mac} -s 0 -w {capture_file_path} -Q in &",
"# ",
)
@@ -502,7 +502,8 @@ class TestChecksumOffload(TestCase):
Verify that the same number of packet are correctly received on the
traffic generator side.
"""
- mac = self.dut.get_mac_address(self.dut_ports[0])
+ # mac = self.dut.get_mac_address(self.dut_ports[0])
+ mac = "52:00:00:00:00:01"
pktsChkErr = {
"IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/Dot1Q(vlan=1)/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)'
@@ -546,7 +547,7 @@ class TestChecksumOffload(TestCase):
transmit packet.Enable Checksum offload.
Verify the checksum valid-flags.
"""
- mac = self.dut.get_mac_address(self.dut_ports[0])
+ mac = "52:00:00:00:00:01"
pkts_ref = {
"IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*46)'
@@ -611,7 +612,7 @@ class TestChecksumOffload(TestCase):
Verify that the same number of packet are correctly received on the
traffic generator side.
"""
- mac = self.dut.get_mac_address(self.dut_ports[0])
+ mac = "52:00:00:00:00:01"
pkts = {
"IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)'
@@ -660,7 +661,7 @@ class TestChecksumOffload(TestCase):
Verify that the same number of packet are correctly received on
the traffic generator side.
"""
- mac = self.dut.get_mac_address(self.dut_ports[0])
+ mac = "52:00:00:00:00:01"
sndIP = "10.0.0.1"
sndIPv6 = "::1"
sndPkts = {
@@ -816,9 +817,8 @@ class TestChecksumOffload(TestCase):
verification_errors: List[VerifyFailure] = []
iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
- dut_mac = self.dut.get_mac_address(self.dut_ports[0])
- tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0]))
-
+ dut_mac = "52:00:00:00:00:01"
+ tester_mac = "52:00:00:00:00:00"
self.scapy_exec(f"eth = Ether(dst='{dut_mac}', src='{tester_mac}')")
self.scapy_exec(f"iface = '{iface}'")
@@ -848,8 +848,8 @@ class TestChecksumOffload(TestCase):
verification_errors: List[VerifyFailure] = []
iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
- dut_mac = self.dut.get_mac_address(self.dut_ports[0])
- tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0]))
+ dut_mac = "52:00:00:00:00:01"
+ tester_mac = "52:00:00:00:00:00"
eth = Ether(dst=dut_mac, src=tester_mac)
checksum_options = (
@@ -903,9 +903,8 @@ class TestChecksumOffload(TestCase):
verification_errors: List[VerifyFailure] = []
iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
- dut_mac = self.dut.get_mac_address(self.dut_ports[0])
- tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0]))
-
+ dut_mac = "52:00:00:00:00:01"
+ tester_mac = "52:00:00:00:00:00"
self.tester.send_expect("scapy", ">>> ")
self.scapy_exec(f"eth = Ether(dst='{dut_mac}', src='{tester_mac}')")
self.scapy_exec(f"iface = '{iface}'")
@@ -1003,9 +1002,8 @@ class TestChecksumOffload(TestCase):
verification_errors: List[VerifyFailure] = []
iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
- dut_mac = self.dut.get_mac_address(self.dut_ports[0])
- tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0]))
-
+ dut_mac = "52:00:00:00:00:01"
+ tester_mac = "52:00:00:00:00:00"
packets = self.get_packets(dut_mac, tester_mac)
capture_file_name = "test_hardware_checksum_check_l4_tx_capture.pcap"
@@ -1022,7 +1020,6 @@ class TestChecksumOffload(TestCase):
)
captured_packets = rdpcap("output/tmp/pcap/" + capture_file_name)
-
self.verify(
len(packets) == len(captured_packets), "Not all packets were received"
)
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 04/10] tests/ice_advanced_iavf_rss: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change 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 ` Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 05/10] test_plans/ice_advanced_iavf_rss: " Weiyuan Li
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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:
-modify the dst mac variable to 'dst_mac'
-Added enable promisc model
| 74 +++++++++++++++++++-----
1 file changed, 58 insertions(+), 16 deletions(-)
--git a/tests/TestSuite_ice_advanced_iavf_rss.py b/tests/TestSuite_ice_advanced_iavf_rss.py
index e560c9e6..bed1d1df 100644
--- a/tests/TestSuite_ice_advanced_iavf_rss.py
+++ b/tests/TestSuite_ice_advanced_iavf_rss.py
@@ -5781,10 +5781,34 @@ class AdvancedIavfRSSTest(TestCase):
self.vf_flag = False
self.create_iavf()
+ 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.
"""
+ if self.running_case == "test_flow_rule_not_impact_rx_tx_chksum":
+ self.host_intf_0 = self.dut.ports_info[self.used_dut_port]["intf"]
+ 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.pkt = Packet()
self.pmd_output = PmdOutput(self.dut)
self.launch_testpmd()
@@ -6370,7 +6394,7 @@ class AdvancedIavfRSSTest(TestCase):
expect_chksum = dict()
checksum_pattern = re.compile("chksum.*=.*(0x[0-9a-z]+)")
self.tester.send_expect("scapy", ">>> ")
- sniff_src = self.dut.get_mac_address(self.dut_ports[0])
+ sniff_src = "52:00:00:00:00:00"
for pkt in expect_pkts:
self.tester.send_expect("p = %s" % expect_pkts[pkt], ">>>")
out = self.tester.send_expect("p.show2()", ">>>")
@@ -6382,7 +6406,7 @@ class AdvancedIavfRSSTest(TestCase):
inst = self.tester.tcpdump_sniff_packets(
intf=self.tester_iface0,
count=len(pkts),
- filters=[{"layer": "ether", "config": {"src": vf0_mac}}],
+ filters=[{"layer": "ether", "config": {"src": sniff_src}}],
)
out = self.rssprocess.send_pkt_get_output(pkts=pkts[pkt])
rece_pkt = self.tester.load_tcpdump_sniff_packets(inst)
@@ -6417,24 +6441,26 @@ class AdvancedIavfRSSTest(TestCase):
self.pmd_output.execute_cmd("csum set tcp hw 0")
self.pmd_output.execute_cmd("csum set sctp hw 0")
self.pmd_output.execute_cmd("port start all")
+ self.pmd_output.execute_cmd("set promisc 0 on")
self.pmd_output.execute_cmd("start")
+ dst_mac = "00:11:22:33:44:56"
pkt_list = {
- "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)',
- "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)',
- "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)',
- "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)',
- "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)',
- "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)',
- "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)',
+ "IP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)',
+ "IP/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)',
+ "IP/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)',
+ "IP/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)',
+ "IPv6/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)',
+ "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)',
+ "IPv6/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)',
}
expect_pkt = {
- "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)',
- "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)',
- "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)',
- "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)',
- "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)',
- "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)',
- "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)',
+ "IP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)',
+ "IP/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)',
+ "IP/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)',
+ "IP/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)',
+ "IPv6/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)',
+ "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)',
+ "IPv6/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)',
}
rule_list = [
"flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end",
@@ -6631,6 +6657,22 @@ class AdvancedIavfRSSTest(TestCase):
self.dut.send_command("clear port stats all", timeout=1)
self.pmd_output.execute_cmd("stop")
self.pmd_output.execute_cmd("quit", "#")
+ if self.running_case == "test_flow_rule_not_impact_rx_tx_chksum":
+ self.host_intf_0 = self.dut.ports_info[self.used_dut_port]["intf"]
+ 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",
+ )
def tear_down_all(self):
self.dut.kill_all()
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 05/10] test_plans/ice_advanced_iavf_rss: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
` (2 preceding siblings ...)
2022-08-26 2:43 ` [dts][PATCH V2 04/10] tests/ice_advanced_iavf_rss: " Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 06/10] tests/ice_advanced_rss: " Weiyuan Li
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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>
| 4 ++++
1 file changed, 4 insertions(+)
--git a/test_plans/ice_advanced_iavf_rss_test_plan.rst b/test_plans/ice_advanced_iavf_rss_test_plan.rst
index 2400f01a..fac4b082 100644
--- a/test_plans/ice_advanced_iavf_rss_test_plan.rst
+++ b/test_plans/ice_advanced_iavf_rss_test_plan.rst
@@ -310,6 +310,10 @@ Prerequisites
echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs
ip link set enp24s0f0 vf 0 mac 00:11:22:33:44:55
+ If test set HW csum flow rule does not impact RX checksum and TX checksum:
+ ip link set enp24s0f0 vf 0 trust on
+ ip link set enp24s0f0 vf 0 spoofchk off
+
4. bind the VF to dpdk driver in DUT::
modprobe vfio-pci
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 06/10] tests/ice_advanced_rss: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
` (3 preceding siblings ...)
2022-08-26 2:43 ` [dts][PATCH V2 05/10] test_plans/ice_advanced_iavf_rss: " Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 07/10] test_plans/ice_advanced_rss: " Weiyuan Li
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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:
-modify the dst mac variable to 'dst_mac'
| 31 +++++++++++++++--------------
1 file changed, 16 insertions(+), 15 deletions(-)
--git a/tests/TestSuite_ice_advanced_rss.py b/tests/TestSuite_ice_advanced_rss.py
index 0c246cca..a3318101 100644
--- a/tests/TestSuite_ice_advanced_rss.py
+++ b/tests/TestSuite_ice_advanced_rss.py
@@ -5493,7 +5493,7 @@ class AdvancedRSSTest(TestCase):
expect_chksum = dict()
checksum_pattern = re.compile("chksum.*=.*(0x[0-9a-z]+)")
self.tester.send_expect("scapy", ">>> ")
- sniff_src = self.dut.get_mac_address(self.dut_ports[0])
+ sniff_src = "52:00:00:00:00:00"
for pkt in expect_pkts:
self.tester.send_expect("p = %s" % expect_pkts[pkt], ">>>")
out = self.tester.send_expect("p.show2()", ">>>")
@@ -5541,23 +5541,24 @@ class AdvancedRSSTest(TestCase):
self.pmd_output.execute_cmd("csum set sctp hw 0")
self.pmd_output.execute_cmd("port start all")
self.pmd_output.execute_cmd("start")
+ dst_mac = "00:11:22:33:44:56"
pkt_list = {
- "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)',
- "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)',
- "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)',
- "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)',
- "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)',
- "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)',
- "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)',
+ "IP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)',
+ "IP/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)',
+ "IP/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)',
+ "IP/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)',
+ "IPv6/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)',
+ "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)',
+ "IPv6/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)',
}
expect_pkt = {
- "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)',
- "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)',
- "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)',
- "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)',
- "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)',
- "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)',
- "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)',
+ "IP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)',
+ "IP/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)',
+ "IP/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)',
+ "IP/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)',
+ "IPv6/TCP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)',
+ "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)',
+ "IPv6/SCTP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)',
}
rule_list = [
"flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end",
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 07/10] test_plans/ice_advanced_rss: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
` (4 preceding siblings ...)
2022-08-26 2:43 ` [dts][PATCH V2 06/10] tests/ice_advanced_rss: " Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 08/10] test_plans/ice_iavf_fdir: " Weiyuan Li
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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>
| 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--git a/test_plans/ice_advanced_rss_test_plan.rst b/test_plans/ice_advanced_rss_test_plan.rst
index 48dcc545..b6488573 100644
--- a/test_plans/ice_advanced_rss_test_plan.rst
+++ b/test_plans/ice_advanced_rss_test_plan.rst
@@ -2461,21 +2461,21 @@ Test case: Set HW csum, flow rule does not impact RX checksum and TX checksum
3. Capture the tx packet at tester port and check checksum values same as expect pkts::
take a IPV4 for example:
- p = Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)
+ p = Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)
p.show2()
expect pkts checksum value: chksum= 0x3b0f
- tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap -c 7
+ tcpdump -i ens7 'ether src 52:00:00:00:00:00 and ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap -c 7
4. Send packets::
- p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)
- p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)
- p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)
- p4=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x1)/("X"*48)
- p5=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)
- p6=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)
- p7=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0xf)/("X"*48)
+ p1=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)
+ p2=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)
+ p3=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)
+ p4=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x1)/("X"*48)
+ p5=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)
+ p6=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)
+ p7=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0xf)/("X"*48)
take a IPV4 for example:
get sniff_ens7.pcap checksum value: 0x3b0f
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 08/10] test_plans/ice_iavf_fdir: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
` (5 preceding siblings ...)
2022-08-26 2:43 ` [dts][PATCH V2 07/10] test_plans/ice_advanced_rss: " Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
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
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 09/10] tests/tx_preparation: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
` (6 preceding siblings ...)
2022-08-26 2:43 ` [dts][PATCH V2 08/10] test_plans/ice_iavf_fdir: " Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
2022-08-26 2:43 ` [dts][PATCH V2 10/10] test_plans/ice_iavf_fdir: " Weiyuan Li
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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>
tests/TestSuite_tx_preparation.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_tx_preparation.py b/tests/TestSuite_tx_preparation.py
index 9b70699c..c3e90f72 100644
--- a/tests/TestSuite_tx_preparation.py
+++ b/tests/TestSuite_tx_preparation.py
@@ -73,7 +73,7 @@ class TestTX_preparation(TestCase):
" --portmask=1 --port-topology=chained --max-pkt-len=%s --tx-offloads=0x8000"
% Max_mtu,
)
- self.dmac = self.dut_testpmd.get_port_mac(0)
+ self.dmac = "00:11:22:33:44:55"
self.dut_testpmd.execute_cmd("set fwd csum")
self.dut_testpmd.execute_cmd("set verbose 1")
# enable ip/udp/tcp hardware checksum
@@ -84,7 +84,7 @@ class TestTX_preparation(TestCase):
def start_tcpdump(self, rxItf):
# only sniff form dut packet and filter lldp packet
- param = "ether[12:2]!=0x88cc and ether src %s" % self.dmac
+ param = "ether[12:2]!=0x88cc and ether dst %s -Q in" % self.dmac
self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
self.tester.send_expect(
"tcpdump %s -i %s -n -e -vv -w\
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dts][PATCH V2 10/10] test_plans/ice_iavf_fdir: update dts code for dpdk csum change
2022-08-26 2:42 [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Weiyuan Li
` (7 preceding siblings ...)
2022-08-26 2:43 ` [dts][PATCH V2 09/10] tests/tx_preparation: " Weiyuan Li
@ 2022-08-26 2:43 ` Weiyuan Li
8 siblings, 0 replies; 10+ messages in thread
From: Weiyuan Li @ 2022-08-26 2:43 UTC (permalink / raw)
To: dts; +Cc: Weiyuan Li, Jiale Song
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>
test_plans/ice_iavf_fdir_test_plan.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test_plans/ice_iavf_fdir_test_plan.rst b/test_plans/ice_iavf_fdir_test_plan.rst
index b485f899..1e788d0d 100644
--- a/test_plans/ice_iavf_fdir_test_plan.rst
+++ b/test_plans/ice_iavf_fdir_test_plan.rst
@@ -195,6 +195,12 @@ Prerequisites
ip link set enp134s0f1 vf 0 mac 00:11:22:33:44:77
ip link set enp134s0f1 vf 1 mac 00:11:22:33:44:88
+ If test set HW checksum and SW checksum:
+ ip link set enp24s0f0 vf 0 trust on
+ ip link set enp24s0f0 vf 0 spoofchk off
+ ip link set enp24s0f0 vf 1 trust on
+ ip link set enp24s0f0 vf 1 spoofchk off
+
0000:86:00.0 generate 0000:86:01.0 and 0000:86:01.1
0000:86:00.1 generate 0000:86:11.0 and 0000:86:11.1
define 86:01.0 as vf00, 86:01.1 as vf01, 86:11.0 as vf10, 86:11.1 as vf11.
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread