test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change
@ 2022-07-18  2:54 Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 02/12] tests/vf_offload: " Weiyuan Li
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

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>
---
 tests/TestSuite_kernelpf_iavf.py | 46 ++++++++++++++++++++++++++++++--
 1 file changed, 44 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index d7d17ac4..57944770 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -75,6 +75,14 @@ class TestKernelpfIavf(TestCase):
         self.flag = "vf-vlan-pruning"
         self.default_stats = self.dut.get_priv_flags_state(self.host_intf, self.flag)
 
+    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):
 
         if self.running_case == "test_vf_mac_filter":
@@ -120,6 +128,22 @@ class TestKernelpfIavf(TestCase):
                 "ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), "# "
             )
 
+        if self.running_case == "test_vf_tso":
+            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",
+            )
         try:
 
             for port in self.sriov_vfs_port:
@@ -656,9 +680,10 @@ class TestKernelpfIavf(TestCase):
         self.tester.scapy_foreground()
         time.sleep(5)
         self.start_tcpdump(self.tester_intf)
+        vf_mac = "00:01:23:45:67:80"
         pkt = (
-            'sendp([Ether(dst="%s")/IP(chksum=0x1234)/TCP(flags=0x10,chksum=0x1234)/'
-            'Raw(RandString(5214))], iface="%s")' % (self.vf_mac, self.tester_intf)
+            'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x1234)/TCP(flags=0x10,chksum=0x1234)/'
+            'Raw(RandString(5214))], iface="%s")' % (vf_mac, self.tester_intf)
         )
         self.tester.scapy_append(pkt)
         self.tester.scapy_execute()
@@ -927,6 +952,23 @@ class TestKernelpfIavf(TestCase):
             self.destroy_vm_env()
         self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ")
 
+        if self.running_case == "test_vf_tso":
+            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):
         """
         When the case of this test suite finished, the environment should
-- 
2.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 02/12] tests/vf_offload: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 03/12] tests/checksum_offload: " Weiyuan Li
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

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>
---
 tests/TestSuite_vf_offload.py | 106 ++++++++++++++++++++++++----------
 1 file changed, 76 insertions(+), 30 deletions(-)

diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index 4dd05cac..393e68a4 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -43,7 +43,7 @@ class TestVfOffload(TestCase):
         self.setup_2pf_2vf_1vm_env_flag = 0
         self.setup_2pf_2vf_1vm_env(driver="")
         self.vm0_dut_ports = self.vm_dut_0.get_ports("any")
-        self.portMask = utils.create_mask([self.vm0_dut_ports[0]])
+        self.portMask = utils.create_mask(self.vm0_dut_ports)
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
         self.tester.send_expect(
             "ifconfig %s mtu %s"
@@ -59,6 +59,14 @@ class TestVfOffload(TestCase):
     def set_up(self):
         pass
 
+    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 setup_2pf_2vf_1vm_env(self, driver="default"):
 
         self.used_dut_port_0 = self.dut_ports[0]
@@ -68,6 +76,37 @@ class TestVfOffload(TestCase):
         self.dut.generate_sriov_vfs_by_port(self.used_dut_port_1, 1, driver=driver)
         self.sriov_vfs_port_1 = 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_1]["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_1,
+            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="spoofchk",
+            value="off",
+        )
         try:
 
             for port in self.sriov_vfs_port_0:
@@ -136,6 +175,10 @@ class TestVfOffload(TestCase):
         dut.send_expect("csum set udp hw %d" % port, "testpmd>")
         dut.send_expect("csum set tcp hw %d" % port, "testpmd>")
         dut.send_expect("csum set sctp hw %d" % port, "testpmd>")
+        dut.send_expect("csum set ip hw %d" % 1, "testpmd>")
+        dut.send_expect("csum set udp hw %d" % 1, "testpmd>")
+        dut.send_expect("csum set tcp hw %d" % 1, "testpmd>")
+        dut.send_expect("csum set sctp hw %d" % 1, "testpmd>")
         dut.send_expect("port start all", "testpmd>")
 
     def checksum_enablesw(self, port, dut):
@@ -144,6 +187,10 @@ class TestVfOffload(TestCase):
         dut.send_expect("csum set udp sw %d" % port, "testpmd>")
         dut.send_expect("csum set tcp sw %d" % port, "testpmd>")
         dut.send_expect("csum set sctp sw %d" % port, "testpmd>")
+        dut.send_expect("csum set ip sw %d" % 1, "testpmd>")
+        dut.send_expect("csum set udp sw %d" % 1, "testpmd>")
+        dut.send_expect("csum set tcp sw %d" % 1, "testpmd>")
+        dut.send_expect("csum set sctp sw %d" % 1, "testpmd>")
         dut.send_expect("port start all", "testpmd>")
 
     def checksum_validate(self, packets_sent, packets_expected):
@@ -154,12 +201,11 @@ class TestVfOffload(TestCase):
             self.tester.get_local_port(self.dut_ports[0])
         )
         rx_interface = self.tester.get_interface(
-            self.tester.get_local_port(self.dut_ports[0])
+            self.tester.get_local_port(self.dut_ports[1])
         )
-
         sniff_src = self.vm0_testpmd.get_port_mac(0)
         checksum_pattern = re.compile("chksum.*=.*(0x[0-9a-z]+)")
-
+        sniff_src = "52:00:00:00:00:00"
         chksum = dict()
         result = dict()
 
@@ -175,16 +221,11 @@ class TestVfOffload(TestCase):
         self.tester.send_expect("exit()", "#")
 
         self.tester.scapy_background()
-        self.tester.scapy_append(
-            'p = sniff(filter="ether src %s", iface="%s", count=%d)'
-            % (sniff_src, rx_interface, len(packets_sent))
+        inst = self.tester.tcpdump_sniff_packets(
+            intf=rx_interface,
+            count=len(packets_sent),
+            filters=[{"layer": "ether", "config": {"src": sniff_src}}],
         )
-        self.tester.scapy_append("nr_packets=len(p)")
-        self.tester.scapy_append(
-            'reslist = [p[i].sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]'
-        )
-        self.tester.scapy_append("import string")
-        self.tester.scapy_append('RESULT = ",".join(reslist)')
 
         # Send packet.
         self.tester.scapy_foreground()
@@ -196,7 +237,15 @@ class TestVfOffload(TestCase):
 
         self.tester.scapy_execute()
         out = self.tester.scapy_get_result()
-        packets_received = out.split(",")
+
+        p = self.tester.load_tcpdump_sniff_packets(inst)
+        nr_packets = len(p)
+        print(p)
+        packets_received = [
+            p[i].sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%")
+            for i in range(nr_packets)
+        ]
+
         self.verify(
             len(packets_sent) == len(packets_received), "Unexpected Packets Drop"
         )
@@ -251,17 +300,15 @@ class TestVfOffload(TestCase):
         """
         self.vm0_testpmd.start_testpmd(
             VM_CORES_MASK,
-            "--portmask=%s " % (self.portMask)
-            + "--enable-rx-cksum "
-            + ""
-            + "--port-topology=loop",
+            "--portmask=%s " % (self.portMask) + "--enable-rx-cksum " + "",
         )
         self.vm0_testpmd.execute_cmd("set fwd csum")
+        self.vm0_testpmd.execute_cmd("set promisc 1 on")
+        self.vm0_testpmd.execute_cmd("set promisc 0 on")
 
         time.sleep(2)
         port_id_0 = 0
         mac = self.vm0_testpmd.get_port_mac(0)
-
         sndIP = "10.0.0.1"
         sndIPv6 = "::1"
         pkts = {
@@ -280,15 +327,15 @@ class TestVfOffload(TestCase):
         expIP = sndIP
         expIPv6 = sndIPv6
         pkts_ref = {
-            "IP/UDP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/UDP()/("X"*46)'
+            "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/UDP()/("X"*46)'
             % (mac, expIP),
-            "IP/TCP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/TCP()/("X"*46)'
+            "IP/TCP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/TCP()/("X"*46)'
             % (mac, expIP),
-            "IP/SCTP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/SCTP()/("X"*48)'
+            "IP/SCTP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/SCTP()/("X"*48)'
             % (mac, expIP),
-            "IPv6/UDP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="%s")/UDP()/("X"*46)'
+            "IPv6/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP()/("X"*46)'
             % (mac, expIPv6),
-            "IPv6/TCP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="%s")/TCP()/("X"*46)'
+            "IPv6/TCP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP()/("X"*46)'
             % (mac, expIPv6),
         }
 
@@ -311,14 +358,13 @@ class TestVfOffload(TestCase):
         Enable SW checksum offload.
         Send same packet with incorrect checksum and verify checksum is valid.
         """
-
         self.vm0_testpmd.start_testpmd(
             VM_CORES_MASK,
-            "--portmask=%s " % (self.portMask)
-            + "--enable-rx-cksum "
-            + "--port-topology=loop",
+            "--portmask=%s " % (self.portMask) + "--enable-rx-cksum " + "",
         )
         self.vm0_testpmd.execute_cmd("set fwd csum")
+        self.vm0_testpmd.execute_cmd("set promisc 1 on")
+        self.vm0_testpmd.execute_cmd("set promisc 0 on")
 
         time.sleep(2)
 
@@ -457,7 +503,6 @@ class TestVfOffload(TestCase):
         )
 
         mac = self.vm0_testpmd.get_port_mac(0)
-
         self.vm0_testpmd.execute_cmd("set verbose 1", "testpmd> ", 120)
         self.vm0_testpmd.execute_cmd("port stop all", "testpmd> ", 120)
         self.vm0_testpmd.execute_cmd(
@@ -501,7 +546,8 @@ class TestVfOffload(TestCase):
         self.vm0_testpmd.execute_cmd("tso set 800 %d" % self.vm0_dut_ports[1])
         self.vm0_testpmd.execute_cmd("set fwd csum")
         self.vm0_testpmd.execute_cmd("port start all", "testpmd> ", 120)
-        self.vm0_testpmd.execute_cmd("set promisc all off", "testpmd> ", 120)
+        self.vm0_testpmd.execute_cmd("set promisc 0 on", "testpmd> ", 120)
+        self.vm0_testpmd.execute_cmd("set promisc 1 on", "testpmd> ", 120)
         self.vm0_testpmd.execute_cmd("start")
 
         self.tester.scapy_foreground()
-- 
2.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 03/12] tests/checksum_offload: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 02/12] tests/vf_offload: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 04/12] tests/ice_advanced_iavf_rss: " Weiyuan Li
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

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>
---
 tests/TestSuite_checksum_offload.py | 31 ++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 3554f5eb..ffc48b96 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -76,6 +76,7 @@ class TestChecksumOffload(TestCase):
             self.output_path = os.sep.join([cur_path, self.logger.log_path])
         # log debug used
         self.count = 0
+        self.src_mac = "52:00:00:00:00:00"
 
     def set_up(self):
         """
@@ -204,15 +205,14 @@ 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,
-            filters=[{"layer": "ether", "config": {"src": sniff_src}}],
+            filters=[{"layer": "ether", "config": {"src": self.src_mac}}],
         )
 
         self.pkt = packet.Packet()
@@ -369,6 +369,7 @@ class TestChecksumOffload(TestCase):
         return self.tester.send_expect(cmd, ">>>", timeout=timeout)
 
     def get_packets(self, dut_mac, tester_mac):
+        tester_mac = "52:00:00:00:00:00"
         eth = Ether(dst=dut_mac, src=tester_mac)
         packets = []
         checksum_options = (
@@ -424,8 +425,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 +504,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 = "23:00:00:00:00:00"
 
         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 +549,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 = "23:00:00:00:00:00"
 
         pkts_ref = {
             "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*46)'
@@ -611,7 +614,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 = "23:00:00:00:00:00"
 
         pkts = {
             "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)'
@@ -660,7 +663,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 = "23:00:00:00:00:00"
         sndIP = "10.0.0.1"
         sndIPv6 = "::1"
         sndPkts = {
@@ -818,7 +821,8 @@ class TestChecksumOffload(TestCase):
         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 = "23:00:00:00:00:00"
+        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}'")
 
@@ -850,6 +854,8 @@ class TestChecksumOffload(TestCase):
         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 = "23:00:00:00:00:00"
+        tester_mac = "52:00:00:00:00:00"
         eth = Ether(dst=dut_mac, src=tester_mac)
 
         checksum_options = (
@@ -905,7 +911,8 @@ class TestChecksumOffload(TestCase):
         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 = "23:00:00:00:00:00"
+        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}'")
@@ -1005,7 +1012,8 @@ class TestChecksumOffload(TestCase):
         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 = "23:00:00:00:00:00"
+        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 +1030,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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 04/12] tests/ice_advanced_iavf_rss: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 02/12] tests/vf_offload: " Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 03/12] tests/checksum_offload: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 05/12] tests/ice_advanced_rss: " Weiyuan Li
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

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>
---
 tests/TestSuite_ice_advanced_iavf_rss.py | 70 +++++++++++++++++++-----
 1 file changed, 56 insertions(+), 14 deletions(-)

diff --git a/tests/TestSuite_ice_advanced_iavf_rss.py b/tests/TestSuite_ice_advanced_iavf_rss.py
index e560c9e6..5ed68d1c 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()
@@ -6371,6 +6395,7 @@ class AdvancedIavfRSSTest(TestCase):
         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])
+        vf0_mac = "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()", ">>>")
@@ -6418,23 +6443,24 @@ class AdvancedIavfRSSTest(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")
+        random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)',
+            "IP/TCP": f'Ether(dst="{random_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="{random_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="{random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)',
+            "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)',
+            "IPv6/SCTP": f'Ether(dst="{random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)',
+            "IP/TCP": f'Ether(dst="{random_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="{random_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="{random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)',
+            "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)',
+            "IPv6/SCTP": f'Ether(dst="{random_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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 05/12] tests/ice_advanced_rss: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (2 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 04/12] tests/ice_advanced_iavf_rss: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 06/12] tests/ice_iavf_fdir: " Weiyuan Li
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

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>
---
 tests/TestSuite_ice_advanced_rss.py | 30 +++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/tests/TestSuite_ice_advanced_rss.py b/tests/TestSuite_ice_advanced_rss.py
index 0c246cca..2adad457 100644
--- a/tests/TestSuite_ice_advanced_rss.py
+++ b/tests/TestSuite_ice_advanced_rss.py
@@ -5494,6 +5494,7 @@ class AdvancedRSSTest(TestCase):
         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 +5542,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")
+        random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)',
+            "IP/TCP": f'Ether(dst="{random_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="{random_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="{random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)',
+            "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)',
+            "IPv6/SCTP": f'Ether(dst="{random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)',
+            "IP/TCP": f'Ether(dst="{random_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="{random_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="{random_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="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)',
+            "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)',
+            "IPv6/SCTP": f'Ether(dst="{random_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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 06/12] tests/ice_iavf_fdir: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (3 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 05/12] tests/ice_advanced_rss: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 07/12] tests/tx_preparation: " Weiyuan Li
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

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>
---
 tests/TestSuite_ice_iavf_fdir.py | 83 ++++++++++++++++++++++++++++++--
 1 file changed, 80 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py
index a4df6151..3ff7f6ad 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, "#"
         )
@@ -10791,7 +10835,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 +10940,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 +11095,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 +11654,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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 07/12] tests/tx_preparation: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (4 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 06/12] tests/ice_iavf_fdir: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 08/12] test_plans/kernelpf_iavf: " Weiyuan Li
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

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>
---
 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..ac0680c6 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 = "23:00:00:00:00:00"
         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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 08/12] test_plans/kernelpf_iavf: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (5 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 07/12] tests/tx_preparation: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 09/12] test_plans/vf_offload: " Weiyuan Li
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify
the script adapt to this chagne.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 test_plans/kernelpf_iavf_test_plan.rst | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test_plans/kernelpf_iavf_test_plan.rst b/test_plans/kernelpf_iavf_test_plan.rst
index 8c7d1ad5..18c59964 100644
--- a/test_plans/kernelpf_iavf_test_plan.rst
+++ b/test_plans/kernelpf_iavf_test_plan.rst
@@ -330,6 +330,11 @@ Change mtu for large packet::
 
    ifconfig 'tester interface' mtu 9000
 
+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
+
 Launch the ``testpmd`` with the following arguments, add "--max-pkt-len"
 for large packet::
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 09/12] test_plans/vf_offload: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (6 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 08/12] test_plans/kernelpf_iavf: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 10/12] test_plans/ice_advanced_iavf_rss: " Weiyuan Li
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify
the script adapt to this chagne.

Signed-off-by: Weiyuan Li <weiyuanx.li@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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 10/12] test_plans/ice_advanced_iavf_rss: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (7 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 09/12] test_plans/vf_offload: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 11/12] test_plans/ice_advanced_rss: " Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: " Weiyuan Li
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify
the script adapt to this chagne.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 test_plans/ice_advanced_iavf_rss_test_plan.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 11/12] test_plans/ice_advanced_rss: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (8 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 10/12] test_plans/ice_advanced_iavf_rss: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-07-18  2:54 ` [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: " Weiyuan Li
  10 siblings, 0 replies; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify
the script adapt to this chagne.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 test_plans/ice_advanced_rss_test_plan.rst | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: update dts code for dpdk csum change
  2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
                   ` (9 preceding siblings ...)
  2022-07-18  2:54 ` [dts][PATCH V1 11/12] test_plans/ice_advanced_rss: " Weiyuan Li
@ 2022-07-18  2:54 ` Weiyuan Li
  2022-08-10  5:42   ` Jiale, SongX
  10 siblings, 1 reply; 13+ messages in thread
From: Weiyuan Li @ 2022-07-18  2:54 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify
the script adapt to this chagne.

Signed-off-by: Weiyuan Li <weiyuanx.li@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.27.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: update dts code for dpdk csum change
  2022-07-18  2:54 ` [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: " Weiyuan Li
@ 2022-08-10  5:42   ` Jiale, SongX
  0 siblings, 0 replies; 13+ messages in thread
From: Jiale, SongX @ 2022-08-10  5:42 UTC (permalink / raw)
  To: dts; +Cc: Li, WeiyuanX

> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: Monday, July 18, 2022 10:55 AM
> To: dts@dpdk.org; Peng, Yuan <yuan.peng@intel.com>
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: update dts code for dpdk
> csum change
> 
> According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in
> checksum forwarding) modify the script adapt to this chagne.
> 
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
> ---
Tested-by: Jiale Song < songx.jiale@intel.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-08-10  5:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18  2:54 [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 02/12] tests/vf_offload: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 03/12] tests/checksum_offload: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 04/12] tests/ice_advanced_iavf_rss: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 05/12] tests/ice_advanced_rss: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 06/12] tests/ice_iavf_fdir: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 07/12] tests/tx_preparation: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 08/12] test_plans/kernelpf_iavf: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 09/12] test_plans/vf_offload: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 10/12] test_plans/ice_advanced_iavf_rss: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 11/12] test_plans/ice_advanced_rss: " Weiyuan Li
2022-07-18  2:54 ` [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: " Weiyuan Li
2022-08-10  5:42   ` Jiale, SongX

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).