From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts] [PATCH V1 3/5] tests/cvl_iavf_ip_fragment_rte_flow:modify testcase to adapt dpdk changed
Date: Mon, 1 Nov 2021 20:00:54 +0800 [thread overview]
Message-ID: <20211101120056.12228-3-zhiminx.huang@intel.com> (raw)
In-Reply-To: <20211101120056.12228-1-zhiminx.huang@intel.com>
1.according to 54d78462344e2b3ec0a54cb6f13af0bf3da47032.
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>
---
...TestSuite_cvl_iavf_ip_fragment_rte_flow.py | 33 ++++++++++---------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py b/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py
index aa054053..983054c3 100644
--- a/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py
+++ b/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py
@@ -72,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(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
"unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
},
@@ -106,12 +106,12 @@ tvs_mac_ipv4_fragment_fdir = [
tv_mac_ipv4_frag_fdir_mark,
]
-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]
@@ -147,7 +147,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(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
"unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"]
},
@@ -181,12 +181,12 @@ tvs_mac_ipv6_fragment_fdir = [
tv_mac_ipv6_frag_fdir_mark,
]
-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]
@@ -373,7 +373,8 @@ class TestCvlIavfIpFragmentRteFlow(TestCase):
rule_list_fdir = [
'flow create 0 ingress pattern eth / 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()/IP(src='192.168.0.20', id=47750)/Raw('X'*666)"
+ pkt_fdir = ["Ether()/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)
@@ -382,11 +383,12 @@ class TestCvlIavfIpFragmentRteFlow(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", "# ")
@@ -400,11 +402,12 @@ class TestCvlIavfIpFragmentRteFlow(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 ` Zhimin Huang [this message]
2021-11-01 12:00 ` [dts] [PATCH V1 4/5] tests/cvl_ip_fragment_rte_flow:modify testcase " Zhimin Huang
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-3-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).