* [dts][PATCH v1 1/2] test_plans/ice_fdir: support ipv6 next protocol id
2022-07-25 5:21 [dts][PATCH v1 0/2] ice support ipv6 next protocol id hailinx xu
@ 2022-07-25 5:21 ` hailinx xu
2022-07-25 5:21 ` [dts][PATCH v1 2/2] tests/ice_fdir: " hailinx xu
1 sibling, 0 replies; 5+ messages in thread
From: hailinx xu @ 2022-07-25 5:21 UTC (permalink / raw)
To: qi.fu, dts; +Cc: hailinx xu
add ice support ipv6 next protocol id test plans
---
test_plans/ice_fdir_test_plan.rst | 181 ++++++++++++++++++++++++++++++
1 file changed, 181 insertions(+)
diff --git a/test_plans/ice_fdir_test_plan.rst b/test_plans/ice_fdir_test_plan.rst
index 1bb11ae1..09a5cd40 100644
--- a/test_plans/ice_fdir_test_plan.rst
+++ b/test_plans/ice_fdir_test_plan.rst
@@ -4203,3 +4203,184 @@ So there can be created 14848 fdir rules on 1 PF port.
there is no rule listed.
6. verify matched packets for rule 0 and rule 15359 received without FDIR matched ID.
+
+
+Test_Case: IPV6
+===================
+match packets::
+
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=123)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=123)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=123)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=123)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=123)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=123)/Raw('x'*40)],iface="ens192f0")
+
+mismatch packets::
+
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=111)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/UDP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=123)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/Raw('x'*40)],iface="ens192f0")
+
+
+Subcase 1: index
+-------------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions queue index 1 / mark / end
+
+Subcase 1: group
+-------------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions rss queues 1 2 end / mark id 1 / end
+
+Subcase 1: passthru
+-------------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions passthru / mark / end
+
+Subcase 1: drop
+-------------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions drop / end
+
+Subcase 1: mark_rss
+-------------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions mark / rss / end
+
+Subcase 1: mark
+-------------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions mark / end
+
+
+Test_Case: IPV6_TCP
+===================
+match packets::
+
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=6)/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=6)/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=6)/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=6)/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=6)/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=6)/TCP()/Raw('x'*40)],iface="ens192f0")
+
+mismatch packets::
+
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=17)/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/UDP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=6)/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/TCP()/Raw('x'*40)],iface="ens192f0")
+
+
+index
+-------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions queue index 3 / mark / end
+
+group
+-------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions rss queues 5 6 end / mark id 1 / end
+
+
+passthru
+-------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions passthru / mark / end
+
+drop
+--------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions drop / end
+
+mark
+--------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions mark / rss / end
+
+mark_rss
+--------------
+rule::
+
+ flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions mark / end
+
+
+Test_Case: IPV6_UDP
+===================
+match packets::
+
+ pkt1: sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=17)/Raw('x'*40)],iface="ens192f0")
+ pkt1: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)],iface="ens192f0")
+ pkt2: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+ pkt3: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+ pkt4: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+ pkt5: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+ pkt6: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+
+mismatch packets::
+
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=6)/UDP/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/UDP()/Raw('x'*40)],iface="ens192f0")
+
+
+1. replace "tcp" with "udp"
+2. replace "proto is 6" with "proto is 17"
+3. replace "nh=6" with "nh=17"
+
+
+Test_Case: IPV6_SCTP
+====================
+match packets::
+
+ pkt1: sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=132)/Raw('x'*40)],iface="ens192f0")
+ pkt1: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)],iface="ens192f0")
+ pkt2: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+ pkt3: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+ pkt4: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+ pkt5: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+ pkt6: sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=123)/IPv6ExtHdrDestOpt(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+
+mismatch packets::
+
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=123)/SCTP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/UDP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+ sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/SCTP()/Raw('x'*40)],iface="ens192f0")
+
+
+1. replace "tcp" with "sctp"
+2. replace "proto is 6" with "proto is 132"
+3. replace "nh=6" with "nh=132"
+
+
+exclusive test cases
+====================
+support priority::
+
+ rule1: flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions queue index 1 / mark / end
+
+same proto value can't be created twice::
+
+ rule1: flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions queue index 1 / mark / end
+ rule2: flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions rss queues 2 3 end / mark / end
\ No newline at end of file
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts][PATCH v1 2/2] tests/ice_fdir: support ipv6 next protocol id
2022-07-25 5:21 [dts][PATCH v1 0/2] ice support ipv6 next protocol id hailinx xu
2022-07-25 5:21 ` [dts][PATCH v1 1/2] test_plans/ice_fdir: " hailinx xu
@ 2022-07-25 5:21 ` hailinx xu
2022-07-27 3:25 ` Huang, ZhiminX
1 sibling, 1 reply; 5+ messages in thread
From: hailinx xu @ 2022-07-25 5:21 UTC (permalink / raw)
To: qi.fu, dts; +Cc: hailinx xu
add ice support ipv6 next protocol id test cases
---
tests/TestSuite_ice_fdir.py | 331 ++++++++++++++++++++++++++++++++++++
1 file changed, 331 insertions(+)
diff --git a/tests/TestSuite_ice_fdir.py b/tests/TestSuite_ice_fdir.py
index 26f32b29..a6e9c9c3 100644
--- a/tests/TestSuite_ice_fdir.py
+++ b/tests/TestSuite_ice_fdir.py
@@ -377,6 +377,83 @@ MAC_IPV6_NAT_T_ESP = {
],
}
+# 22.07 new feature
+MAC_IPV6_PROTOCOL = {
+ "match": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=123)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=123)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=123)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=123)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=123)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=123)/Raw('x'*40)",
+ ],
+ "unmatched": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=111)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=123)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/Raw('x'*40)",
+ ],
+}
+
+MAC_IPV6_PROTOCOL_TCP = {
+ "match": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=6)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=6)/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=6)/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=6)/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=6)/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=6)/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=6)/TCP()/Raw('x'*40)",
+ ],
+ "unmatched": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=17)/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=6)/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/TCP()/Raw('x'*40)",
+ ],
+}
+
+MAC_IPV6_PROTOCOL_UDP = {
+ "match": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=17)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=17)/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=17)/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=17)/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=17)/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=17)/UDP()/Raw('x'*40)",
+ ],
+ "unmatched": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=6)/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=6)/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/UDP()/Raw('x'*40)",
+ ],
+}
+
+MAC_IPV6_PROTOCOL_SCTP = {
+ "match": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=132)/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=132)/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=132)/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=132)/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=132)/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=132)/SCTP()/Raw('x'*40)",
+ ],
+ "unmatched": [
+ "Ether(dst='00:11:22:33:44:55')/IPv6(nh=6)/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/UDP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/TCP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrFragment(nh=6)/SCTP()/Raw('x'*40)",
+ "Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting()/IPv6ExtHdrRouting(nh=111)/SCTP()/Raw('x'*40)",
+ ],
+}
+
tv_mac_ipv4_pay_queue_index = {
"name": "test_mac_ipv4_pay_queue_index",
"rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / mark / end",
@@ -2682,6 +2759,235 @@ vectors_mac_ipv6_nat_t_esp = [
tv_mac_ipv6_nat_t_esp_mark,
]
+# 22.07 new feature
+tv_mac_ipv6_protocol_queue_index = {
+ "name": "test_mac_ipv6_protocol_queue_index",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions queue index 1 / mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": 1, "mark_id": 0},
+}
+
+tv_mac_ipv6_protocol_rss_queues = {
+ "name": "test_mac_ipv6_protocol_rss_queues",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions rss queues 2 3 end / mark id 1 / end",
+ "scapy_str": MAC_IPV6_PROTOCOL,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": [2, 3], "mark_id": 1},
+}
+
+tv_mac_ipv6_protocol_passthru = {
+ "name": "test_mac_ipv6_protocol_passthru",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions passthru / mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "rss": True, "mark_id": 0},
+}
+
+tv_mac_ipv6_protocol_drop = {
+ "name": "test_mac_ipv6_protocol_drop",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions drop / end",
+ "scapy_str": MAC_IPV6_PROTOCOL,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_mac_ipv6_protocol_mark_rss = {
+ "name": "test_mac_ipv6_protocol_mark_rss",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions mark / rss / end",
+ "scapy_str": MAC_IPV6_PROTOCOL,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_mac_ipv6_protocol_mark = {
+ "name": "test_mac_ipv6_protocol_mark",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_mac_ipv6_protocol = [
+ tv_mac_ipv6_protocol_queue_index,
+ tv_mac_ipv6_protocol_rss_queues,
+ tv_mac_ipv6_protocol_passthru,
+ tv_mac_ipv6_protocol_drop,
+ tv_mac_ipv6_protocol_mark_rss,
+ tv_mac_ipv6_protocol_mark,
+]
+
+tv_mac_ipv6_protocol_tcp_queue_index = {
+ "name": "test_mac_ipv6_protocol_tcp_queue_index",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions queue index 3 / mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_TCP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": 3, "mark_id": 0},
+}
+
+tv_mac_ipv6_protocol_tcp_rss_queues = {
+ "name": "test_mac_ipv6_protocol_tcp_rss_queues",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions rss queues 5 6 end / mark id 1 / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_TCP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": [5, 6], "mark_id": 1},
+}
+
+tv_mac_ipv6_protocol_tcp_passthru = {
+ "name": "test_mac_ipv6_protocol_tcp_passthru",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions passthru / mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_TCP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "rss": True, "mark_id": 0},
+}
+
+tv_mac_ipv6_protocol_tcp_drop = {
+ "name": "test_mac_ipv6_protocol_tcp_drop",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions drop / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_TCP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_mac_ipv6_protocol_tcp_mark_rss = {
+ "name": "test_mac_ipv6_protocol_tcp_mark_rss",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions mark / rss / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_TCP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_mac_ipv6_protocol_tcp_mark = {
+ "name": "test_mac_ipv6_protocol_tcp_mark",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 6 / tcp / end actions mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_TCP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_mac_ipv6_protocol_tcp = [
+ tv_mac_ipv6_protocol_tcp_queue_index,
+ tv_mac_ipv6_protocol_tcp_rss_queues,
+ tv_mac_ipv6_protocol_tcp_passthru,
+ tv_mac_ipv6_protocol_tcp_drop,
+ tv_mac_ipv6_protocol_tcp_mark_rss,
+ tv_mac_ipv6_protocol_tcp_mark,
+]
+
+tv_mac_ipv6_protocol_udp_queue_index = {
+ "name": "test_mac_ipv6_protocol_udp_queue_index",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions queue index 3 / mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_UDP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": 3, "mark_id": 0},
+}
+
+tv_mac_ipv6_protocol_udp_rss_queues = {
+ "name": "test_mac_ipv6_protocol_udp_rss_queues",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions rss queues 7 8 end / mark id 1 / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_UDP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": [7, 8], "mark_id": 1},
+}
+
+tv_mac_ipv6_protocol_udp_passthru = {
+ "name": "test_mac_ipv6_protocol_udp_passthru",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions passthru / mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_UDP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "rss": True, "mark_id": 0},
+}
+
+tv_mac_ipv6_protocol_udp_drop = {
+ "name": "test_mac_ipv6_protocol_udp_drop",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions drop / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_UDP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_mac_ipv6_protocol_udp_mark_rss = {
+ "name": "test_mac_ipv6_protocol_udp_mark_rss",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions mark / rss / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_UDP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_mac_ipv6_protocol_udp_mark = {
+ "name": "test_mac_ipv6_protocol_udp_mark",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_UDP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_mac_ipv6_protocol_udp = [
+ tv_mac_ipv6_protocol_udp_queue_index,
+ tv_mac_ipv6_protocol_udp_rss_queues,
+ tv_mac_ipv6_protocol_udp_passthru,
+ tv_mac_ipv6_protocol_udp_drop,
+ tv_mac_ipv6_protocol_udp_mark_rss,
+ tv_mac_ipv6_protocol_udp_mark,
+]
+
+tv_mac_ipv6_protocol_sctp_queue_index = {
+ "name": "test_mac_ipv6_protocol_sctp_queue_index",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 132 / sctp / end actions queue index 5 / mark id 3 / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_SCTP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": 5, "mark_id": 3},
+}
+
+tv_mac_ipv6_protocol_sctp_rss_queues = {
+ "name": "test_mac_ipv6_protocol_sctp_rss_queues",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 132 / sctp / end actions rss queues 1 2 end / mark id 1 / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_SCTP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "queue": [1, 2], "mark_id": 1},
+}
+
+tv_mac_ipv6_protocol_sctp_passthru = {
+ "name": "test_mac_ipv6_protocol_sctp_passthru",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 132 / sctp / end actions passthru / mark id 4 / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_SCTP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "rss": True, "mark_id": 4},
+}
+
+tv_mac_ipv6_protocol_sctp_drop = {
+ "name": "test_mac_ipv6_protocol_sctp_drop",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 132 / sctp / end actions drop / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_SCTP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_mac_ipv6_protocol_sctp_mark_rss = {
+ "name": "test_mac_ipv6_protocol_sctp_mark_rss",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 132 / sctp / end actions mark / rss / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_SCTP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_mac_ipv6_protocol_sctp_mark = {
+ "name": "test_mac_ipv6_protocol_sctp_mark",
+ "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 132 / sctp / end actions mark / end",
+ "scapy_str": MAC_IPV6_PROTOCOL_SCTP,
+ "check_func": rfc.check_mark,
+ "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_mac_ipv6_protocol_sctp = [
+ tv_mac_ipv6_protocol_sctp_queue_index,
+ tv_mac_ipv6_protocol_sctp_rss_queues,
+ tv_mac_ipv6_protocol_sctp_passthru,
+ tv_mac_ipv6_protocol_sctp_drop,
+ tv_mac_ipv6_protocol_sctp_mark_rss,
+ tv_mac_ipv6_protocol_sctp_mark,
+]
+
class TestICEFdir(TestCase):
def query_count(self, hits_set, hits, port_id=0, rule_id=0):
@@ -4169,6 +4475,31 @@ class TestICEFdir(TestCase):
)
self.check_fdir_rule(stats=True)
+ # 22.07 new feature
+ def test_ipv6_protocal(self):
+ self._rte_flow_validate(vectors_mac_ipv6_protocol)
+
+ def test_ipv6_protocal_tcp(self):
+ self._rte_flow_validate(vectors_mac_ipv6_protocol_tcp)
+
+ def test_ipv6_protocal_udp(self):
+ self._rte_flow_validate(vectors_mac_ipv6_protocol_udp)
+
+ def test_ipv6_protocal_sctp(self):
+ self._rte_flow_validate(vectors_mac_ipv6_protocol_sctp)
+
+ def test_mac_ipv6_protocol_exclusive(self):
+ rule = "flow create 0 priority 0 ingress pattern eth / ipv6 proto is 123 / end actions queue index 1 / mark / end"
+ self.create_fdir_rule(rule, check_stats=True)
+ self.pmd_output.execute_cmd("flow flush 0")
+ rule1 = "flow create 0 ingress pattern eth / ipv6 proto is 123 / end actions queue index 1 / mark / end"
+ rule2 = "flow create 0 ingress pattern eth / ipv6 proto is 123 / end actions rss queues 2 3 end / mark / end"
+ self.create_fdir_rule(rule1, check_stats=True)
+ out = self.pmd_output.execute_cmd(rule2)
+ self.verify(
+ "Rule already exists!: File exists" in out, "created rule successfully!!!"
+ )
+
def tear_down(self):
try:
# destroy all flow rule on port 0
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread