test suite reviews and discussions
 help / color / mirror / Atom feed
From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org
Cc: Weiyuan Li <weiyuanx.li@intel.com>, Jiale Song <songx.jiale@intel.com>
Subject: [dts][PATCH V2 06/10] tests/ice_advanced_rss: update dts code for dpdk csum change
Date: Fri, 26 Aug 2022 10:43:04 +0800	[thread overview]
Message-ID: <20220826024308.17447-6-weiyuanx.li@intel.com> (raw)
In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com>

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

1. Modify VF case to enable promisc.
2. Modify PF case to send packet dst mac is random.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
Tested-by: Jiale Song < songx.jiale@intel.com>

v2:
-modify the dst mac variable to 'dst_mac'

 tests/TestSuite_ice_advanced_rss.py | 31 +++++++++++++++--------------
 1 file changed, 16 insertions(+), 15 deletions(-)

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


  parent reply	other threads:[~2022-08-26  2:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26  2:42 [dts][PATCH V2 01/10] tests/vf_offload: " Weiyuan Li
2022-08-26  2:43 ` [dts][PATCH V2 02/10] test_plans/vf_offload: " Weiyuan Li
2022-08-26  2:43 ` [dts][PATCH V2 03/10] tests/checksum_offload: " Weiyuan Li
2022-08-26  2:43 ` [dts][PATCH V2 04/10] tests/ice_advanced_iavf_rss: " Weiyuan Li
2022-08-26  2:43 ` [dts][PATCH V2 05/10] test_plans/ice_advanced_iavf_rss: " Weiyuan Li
2022-08-26  2:43 ` Weiyuan Li [this message]
2022-08-26  2:43 ` [dts][PATCH V2 07/10] test_plans/ice_advanced_rss: " Weiyuan Li
2022-08-26  2:43 ` [dts][PATCH V2 08/10] test_plans/ice_iavf_fdir: " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220826024308.17447-6-weiyuanx.li@intel.com \
    --to=weiyuanx.li@intel.com \
    --cc=dts@dpdk.org \
    --cc=songx.jiale@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).