* Re: [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed
2021-11-01 12:00 [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed 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
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Huang, ZhiminX @ 2021-11-01 5:04 UTC (permalink / raw)
To: dts
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Monday, November 1, 2021 8:01 PM
> To: dts@dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify
> testplan to adapt dpdk changed
>
> 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>
> ---
Tested-by: Zhimin Huang <zhiminx.huang@intel.com >
[-- Attachment #2: TestCvlIpFragmentRteFlow.log --]
[-- Type: application/octet-stream, Size: 411194 bytes --]
[-- Attachment #3: TestCvlIavfIpFragmentRteFlow.log --]
[-- Type: application/octet-stream, Size: 343701 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 2/5] test_plans/cvl_ip_fragment_rte_flow:modify testplan to adapt dpdk changed
2021-11-01 12:00 [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed Zhimin Huang
2021-11-01 5:04 ` Huang, ZhiminX
@ 2021-11-01 12:00 ` Zhimin Huang
2021-11-01 12:00 ` [dts] [PATCH V1 3/5] tests/cvl_iavf_ip_fragment_rte_flow:modify testcase " Zhimin Huang
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Zhimin Huang @ 2021-11-01 12:00 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
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>
---
.../cvl_ip_fragment_rte_flow_test_plan.rst | 25 +++++++++++++------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst b/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst
index 704b590c..909692cc 100644
--- a/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst
+++ b/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst
@@ -102,8 +102,17 @@ The steps same as FDIR/RSS test steps
take 'MAC_IPV4_FRAG fdir queue index' for fdir example
------------------------------------------------------
+
+.. note::
+
+ The default rss not support ipfragment, need take a rss rule to enable ipfragment rss.
+
1. validate and create rule::
+ take a ipfragment rss rule:
+ flow create 0 ingress pattern eth / ipv4 / end actions rss types eth ipv4-frag end key_len 0 queues end / end
+
+ take fdir rule:
flow validate 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end
Flow rule validated
flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end
@@ -283,7 +292,7 @@ Subcase 4: MAC_IPV4_FRAG fdir drop
1. rules::
- flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / end
+ flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / mark / end
2. matched packets::
@@ -376,7 +385,7 @@ Subcase 4: MAC_IPV6_FRAG fdir drop
1. rules::
- flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / end
+ flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / mark / end
2. matched packets::
@@ -575,8 +584,8 @@ Subcase 1: exclusive validation fdir rule
-----------------------------------------
1. create fdir filter rules::
- 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
+ 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
2. hit pattern/defined input set id, the pkt received for queue 2::
@@ -586,8 +595,8 @@ Subcase 2: exclusive validation fdir rule
-----------------------------------------
1. create fdir filter rules::
- flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / end
- 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 / mark / end
+ 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
2. hit pattern/defined input set id, the pkt received for queue 2::
@@ -600,7 +609,7 @@ Subcase 3: exclusive validation rss rule
flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end
flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end
-2. hit pattern/defined input set id, the pkt received for rss same queue::
+2. hit pattern/defined input set id, the pkt received for rss different queue::
p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment6(p, 500)
p=Ether()/IP(id=47751)/Raw('X'*666); pkts=fragment6(p, 500)
@@ -612,7 +621,7 @@ Subcase 4: exclusive validation rss rule
flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end
flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end
-2. hit pattern/defined input set id, the pkt received for rss same queue::
+2. hit pattern/defined input set id, the pkt received for rss different queue::
p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment6(p, 500)
p=Ether()/IP(id=47751)/Raw('X'*666); pkts=fragment6(p, 500)
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 3/5] tests/cvl_iavf_ip_fragment_rte_flow:modify testcase to adapt dpdk changed
2021-11-01 12:00 [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed 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
2021-11-01 12:00 ` [dts] [PATCH V1 4/5] tests/cvl_ip_fragment_rte_flow:modify " Zhimin Huang
2021-11-01 12:00 ` [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common " Zhimin Huang
4 siblings, 0 replies; 7+ messages in thread
From: Zhimin Huang @ 2021-11-01 12:00 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 4/5] tests/cvl_ip_fragment_rte_flow:modify testcase to adapt dpdk changed
2021-11-01 12:00 [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed Zhimin Huang
` (2 preceding siblings ...)
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
2021-11-01 12:00 ` [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common " Zhimin Huang
4 siblings, 0 replies; 7+ messages in thread
From: Zhimin Huang @ 2021-11-01 12:00 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common to adapt dpdk changed
2021-11-01 12:00 [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed Zhimin Huang
` (3 preceding siblings ...)
2021-11-01 12:00 ` [dts] [PATCH V1 4/5] tests/cvl_ip_fragment_rte_flow:modify " Zhimin Huang
@ 2021-11-01 12:00 ` Zhimin Huang
2021-11-05 13:28 ` Tu, Lijuan
4 siblings, 1 reply; 7+ messages in thread
From: Zhimin Huang @ 2021-11-01 12:00 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
1.according to 54d78462344e2b3ec0a54cb6f13af0bf3da47032.
the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test.
fix rte flow common code to adapt dts changed.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
tests/rte_flow_common.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index eae24e2e..fb76bf86 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -1252,6 +1252,11 @@ class FdirProcessing(object):
drop = tv["check_param"].get("drop")
# create rule
self.test_case.dut.send_expect("flow flush %d" % port_id, "testpmd> ", 120)
+ rule_rss = []
+ if "tv_mac_ipv4_frag_fdir" in tv['name']:
+ rule_rss = self.create_rule("flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end")
+ elif "tv_mac_ipv6_frag_fdir" in tv['name']:
+ rule_rss = self.create_rule("flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end")
rule_li = self.create_rule(tv["rule"])
# send and check match packets
out1 = self.send_pkt_get_output(pkts=tv["scapy_str"]["matched"], port_id=port_id, drop=drop)
@@ -1274,7 +1279,10 @@ class FdirProcessing(object):
self.verify(matched_queue == matched_queue2 and None not in matched_queue,
"send twice matched packet, received in deferent queues")
# check not rule exists
- self.check_rule(port_id=port_id, stats=False)
+ if rule_rss:
+ self.check_rule(port_id=tv["check_param"]["port_id"], rule_list=rule_rss)
+ else:
+ self.check_rule(port_id=port_id, stats=False)
test_results[tv["name"]] = True
self.logger.info((GREEN("case passed: %s" % tv["name"])))
except Exception as e:
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common to adapt dpdk changed
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
0 siblings, 0 replies; 7+ messages in thread
From: Tu, Lijuan @ 2021-11-05 13:28 UTC (permalink / raw)
To: Huang, ZhiminX, dts; +Cc: Huang, ZhiminX
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zhimin Huang
> Sent: 2021年11月1日 20:01
> To: dts@dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common to
> adapt dpdk changed
>
> 1.according to 54d78462344e2b3ec0a54cb6f13af0bf3da47032.
> the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for
> fdir test.
>
> fix rte flow common code to adapt dts changed.
>
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
Series applied
^ permalink raw reply [flat|nested] 7+ messages in thread