From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts] [PATCH V1 4/5] tests/cvl_ip_fragment_rte_flow:modify testcase to adapt dpdk changed
Date: Mon, 1 Nov 2021 20:00:55 +0800 [thread overview]
Message-ID: <20211101120056.12228-4-zhiminx.huang@intel.com> (raw)
In-Reply-To: <20211101120056.12228-1-zhiminx.huang@intel.com>
1.according to b3d95f1817288ca228f09b9164d6d3ff6249b175.
the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test.
2.according to e4a0a7599d974f05665fec3e4c251659f0b11453.
switch have high priority,should take the rule with mark into fdir.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
tests/TestSuite_cvl_ip_fragment_rte_flow.py | 42 +++++++++++----------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/tests/TestSuite_cvl_ip_fragment_rte_flow.py b/tests/TestSuite_cvl_ip_fragment_rte_flow.py
index 181634c3..df67eac4 100644
--- a/tests/TestSuite_cvl_ip_fragment_rte_flow.py
+++ b/tests/TestSuite_cvl_ip_fragment_rte_flow.py
@@ -31,6 +31,7 @@
import time
+import re
from scapy.all import *
@@ -71,7 +72,7 @@ tv_mac_ipv4_frag_fdir_passthru = {
tv_mac_ipv4_frag_fdir_drop = {
"name": "tv_mac_ipv4_frag_fdir_drop",
- "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / end",
+ "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / mark / end",
"scapy_str": {"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
"unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
},
@@ -105,7 +106,7 @@ tvs_mac_ipv4_fragment_fdir = [
tv_mac_ipv4_frag_fdir_mark,
]
-tvs_mac_ipv4_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l2dst')
+tvs_mac_ipv4_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l2dst')
.replace('eth / ipv4 fragment_offset', 'eth dst is 00:00:00:00:00:01 / ipv4 fragment_offset')
.replace("Ether()", "Ether(dst='00:00:00:00:00:01')")
)
@@ -113,12 +114,12 @@ tvs_mac_ipv4_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv4_frag', '
tvs_mac_ipv4_frag_fdir_with_l2 = tvs_mac_ipv4_fragment_fdir_l2dst
-tvs_mac_ipv4_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3src')
+tvs_mac_ipv4_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l3src')
.replace('ipv4 fragment_offset', 'ipv4 src is 192.168.1.1 fragment_offset')
.replace("IP(id=47750)", "IP(id=47750, src='192.168.1.1')"))
for element in tvs_mac_ipv4_fragment_fdir]
-tvs_mac_ipv4_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3dst')
+tvs_mac_ipv4_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l3dst')
.replace('ipv4 fragment_offset', 'ipv4 dst is 192.168.1.2 fragment_offset')
.replace("IP(id=47750)", "IP(id=47750, dst='192.168.1.2')"))
for element in tvs_mac_ipv4_fragment_fdir]
@@ -154,7 +155,7 @@ tv_mac_ipv6_frag_fdir_passthru = {
tv_mac_ipv6_frag_fdir_drop = {
"name": "tv_mac_ipv6_frag_fdir_drop",
- "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / end",
+ "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / mark / end",
"scapy_str": {"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
"unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"]
},
@@ -188,7 +189,7 @@ tvs_mac_ipv6_fragment_fdir = [
tv_mac_ipv6_frag_fdir_mark,
]
-tvs_mac_ipv6_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l2dst')
+tvs_mac_ipv6_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l2dst')
.replace('eth / ipv6 / ipv6_frag_ext frag_data', 'eth dst is 00:00:00:00:00:01 / ipv6 / ipv6_frag_ext frag_data')
.replace("Ether()", "Ether(dst='00:00:00:00:00:01')")
)
@@ -196,12 +197,12 @@ tvs_mac_ipv6_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv6_frag', '
tvs_mac_ipv6_frag_fdir_with_l2 = tvs_mac_ipv6_fragment_fdir_l2dst
-tvs_mac_ipv6_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l3src')
+tvs_mac_ipv6_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l3src')
.replace('/ ipv6 /', '/ ipv6 src is 2001::1 /')
.replace("IPv6()", "IPv6(src='2001::1')"))
for element in tvs_mac_ipv6_fragment_fdir]
-tvs_mac_ipv6_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l3dst')
+tvs_mac_ipv6_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l3dst')
.replace('/ ipv6 /', '/ ipv6 dst is 2001::2 /')
.replace("IPv6()", "IPv6(dst='2001::2')"))
for element in tvs_mac_ipv6_fragment_fdir]
@@ -366,9 +367,10 @@ class TestCvlIpFragmentRteFlow(TestCase):
result = True
result_list = []
rule_list_fdir = [
- 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / end',
- 'flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / end']
- pkt_fdir = "Ether(dst='00:11:22:33:44:55')/IP(src='192.168.0.20', id=47750)/Raw('X'*666)"
+ 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark / end',
+ 'flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / mark / end']
+ pkt_fdir = ["Ether(dst='00:11:22:33:44:55')/IP(src='192.168.0.20', id=47750)/Raw('X'*666)"]
+ p = re.compile(r"port\s+%s/queue\s+(\d+):\s+received\s+(\d+)\s+packets" % 0)
self.logger.info('Subcase 1: exclusive validation fdir rule')
self.launch_testpmd(param_fdir=True)
@@ -377,11 +379,12 @@ class TestCvlIpFragmentRteFlow(TestCase):
except Exception as e:
self.logger.warning('Subcase 1 failed: %s' % e)
result = False
- hashes, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkt_fdir)
- for queue in queues:
- if '0x2' != queue:
+ out = self.fdirprocess.send_pkt_get_output(pkt_fdir)
+ res = p.findall(out)
+ for queue in res:
+ if queue[0][0].strip() != '2':
result = False
- self.logger.error('Error: queue index {} != 2'.format(queue))
+ self.logger.error("Error: queue index {} != '2'".format(queue[0][0]))
continue
result_list.append(result)
self.dut.send_expect("quit", "# ")
@@ -395,11 +398,12 @@ class TestCvlIpFragmentRteFlow(TestCase):
except Exception as e:
self.logger.warning('Subcase 2 failed: %s' % e)
result = False
- hashes, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkt_fdir)
- for queue in queues:
- if '0x2' != queue:
+ out = self.fdirprocess.send_pkt_get_output(pkt_fdir)
+ res = p.findall(out)
+ for queue in res:
+ if queue[0][0].strip() != '2':
result = False
- self.logger.error('Error: queue index {} != 2'.format(queue))
+ self.logger.error("Error: queue index {} != '2'".format(queue[0][0]))
continue
result_list.append(result)
self.dut.send_expect("quit", "# ")
--
2.17.1
next prev parent reply other threads:[~2021-11-01 3:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 12:00 [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan " Zhimin Huang
2021-11-01 5:04 ` Huang, ZhiminX
2021-11-01 12:00 ` [dts] [PATCH V1 2/5] test_plans/cvl_ip_fragment_rte_flow:modify " Zhimin Huang
2021-11-01 12:00 ` [dts] [PATCH V1 3/5] tests/cvl_iavf_ip_fragment_rte_flow:modify testcase " Zhimin Huang
2021-11-01 12:00 ` Zhimin Huang [this message]
2021-11-01 12:00 ` [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common " Zhimin Huang
2021-11-05 13:28 ` Tu, Lijuan
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=20211101120056.12228-4-zhiminx.huang@intel.com \
--to=zhiminx.huang@intel.com \
--cc=dts@dpdk.org \
/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).