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

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