test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH v3 0/2] add new test plans and test cases
@ 2022-09-22  5:28 hailinx xu
  2022-09-22  5:28 ` [dts][PATCH v3 1/2] test_plans: support ipv6 next proto id hailinx xu
  2022-09-22  5:28 ` [dts][PATCH v3 2/2] tests/ice_fdir: " hailinx xu
  0 siblings, 2 replies; 5+ messages in thread
From: hailinx xu @ 2022-09-22  5:28 UTC (permalink / raw)
  To: dts, qi.fu; +Cc: hailinx xu

v1: add new test plans/cases for ice support ipv6 next protocol id
v2:
    1. Modify case name.
    2. update Pattern table.
    3. Refine test plans steps.
v3: Fix patch apply issue.

hailinx xu (2):
  test_plans: support ipv6 next proto id
  tests/ice_fdir: support ipv6 next proto id

 test_plans/ice_fdir_test_plan.rst | 418 ++++++++++++++++++++++++++----
 tests/TestSuite_ice_fdir.py       | 336 ++++++++++++++++++++++++
 2 files changed, 701 insertions(+), 53 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts][PATCH v3 1/2] test_plans: support ipv6 next proto id
  2022-09-22  5:28 [dts][PATCH v3 0/2] add new test plans and test cases hailinx xu
@ 2022-09-22  5:28 ` hailinx xu
  2022-09-28  5:46   ` lijuan.tu
  2022-09-22  5:28 ` [dts][PATCH v3 2/2] tests/ice_fdir: " hailinx xu
  1 sibling, 1 reply; 5+ messages in thread
From: hailinx xu @ 2022-09-22  5:28 UTC (permalink / raw)
  To: dts, qi.fu; +Cc: hailinx xu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=N, Size: 31780 bytes --]

add new test cases for ice support ipv6 next protocol id

Signed-off-by: hailinx xu <hailinx.xu@intel.com>
---
 test_plans/ice_fdir_test_plan.rst | 418 ++++++++++++++++++++++++++----
 1 file changed, 365 insertions(+), 53 deletions(-)

diff --git a/test_plans/ice_fdir_test_plan.rst b/test_plans/ice_fdir_test_plan.rst
index 1bb11ae1..a3cc1d46 100644
--- a/test_plans/ice_fdir_test_plan.rst
+++ b/test_plans/ice_fdir_test_plan.rst
@@ -9,63 +9,72 @@ Enable fdir filter for IPv4/IPv6 + TCP/UDP/SCTP  (OS default package)
 Enable fdir filter for UDP tunnel: Vxlan / NVGRE (OS default package)
 Enable fdir filter for GTP (comm #1 package)
 Enable fdir filter for L2 Ethertype (comm #1 package)
+Enable fdir filter for IPv6 Next Protocol ID(comm #1 package)
 
 Pattern and input set
 ---------------------
 
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |    Packet Type               |        Pattern             |            Input Set                                                          |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    | IPv4/IPv6 + TCP/UDP/SCTP     |      MAC_IPV4_PAY          | [Dest MAC],[Source IP], [Dest IP], [IP protocol], [TTL], [DSCP]              |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV4_UDP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [DSCP], [Source Port], [Dest Port] |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV4_TCP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [DSCP], [Source Port], [Dest Port] |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV4_SCTP         | [Dest MAC],[Source IP], [Dest IP], [TTL], [DSCP], [Source Port], [Dest Port] |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV6_PAY          | [Dest MAC],[Source IP], [Dest IP], [IP protocol], [TTL], [TC]                |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV6_UDP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [TC], [Source Port], [Dest Port]   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV6_TCP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [TC], [Source Port], [Dest Port]   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV6_SCTP         | [Dest MAC],[Source IP], [Dest IP], [TTL], [TC], [Source Port], [Dest Port]   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    | UDP tunnel: VXLAN inner only | MAC_IPV4_TUN_IPV4_PAY      | [Inner Source IP], [Inner Dest IP]                                            |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_TUN_IPV4_UDP      | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_TUN_IPV4_TCP      | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_TUN_IPV4_SCTP     | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_TUN_MAC_IPV4_PAY  | [Inner Source IP], [Inner Dest IP]                                            |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_TUN_MAC_IPV4_UDP  | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_TUN_MAC_IPV4_TCP  | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_TUN_MAC_IPV4_SCTP | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    | IPv4/IPv6 + GTP-U            | MAC_IPV4_GTPU              | [Source IP], [Dest IP], [TEID]                                                |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV4_GTPU_EH           | [Source IP], [Dest IP], [TEID], [QFI]                                         |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV6_GTPU              | [Source IPV6], [Dest IPV6], [TEID]                                            |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              | MAC_IPV6_GTPU_EH           | [Source IPV6], [Dest IPV6], [TEID], [QFI]                                     |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    | L2 Ethertype                 |      L2 Ethertype          | [Ethertype]                                                                   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    | ESP                          |      MAC_IPV4_ESP          | [Source IP] [Dest IP] [SPI]                                                   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |      MAC_IPV6_ESP          | [Source IP] [Dest IP] [SPI]                                                   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |     MAC_IPV4_NAT-T-ESP     | [Source IP] [Dest IP] [SPI]                                                   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
-    |                              |     MAC_IPV6_NAT-T-ESP     | [Source IP] [Dest IP] [SPI]                                                   |
-    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |    Packet Type                   |        Pattern             |            Input Set                                                          |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    | IPv4/IPv6 + TCP/UDP/SCTP         |      MAC_IPV4_PAY          | [Dest MAC],[Source IP], [Dest IP], [IP protocol], [TTL], [DSCP]              |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV4_UDP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [DSCP], [Source Port], [Dest Port] |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV4_TCP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [DSCP], [Source Port], [Dest Port] |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV4_SCTP         | [Dest MAC],[Source IP], [Dest IP], [TTL], [DSCP], [Source Port], [Dest Port] |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV6_PAY          | [Dest MAC],[Source IP], [Dest IP], [IP protocol], [TTL], [TC]                |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV6_UDP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [TC], [Source Port], [Dest Port]   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV6_TCP          | [Dest MAC],[Source IP], [Dest IP], [TTL], [TC], [Source Port], [Dest Port]   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV6_SCTP         | [Dest MAC],[Source IP], [Dest IP], [TTL], [TC], [Source Port], [Dest Port]   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    | UDP tunnel: VXLAN inner only     | MAC_IPV4_TUN_IPV4_PAY      | [Inner Source IP], [Inner Dest IP]                                            |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_TUN_IPV4_UDP      | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_TUN_IPV4_TCP      | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_TUN_IPV4_SCTP     | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_TUN_MAC_IPV4_PAY  | [Inner Source IP], [Inner Dest IP]                                            |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_TUN_MAC_IPV4_UDP  | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_TUN_MAC_IPV4_TCP  | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_TUN_MAC_IPV4_SCTP | [Inner Source IP], [Inner Dest IP], [Inner Source Port], [Inner Dest Port]    |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    | IPv4/IPv6 + GTP-U                | MAC_IPV4_GTPU              | [Source IP], [Dest IP], [TEID]                                                |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV4_GTPU_EH           | [Source IP], [Dest IP], [TEID], [QFI]                                         |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV6_GTPU              | [Source IPV6], [Dest IPV6], [TEID]                                            |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | MAC_IPV6_GTPU_EH           | [Source IPV6], [Dest IPV6], [TEID], [QFI]                                     |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    | L2 Ethertype                     |      L2 Ethertype          | [Ethertype]                                                                   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    | ESP                              |      MAC_IPV4_ESP          | [Source IP] [Dest IP] [SPI]                                                   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |      MAC_IPV6_ESP          | [Source IP] [Dest IP] [SPI]                                                   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |     MAC_IPV4_NAT-T-ESP     | [Source IP] [Dest IP] [SPI]                                                   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  |     MAC_IPV6_NAT-T-ESP     | [Source IP] [Dest IP] [SPI]                                                   |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    | IPv6 Next Protocol + TCP/UDP/SCTP| IPV6_NEXT_PROTO            | [IPv6ExtHdrtype]                                                              |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | IPV6_NEXT_PROTO_TCP        | [IPv6ExtHdrtype]                                                              |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | IPV6_NEXT_PROTO_UDP        | [IPv6ExtHdrtype]                                                              |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
+    |                                  | IPV6_NEXT_PROTO_SCTP       | [IPv6ExtHdrtype]                                                              |
+    +----------------------------------+----------------------------+-------------------------------------------------------------------------------+
 
 .. note::
 
@@ -173,6 +182,10 @@ Default parameters
 
     [Ethertype]: 0x8863 0x8864 0x0806 0x8100 0x88f7
 
+   IPv6 ExtHdrtype::
+
+    [IPv6ExtHdrtype]: IPv6ExtHdrDestOpt IPv6ExtHdrRouting IPv6ExtHdrHopByHop IPv6ExtHdrSegmentRouting
+
 Send packets
 ------------
 
@@ -542,6 +555,86 @@ Send packets
     sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::9")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
     sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::2")/UDP(dport=4500)/ESP(spi=77)/Raw('x'*480),iface="enp134s0f1")
 
+* IPV6_NEXT_PROTO
+
+   matched 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")
+
+   mismatched 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")
+
+* IPV6_NEXT_PROTO_UDP
+
+   matched packets::
+
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=17)/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=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt()/IPv6ExtHdrDestOpt(nh=17)/UDP()/Raw('x'*40)],iface="ens192f0")
+
+   mismatched 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")
+
+* IPV6_NEXT_PROTO_TCP
+
+   matched 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")
+
+   mismatched 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")
+
+* IPV6_NEXT_PROTO_SCTP
+
+   matched packets::
+
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6(nh=132)/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()/IPv6ExtHdrDestOpt(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrRouting(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrHopByHop(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrSegmentRouting(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+    sendp([Ether(dst='00:11:22:33:44:55')/IPv6()/IPv6ExtHdrDestOpt(nh=123)/IPv6ExtHdrDestOpt(nh=132)/SCTP()/Raw('x'*40)],iface="ens192f0")
+
+   mismatched 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")
+
 Test case: flow validation
 ==========================
 
@@ -4203,3 +4296,222 @@ 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_NEXT_PROTO pattern
+==================================
+
+Subcase 1: IPV6_NEXT_PROTO queue index
+--------------------------------------
+
+1. create filter rules::
+
+    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
+
+2. send matched packets, check the packets is distributed to queue 1 with FDIR matched ID=0x0.
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. verify rules can be listed and destroyed::
+
+    testpmd> flow list 0
+
+   check the rule listed.
+   destroy the rule::
+
+    testpmd> flow destroy 0 rule 0
+
+4. verify matched packet is distributed by RSS without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 2: IPV6_NEXT_PROTO rss queues
+-------------------------------------
+
+1. create filter rules::
+
+    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
+
+2. send matched packets, check the packets is distributed to queue 56-63 with FDIR matched ID=0x0.
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packet is distributed by RSS without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 3: IPV6_NEXT_PROTO passthru
+-----------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions passthru / mark / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0.
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are destributed by RSS without FDIR matched ID .
+   check there is no rule listed.
+
+Subcase 4: IPV6_NEXT_PROTO drop
+-------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions drop / end
+
+2. send matched packets, check the packets are dropped.
+   send unmatched packets, check the packets are not dropped.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packet is dropped.
+   check there is no rule listed.
+
+Subcase 5: IPV6_NEXT_PROTO mark+rss
+-----------------------------------
+Note: This combined action is mark with RSS which is without queues specified.
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions mark / rss / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are distributed by RSS without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 6: IPV6_NEXT_PROTO mark
+-------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 123 / end actions mark / end
+
+2. repeat the steps of passthru in subcase 3,
+   get the same result.
+
+
+Test_Case: IPV6_NEXT_PROTO_UDP pattern
+======================================
+
+1. create filter rules::
+
+    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
+
+2. send matched packets, check the packets is distributed to queue 1 with FDIR matched ID=0x0.
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. verify rules can be listed and destroyed::
+
+    testpmd> flow list 0
+
+   check the rule listed.
+   destroy the rule::
+
+    testpmd> flow destroy 0 rule 0
+
+4. verify matched packet is distributed by RSS without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 2: IPV6_NEXT_PROTO_UDP rss queues
+-----------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions rss queues 5 6 end / mark id 1 / end
+
+2. send matched packets, check the packets is distributed to queue 56-63 with FDIR matched ID=0x0.
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packet is distributed by RSS without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 3: IPV6_NEXT_PROTO_UDP passthru
+---------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions passthru / mark / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0.
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are destributed by RSS without FDIR matched ID .
+   check there is no rule listed.
+
+Subcase 4: IPV6_NEXT_PROTO_UDP drop
+-----------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions drop / end
+
+2. send matched packets, check the packets are dropped.
+   send unmatched packets, check the packets are not dropped.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packet is dropped.
+   check there is no rule listed.
+
+Subcase 5: IPV6_NEXT_PROTO_UDP mark+rss
+---------------------------------------
+Note: This combined action is mark with RSS which is without queues specified.
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions mark / rss / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0
+   send unmatched packets, check the packets are distributed by RSS without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are distributed by RSS without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 6: IPV6_NEXT_PROTO_UDP mark
+-----------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 proto is 17 / udp / end actions mark / end
+
+2. repeat the steps of passthru in subcase 3,
+   get the same result.
+
+
+Test_Case: IPV6_NEXT_PROTO_TCP pattern
+======================================
+
+1. replace "udp" with "tcp", replace "proto is 17" with "proto is 6" in all the subcases of IPV6_NEXT_PROTO_UDP pattern.
+2. Then repeat all the steps in all the subcases of IPV6_NEXT_PROTO_UDP pattern.
+3. get the same result.
+
+
+Test_Case: IPV6_NEXT_PROTO_SCTP pattern
+=======================================
+
+1. replace "udp" with "sctp", replace "proto is 17" with "proto is 132" in all the subcases of IPV6_NEXT_PROTO_UDP pattern.
+2. Then repeat all the steps in all the subcases of IPV6_NEXT_PROTO_UDP pattern.
+3. get the same result.
+
+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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts][PATCH v3 2/2] tests/ice_fdir: support ipv6 next proto id
  2022-09-22  5:28 [dts][PATCH v3 0/2] add new test plans and test cases hailinx xu
  2022-09-22  5:28 ` [dts][PATCH v3 1/2] test_plans: support ipv6 next proto id hailinx xu
@ 2022-09-22  5:28 ` hailinx xu
  2022-09-22  8:50   ` Huang, ZhiminX
  1 sibling, 1 reply; 5+ messages in thread
From: hailinx xu @ 2022-09-22  5:28 UTC (permalink / raw)
  To: dts, qi.fu; +Cc: hailinx xu

add new test cases for ice support ipv6 next proto id

Signed-off-by: hailinx xu <hailinx.xu@intel.com>
---
 tests/TestSuite_ice_fdir.py | 336 ++++++++++++++++++++++++++++++++++++
 1 file changed, 336 insertions(+)

diff --git a/tests/TestSuite_ice_fdir.py b/tests/TestSuite_ice_fdir.py
index 26f32b29..fac65fda 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
+IPV6_NEXT_PROTO = {
+    "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)",
+    ],
+}
+
+IPV6_NEXT_PROTO_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)",
+    ],
+}
+
+IPV6_NEXT_PROTO_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)",
+    ],
+}
+
+IPV6_NEXT_PROTO_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_ipv6_next_proto_queue_index = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": 1, "mark_id": 0},
+}
+
+tv_ipv6_next_proto_rss_queues = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": [2, 3], "mark_id": 1},
+}
+
+tv_ipv6_next_proto_passthru = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "rss": True, "mark_id": 0},
+}
+
+tv_ipv6_next_proto_drop = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_ipv6_next_proto_mark_rss = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_ipv6_next_proto_mark = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_ipv6_next_proto = [
+    tv_ipv6_next_proto_queue_index,
+    tv_ipv6_next_proto_rss_queues,
+    tv_ipv6_next_proto_passthru,
+    tv_ipv6_next_proto_drop,
+    tv_ipv6_next_proto_mark_rss,
+    tv_ipv6_next_proto_mark,
+]
+
+tv_ipv6_next_proto_tcp_queue_index = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_TCP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": 3, "mark_id": 0},
+}
+
+tv_ipv6_next_proto_tcp_rss_queues = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_TCP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": [5, 6], "mark_id": 1},
+}
+
+tv_ipv6_next_proto_tcp_passthru = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_TCP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "rss": True, "mark_id": 0},
+}
+
+tv_ipv6_next_proto_tcp_drop = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_TCP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_ipv6_next_proto_tcp_mark_rss = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_TCP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_ipv6_next_proto_tcp_mark = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_TCP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_ipv6_next_proto_tcp = [
+    tv_ipv6_next_proto_tcp_queue_index,
+    tv_ipv6_next_proto_tcp_rss_queues,
+    tv_ipv6_next_proto_tcp_passthru,
+    tv_ipv6_next_proto_tcp_drop,
+    tv_ipv6_next_proto_tcp_mark_rss,
+    tv_ipv6_next_proto_tcp_mark,
+]
+
+tv_ipv6_next_proto_udp_queue_index = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_UDP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": 3, "mark_id": 0},
+}
+
+tv_ipv6_next_proto_udp_rss_queues = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_UDP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": [7, 8], "mark_id": 1},
+}
+
+tv_ipv6_next_proto_udp_passthru = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_UDP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "rss": True, "mark_id": 0},
+}
+
+tv_ipv6_next_proto_udp_drop = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_UDP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_ipv6_next_proto_udp_mark_rss = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_UDP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_ipv6_next_proto_udp_mark = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_UDP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_ipv6_next_proto_udp = [
+    tv_ipv6_next_proto_udp_queue_index,
+    tv_ipv6_next_proto_udp_rss_queues,
+    tv_ipv6_next_proto_udp_passthru,
+    tv_ipv6_next_proto_udp_drop,
+    tv_ipv6_next_proto_udp_mark_rss,
+    tv_ipv6_next_proto_udp_mark,
+]
+
+tv_ipv6_next_proto_sctp_queue_index = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_SCTP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": 5, "mark_id": 3},
+}
+
+tv_ipv6_next_proto_sctp_rss_queues = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_SCTP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "queue": [1, 2], "mark_id": 1},
+}
+
+tv_ipv6_next_proto_sctp_passthru = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_SCTP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "rss": True, "mark_id": 4},
+}
+
+tv_ipv6_next_proto_sctp_drop = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_SCTP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "drop": True},
+}
+
+tv_ipv6_next_proto_sctp_mark_rss = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_SCTP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+tv_ipv6_next_proto_sctp_mark = {
+    "name": "tv_ipv6_next_proto_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": IPV6_NEXT_PROTO_SCTP,
+    "check_func": rfc.check_mark,
+    "check_param": {"port_id": 0, "mark_id": 0, "rss": True},
+}
+
+vectors_ipv6_next_proto_sctp = [
+    tv_ipv6_next_proto_sctp_queue_index,
+    tv_ipv6_next_proto_sctp_rss_queues,
+    tv_ipv6_next_proto_sctp_passthru,
+    tv_ipv6_next_proto_sctp_drop,
+    tv_ipv6_next_proto_sctp_mark_rss,
+    tv_ipv6_next_proto_sctp_mark,
+]
+
 
 class TestICEFdir(TestCase):
     def query_count(self, hits_set, hits, port_id=0, rule_id=0):
@@ -4169,6 +4475,36 @@ class TestICEFdir(TestCase):
         )
         self.check_fdir_rule(stats=True)
 
+    # 22.07 new feature
+    @skip_unsupported_pkg(["os default", "wireless"])
+    def test_ipv6_next_proto(self):
+        self._rte_flow_validate(vectors_ipv6_next_proto)
+
+    @skip_unsupported_pkg(["os default", "wireless"])
+    def test_ipv6_next_proto_tcp(self):
+        self._rte_flow_validate(vectors_ipv6_next_proto_tcp)
+
+    @skip_unsupported_pkg(["os default", "wireless"])
+    def test_ipv6_next_proto_udp(self):
+        self._rte_flow_validate(vectors_ipv6_next_proto_udp)
+
+    @skip_unsupported_pkg(["os default", "wireless"])
+    def test_ipv6_next_proto_sctp(self):
+        self._rte_flow_validate(vectors_ipv6_next_proto_sctp)
+
+    @skip_unsupported_pkg(["os default", "wireless"])
+    def test_ipv6_next_proto_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

* RE: [dts][PATCH v3 2/2] tests/ice_fdir: support ipv6 next proto id
  2022-09-22  5:28 ` [dts][PATCH v3 2/2] tests/ice_fdir: " hailinx xu
@ 2022-09-22  8:50   ` Huang, ZhiminX
  0 siblings, 0 replies; 5+ messages in thread
From: Huang, ZhiminX @ 2022-09-22  8:50 UTC (permalink / raw)
  To: Xu, HailinX, dts, Fu,  Qi; +Cc: Xu, HailinX

> -----Original Message-----
> From: hailinx xu <hailinx.xu@intel.com>
> Sent: Thursday, September 22, 2022 1:29 PM
> To: dts@dpdk.org; Fu, Qi <qi.fu@intel.com>
> Cc: Xu, HailinX <hailinx.xu@intel.com>
> Subject: [dts][PATCH v3 2/2] tests/ice_fdir: support ipv6 next proto id
> 
> add new test cases for ice support ipv6 next proto id
> 
> Signed-off-by: hailinx xu <hailinx.xu@intel.com>
> ---
Tested-by: Zhimin Huang <zhiminx.huang@intel.com >



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dts][PATCH v3 1/2] test_plans: support ipv6 next proto id
  2022-09-22  5:28 ` [dts][PATCH v3 1/2] test_plans: support ipv6 next proto id hailinx xu
@ 2022-09-28  5:46   ` lijuan.tu
  0 siblings, 0 replies; 5+ messages in thread
From: lijuan.tu @ 2022-09-28  5:46 UTC (permalink / raw)
  To: dts, qi.fu, hailinx xu; +Cc: hailinx xu

On Thu, 22 Sep 2022 13:28:38 +0800, hailinx xu <hailinx.xu@intel.com> wrote:
> add new test cases for ice support ipv6 next protocol id
> 
> Signed-off-by: hailinx xu <hailinx.xu@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Series applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-28  5:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22  5:28 [dts][PATCH v3 0/2] add new test plans and test cases hailinx xu
2022-09-22  5:28 ` [dts][PATCH v3 1/2] test_plans: support ipv6 next proto id hailinx xu
2022-09-28  5:46   ` lijuan.tu
2022-09-22  5:28 ` [dts][PATCH v3 2/2] tests/ice_fdir: " hailinx xu
2022-09-22  8:50   ` Huang, ZhiminX

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).