* [dts][PATCH V1 2/5] tests/ice_ip_fragment_rte_flow:extend mismatch pkts
2022-05-24 2:12 [dts][PATCH V1 1/5] tests/rte_flow_common:modify check mismatch pkts test Zhimin Huang
@ 2022-05-24 2:12 ` Zhimin Huang
2022-05-24 2:12 ` [dts][PATCH V1 3/5] test_plans/ice_ip_fragment_rte_flow:extend " Zhimin Huang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Zhimin Huang @ 2022-05-24 2:12 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
mismatch pkt should cover mismatch inputset pkts and mismatch pattern pkts.
extend mismatch pkts to cover more test.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
tests/TestSuite_ice_ip_fragment_rte_flow.py | 36 ++++++++++++++-------
1 file changed, 24 insertions(+), 12 deletions(-)
diff --git a/tests/TestSuite_ice_ip_fragment_rte_flow.py b/tests/TestSuite_ice_ip_fragment_rte_flow.py
index 3acf3250..da3e51bd 100644
--- a/tests/TestSuite_ice_ip_fragment_rte_flow.py
+++ b/tests/TestSuite_ice_ip_fragment_rte_flow.py
@@ -48,7 +48,8 @@ tv_mac_ipv4_frag_fdir_queue_index = {
"rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end",
"scapy_str": {
"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IP()/Raw('X'*666)",
+ "Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "queue": 1, "mark_id": 0},
}
@@ -60,7 +61,8 @@ tv_mac_ipv4_frag_fdir_rss_queues = {
],
"scapy_str": {
"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IP()/Raw('X'*666)",
+ "Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "queue": [2, 3], "mark_id": 0},
}
@@ -70,7 +72,8 @@ tv_mac_ipv4_frag_fdir_passthru = {
"rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions passthru / mark / end",
"scapy_str": {
"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IP()/Raw('X'*666)",
+ "Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True},
}
@@ -80,7 +83,8 @@ 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 / mark / end",
"scapy_str": {
"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IP()/Raw('X'*666)",
+ "Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "drop": True},
}
@@ -90,7 +94,8 @@ tv_mac_ipv4_frag_fdir_mark_rss = {
"rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions mark / rss / end",
"scapy_str": {
"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IP()/Raw('X'*666)",
+ "Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True},
}
@@ -100,7 +105,8 @@ tv_mac_ipv4_frag_fdir_mark = {
"rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions mark id 1 / end",
"scapy_str": {
"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IP()/Raw('X'*666)",
+ "Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 1},
}
@@ -158,7 +164,8 @@ tv_mac_ipv6_frag_fdir_queue_index = {
"rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions queue index 1 / mark / end",
"scapy_str": {
"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IPv6()/Raw('X'*666)",
+ "Ether()/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "queue": 1, "mark_id": 0},
}
@@ -170,7 +177,8 @@ tv_mac_ipv6_frag_fdir_rss_queues = {
],
"scapy_str": {
"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IPv6()/Raw('X'*666)",
+ "Ether()/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "queue": [2, 3], "mark_id": 0},
}
@@ -180,7 +188,8 @@ tv_mac_ipv6_frag_fdir_passthru = {
"rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions passthru / mark / end",
"scapy_str": {
"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IPv6()/Raw('X'*666)",
+ "Ether()/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True},
}
@@ -190,7 +199,8 @@ 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 / mark / end",
"scapy_str": {
"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IPv6()/Raw('X'*666)",
+ "Ether()/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "drop": True},
}
@@ -200,7 +210,8 @@ tv_mac_ipv6_frag_fdir_mark_rss = {
"rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions mark / rss / end",
"scapy_str": {
"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IPv6()/Raw('X'*666)",
+ "Ether()/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True},
}
@@ -210,7 +221,8 @@ tv_mac_ipv6_frag_fdir_mark = {
"rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions mark id 1 / end",
"scapy_str": {
"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
- "unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"],
+ "unmatched": ["Ether()/IPv6()/Raw('X'*666)",
+ "Ether()/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 1},
}
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts][PATCH V1 3/5] test_plans/ice_ip_fragment_rte_flow:extend mismatch pkts
2022-05-24 2:12 [dts][PATCH V1 1/5] tests/rte_flow_common:modify check mismatch pkts test Zhimin Huang
2022-05-24 2:12 ` [dts][PATCH V1 2/5] tests/ice_ip_fragment_rte_flow:extend mismatch pkts Zhimin Huang
@ 2022-05-24 2:12 ` Zhimin Huang
2022-05-24 2:12 ` [dts][PATCH V1 4/5] tests/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang
2022-05-24 2:12 ` [dts][PATCH V1 5/5] test_plans/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang
3 siblings, 0 replies; 5+ messages in thread
From: Zhimin Huang @ 2022-05-24 2:12 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
1.add more info for ipfragment rule.
2.mismatch pkt should cover mismatch inputset pkts and mismatch pattern pkts.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
.../ice_ip_fragment_rte_flow_test_plan.rst | 72 ++++++++++++-------
1 file changed, 46 insertions(+), 26 deletions(-)
diff --git a/test_plans/ice_ip_fragment_rte_flow_test_plan.rst b/test_plans/ice_ip_fragment_rte_flow_test_plan.rst
index 18e0ad28..34b8efdc 100644
--- a/test_plans/ice_ip_fragment_rte_flow_test_plan.rst
+++ b/test_plans/ice_ip_fragment_rte_flow_test_plan.rst
@@ -118,6 +118,11 @@ take 'MAC_IPV4_FRAG fdir queue index' for fdir example
flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end
Flow rule #0 created
+.. note::
+
+ For ipfragment rule, it's a fixed combination for parser to know that a fragment pkt.
+ dpdk care about the bit 12-13 of fragment offset, so the valid range is 0x2000-0x1fff, the spec is 0x2000 and mask is 0x2000.
+
2. send matched pkts and check two pkts distributed to queue 1, `RSS hash=0x261a7deb - RSS queue=0x1` in output::
scapy:
@@ -136,17 +141,16 @@ take 'MAC_IPV4_FRAG fdir queue index' for fdir example
3. send mismatched pkts and check fdir id is none::
scapy:
- p = Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
- pkts=fragment6(p, 500)
- sendp(pkts, iface="enp1s0")
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
+ sendp(p, iface="enp1s0")
- Sent 2 packets.
- dut.10.240.183.133: port 0/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=FF:FF:FF:FF:FF:FF - type=0x86dd - length=494 - nb_segs=1 - RSS hash=0xe5ae2d03 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_FRAG - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x3
- ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_GOOD
- port 0/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=FF:FF:FF:FF:FF:FF - type=0x86dd - length=296 - nb_segs=1 - RSS hash=0xe5ae2d03 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_FRAG - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x3
- ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_GOOD
+ port 0/queue 11: received 1 packets
+ src=00:00:00:00:00:00 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 - length=700 - nb_segs=1 - RSS hash=0x7bd13a5b - RSS queue=0xb - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0xb
+ ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
+ port 0/queue 0: received 1 packets
+ src=00:00:00:00:00:00 - dst=FF:FF:FF:FF:FF:FF - type=0x86dd - length=728 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_FRAG - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x0
+ ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
4. destroy rule re-send step 2 pkts and check fdir id is none::
@@ -255,7 +259,8 @@ Subcase 1: MAC_IPV4_FRAG fdir queue index
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 2: MAC_IPV4_FRAG fdir rss queues
-----------------------------------------
@@ -270,7 +275,8 @@ Subcase 2: MAC_IPV4_FRAG fdir rss queues
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 3: MAC_IPV4_FRAG fdir passthru
--------------------------------------
@@ -285,7 +291,8 @@ Subcase 3: MAC_IPV4_FRAG fdir passthru
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 4: MAC_IPV4_FRAG fdir drop
----------------------------------
@@ -300,7 +307,8 @@ Subcase 4: MAC_IPV4_FRAG fdir drop
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 5: MAC_IPV4_FRAG fdir mark+rss
--------------------------------------
@@ -315,7 +323,8 @@ Subcase 5: MAC_IPV4_FRAG fdir mark+rss
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 6: MAC_IPV4_FRAG fdir mark
----------------------------------
@@ -330,7 +339,8 @@ Subcase 6: MAC_IPV4_FRAG fdir mark
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Test case: MAC_IPV6_FRAG pattern fdir fragment
==============================================
@@ -348,7 +358,8 @@ Subcase 1: MAC_IPV6_FRAG fdir queue index
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 2: MAC_IPV6_FRAG fdir rss queues
----------------------------------------
@@ -363,7 +374,8 @@ Subcase 2: MAC_IPV6_FRAG fdir rss queues
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 3: MAC_IPV6_FRAG fdir passthru
--------------------------------------
@@ -378,7 +390,8 @@ Subcase 3: MAC_IPV6_FRAG fdir passthru
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 4: MAC_IPV6_FRAG fdir drop
----------------------------------
@@ -393,7 +406,8 @@ Subcase 4: MAC_IPV6_FRAG fdir drop
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 5: MAC_IPV6_FRAG fdir mark+rss
--------------------------------------
@@ -408,7 +422,8 @@ Subcase 5: MAC_IPV6_FRAG fdir mark+rss
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 6: MAC_IPV6_FRAG fdir mark
----------------------------------
@@ -423,7 +438,8 @@ Subcase 6: MAC_IPV6_FRAG fdir mark
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Test case: MAC_IPV4_FRAG_fdir_with_l2
=====================================
@@ -444,7 +460,8 @@ take 'mac_ipv4_frag_l2dst_fdir_queue_index' example::
3.unmatched packets:
- p=Ether(dst='00:00:00:00:00:01')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkts=fragment6(p, 500)
+ Ether(dst='00:00:00:00:00:01')/IP()/Raw('X'*666)
+ Ether(dst='00:00:00:00:00:01')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
.. note::
@@ -469,7 +486,8 @@ take 'mac_ipv6_frag_l2dst_fdir_queue_index' example::
3.unmatched packets:
- p=Ether(dst='00:00:00:00:00:01')/IP(id=47750)/Raw('X'*666); pkts=fragment(p, fragsize=500)
+ Ether(dst='00:00:00:00:00:01')/IPv6()/Raw('X'*666)
+ Ether(dst='00:00:00:00:00:01')/IP(id=47750)/Raw('X'*666)
.. note::
@@ -495,7 +513,8 @@ take 'mac_ipv4_frag_l3src_fdir_queue_index' example::
3.unmatched packets:
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkts=fragment6(p, 500)
+ Ether()/IP(src='192.168.1.1')/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
subcase 1: MAC_IPV4_FRAG_fdir_with_l3dst
----------------------------------------
@@ -522,7 +541,8 @@ take 'mac_ipv6_frag_l3src_fdir_queue_index' example::
3.unmatched packets:
- p=Ether()/IP(id=47750, src='192.168.1.1')/Raw('X'*666); pkts=fragment(p, fragsize=500)
+ Ether()/IPv6(src='2001::1')/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
subcase 1: MAC_IPV6_FRAG_fdir_with_l3dst
----------------------------------------
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts][PATCH V1 4/5] tests/ice_iavf_ip_fragment_rte_flow:extend mismatch pkts
2022-05-24 2:12 [dts][PATCH V1 1/5] tests/rte_flow_common:modify check mismatch pkts test Zhimin Huang
2022-05-24 2:12 ` [dts][PATCH V1 2/5] tests/ice_ip_fragment_rte_flow:extend mismatch pkts Zhimin Huang
2022-05-24 2:12 ` [dts][PATCH V1 3/5] test_plans/ice_ip_fragment_rte_flow:extend " Zhimin Huang
@ 2022-05-24 2:12 ` Zhimin Huang
2022-05-24 2:12 ` [dts][PATCH V1 5/5] test_plans/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang
3 siblings, 0 replies; 5+ messages in thread
From: Zhimin Huang @ 2022-05-24 2:12 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
mismatch pkt should cover mismatch inputset pkts and mismatch pattern pkts.
extend mismatch pkts to cover more test.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
...TestSuite_ice_iavf_ip_fragment_rte_flow.py | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_ice_iavf_ip_fragment_rte_flow.py b/tests/TestSuite_ice_iavf_ip_fragment_rte_flow.py
index 8c9cfd9d..8d035df5 100644
--- a/tests/TestSuite_ice_iavf_ip_fragment_rte_flow.py
+++ b/tests/TestSuite_ice_iavf_ip_fragment_rte_flow.py
@@ -49,6 +49,7 @@ tv_mac_ipv4_frag_fdir_queue_index = {
"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')/IP()/Raw('X'*666)",
"Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"
],
},
@@ -63,6 +64,7 @@ tv_mac_ipv4_frag_fdir_rss_queues = {
"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')/IP()/Raw('X'*666)",
"Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"
],
},
@@ -75,6 +77,7 @@ tv_mac_ipv4_frag_fdir_passthru = {
"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')/IP()/Raw('X'*666)",
"Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"
],
},
@@ -87,6 +90,7 @@ tv_mac_ipv4_frag_fdir_drop = {
"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')/IP()/Raw('X'*666)",
"Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"
],
},
@@ -99,6 +103,7 @@ tv_mac_ipv4_frag_fdir_mark_rss = {
"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')/IP()/Raw('X'*666)",
"Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"
],
},
@@ -111,6 +116,7 @@ tv_mac_ipv4_frag_fdir_mark = {
"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')/IP()/Raw('X'*666)",
"Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"
],
},
@@ -157,7 +163,8 @@ tv_mac_ipv6_frag_fdir_queue_index = {
"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)"],
+ "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/Raw('X'*666)",
+ "Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "queue": 1, "mark_id": 0},
}
@@ -171,7 +178,8 @@ tv_mac_ipv6_frag_fdir_rss_queues = {
"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)"],
+ "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/Raw('X'*666)",
+ "Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "queue": [2, 3], "mark_id": 0},
}
@@ -183,7 +191,8 @@ tv_mac_ipv6_frag_fdir_passthru = {
"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)"],
+ "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/Raw('X'*666)",
+ "Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True},
}
@@ -195,7 +204,8 @@ tv_mac_ipv6_frag_fdir_drop = {
"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)"],
+ "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/Raw('X'*666)",
+ "Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "drop": True},
}
@@ -207,7 +217,8 @@ tv_mac_ipv6_frag_fdir_mark_rss = {
"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)"],
+ "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/Raw('X'*666)",
+ "Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True},
}
@@ -219,7 +230,8 @@ tv_mac_ipv6_frag_fdir_mark = {
"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)"],
+ "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/Raw('X'*666)",
+ "Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
},
"check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 1},
}
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts][PATCH V1 5/5] test_plans/ice_iavf_ip_fragment_rte_flow:extend mismatch pkts
2022-05-24 2:12 [dts][PATCH V1 1/5] tests/rte_flow_common:modify check mismatch pkts test Zhimin Huang
` (2 preceding siblings ...)
2022-05-24 2:12 ` [dts][PATCH V1 4/5] tests/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang
@ 2022-05-24 2:12 ` Zhimin Huang
3 siblings, 0 replies; 5+ messages in thread
From: Zhimin Huang @ 2022-05-24 2:12 UTC (permalink / raw)
To: dts; +Cc: Zhimin Huang
1.add more info for ipfragment rule.
2.mismatch pkt should cover mismatch inputset pkts and mismatch pattern pkts.
Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
...ce_iavf_ip_fragment_rte_flow_test_plan.rst | 67 ++++++++++++-------
1 file changed, 43 insertions(+), 24 deletions(-)
diff --git a/test_plans/ice_iavf_ip_fragment_rte_flow_test_plan.rst b/test_plans/ice_iavf_ip_fragment_rte_flow_test_plan.rst
index d7e4e1b1..2ab727c5 100644
--- a/test_plans/ice_iavf_ip_fragment_rte_flow_test_plan.rst
+++ b/test_plans/ice_iavf_ip_fragment_rte_flow_test_plan.rst
@@ -126,6 +126,12 @@ take 'MAC_IPV4_FRAG fdir queue index' for fdir example
flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end
Flow rule #0 created
+.. note::
+
+ For ipfragment rule, it's a fixed combination for parser to know that a fragment pkt.
+ dpdk care about the bit 12-13 of fragment offset, so the valid range is 0x2000-0x1fff, the spec is 0x2000 and mask is 0x2000.
+
+
2. send matched pkts and check two pkts distributed to queue 1, `RSS hash=0x261a7deb - RSS queue=0x1` in output::
scapy:
@@ -144,17 +150,16 @@ take 'MAC_IPV4_FRAG fdir queue index' for fdir example
3. send mismatched pkts and check fdir id is none::
scapy:
- p = Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
- pkts=fragment6(p, 500)
- sendp(pkts, iface="enp1s0")
+ Ether(dst='00:11:22:33:55:66')/IP()/Raw('X'*666)
+ Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
+ sendp(p, iface="enp1s0")
- Sent 2 packets.
- dut.10.240.183.133: port 0/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=FF:FF:FF:FF:FF:FF - type=0x86dd - length=494 - nb_segs=1 - RSS hash=0xe5ae2d03 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_FRAG - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x3
- ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_GOOD
- port 0/queue 3: received 1 packets
- src=00:00:00:00:00:00 - dst=FF:FF:FF:FF:FF:FF - type=0x86dd - length=296 - nb_segs=1 - RSS hash=0xe5ae2d03 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_FRAG - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x3
- ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_GOOD
+ port 0/queue 4: received 1 packets
+ src=00:00:00:00:00:00 - dst=00:11:22:33:55:66 - type=0x0800 - length=700 - nb_segs=1 - RSS hash=0xafca6174 - RSS queue=0x4 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0x4
+ ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
+ port 0/queue 0: received 1 packets
+ src=00:00:00:00:00:00 - dst=00:11:22:33:55:66 - type=0x86dd - length=728 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT_UNKNOWN L4_FRAG - sw ptype: L2_ETHER L3_IPV6_EXT L4_FRAG - l2_len=14 - l3_len=48 - l4_len=0 - Receive queue=0x0
+ ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
4. destroy rule re-send step 2 pkts and check fdir id is none::
@@ -263,7 +268,8 @@ Subcase 1: MAC_IPV4_FRAG fdir queue index
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 2: MAC_IPV4_FRAG fdir rss queues
-----------------------------------------
@@ -278,7 +284,8 @@ Subcase 2: MAC_IPV4_FRAG fdir rss queues
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 3: MAC_IPV4_FRAG fdir passthru
--------------------------------------
@@ -293,7 +300,8 @@ Subcase 3: MAC_IPV4_FRAG fdir passthru
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 4: MAC_IPV4_FRAG fdir drop
----------------------------------
@@ -308,7 +316,8 @@ Subcase 4: MAC_IPV4_FRAG fdir drop
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 5: MAC_IPV4_FRAG fdir mark+rss
--------------------------------------
@@ -323,7 +332,8 @@ Subcase 5: MAC_IPV4_FRAG fdir mark+rss
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Subcase 6: MAC_IPV4_FRAG fdir mark
----------------------------------
@@ -338,7 +348,8 @@ Subcase 6: MAC_IPV4_FRAG fdir mark
3. unmatched packets::
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkt=fragment6(p, 500)
+ Ether()/IP()/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
Test case: MAC_IPV6_FRAG pattern fdir fragment
==============================================
@@ -356,7 +367,8 @@ Subcase 1: MAC_IPV6_FRAG fdir queue index
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 2: MAC_IPV6_FRAG fdir rss queues
----------------------------------------
@@ -371,7 +383,8 @@ Subcase 2: MAC_IPV6_FRAG fdir rss queues
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 3: MAC_IPV6_FRAG fdir passthru
--------------------------------------
@@ -386,7 +399,8 @@ Subcase 3: MAC_IPV6_FRAG fdir passthru
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 4: MAC_IPV6_FRAG fdir drop
----------------------------------
@@ -401,7 +415,8 @@ Subcase 4: MAC_IPV6_FRAG fdir drop
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 5: MAC_IPV6_FRAG fdir mark+rss
--------------------------------------
@@ -416,7 +431,8 @@ Subcase 5: MAC_IPV6_FRAG fdir mark+rss
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Subcase 6: MAC_IPV6_FRAG fdir mark
----------------------------------
@@ -431,7 +447,8 @@ Subcase 6: MAC_IPV6_FRAG fdir mark
3. unmatched packets::
- p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment(p, 500)
+ Ether()/IPv6()/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
Test case: MAC_IPV4_FRAG_fdir_with_l2
=====================================
@@ -464,7 +481,8 @@ take 'mac_ipv4_frag_l3src_fdir_queue_index' example::
3.unmatched packets:
- p=Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666); pkts=fragment6(p, 500)
+ Ether()/IP(src='192.168.1.1')/Raw('X'*666)
+ Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)
subcase 1: MAC_IPV4_FRAG_fdir_with_l3dst
----------------------------------------
@@ -491,7 +509,8 @@ take 'mac_ipv6_frag_l3src_fdir_queue_index' example::
3.unmatched packets:
- p=Ether()/IP(id=47750, src='192.168.1.1')/Raw('X'*666); pkts=fragment(p, fragsize=500)
+ Ether()/IPv6(src='2001::1')/Raw('X'*666)
+ Ether()/IP(id=47750)/Raw('X'*666)
subcase 1: MAC_IPV6_FRAG_fdir_with_l3dst
----------------------------------------
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread