[V2,1/4] test_plans/cvl_fdir_test_plan:add esp flow test plan

Message ID 20210914181204.20088-2-zhiminx.huang@intel.com (mailing list archive)
State Changes Requested
Headers
Series enable esp flow |

Commit Message

Huang, ZhiminX Sept. 14, 2021, 6:12 p.m. UTC
  add 21.08 new feature testplan,this feature support esp flow to match outer ip header.
take ip src/dst and spi for inputset,add 4 new cases in cvl_fdir test plan.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 test_plans/cvl_fdir_test_plan.rst | 457 ++++++++++++++++++++++++++++++
 1 file changed, 457 insertions(+)
  

Comments

Lin, Xueqin Sept. 15, 2021, 3:27 a.m. UTC | #1
> -----Original Message-----
> From: Huang, ZhiminX <zhiminx.huang@intel.com>
> Sent: Wednesday, September 15, 2021 2:12 AM
> To: dts@dpdk.org
> Cc: Lin, Xueqin <xueqin.lin@intel.com>; Huang, ZhiminX
> <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V2 1/4] test_plans/cvl_fdir_test_plan:add esp flow test
> plan
> 
> add 21.08 new feature testplan,this feature support esp flow to match outer
> ip header.
> take ip src/dst and spi for inputset,add 4 new cases in cvl_fdir test plan.
> 
> Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Xueqin Lin <xueqin.lin@intel.com>
> ---
>  test_plans/cvl_fdir_test_plan.rst | 457 ++++++++++++++++++++++++++++++
>  1 file changed, 457 insertions(+)
> 
> diff --git a/test_plans/cvl_fdir_test_plan.rst
> b/test_plans/cvl_fdir_test_plan.rst
> index 9f4cae4a..2ee2154c 100644
> --- a/test_plans/cvl_fdir_test_plan.rst
> +++ b/test_plans/cvl_fdir_test_plan.rst
> @@ -87,6 +87,14 @@ Pattern and input set
>      +------------------------------+----------------------------+----------------------------------
> ---------------------------------------------+
>      | 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]
> |
> +    +------------------------------+----------------------------+---------------------------------
> ----------------------------------------------+
> 
>  .. note::
> 
> @@ -518,6 +526,55 @@ Send packets
> 
>      sendp([Ether(dst="00:11:22:33:44:55",type=0x88f7)/"\\x00\\x02"],
> iface="enp134s0f1")
> 
> +* MAC_IPV4_ESP
> +
> +   matched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.2
> 1",proto=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> +   mismatched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.22",dst="192.168.0.2
> 1",proto=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.1
> 1",proto=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.2
> 1",proto=50)/ESP(spi=17)/Raw('x'*480),iface="enp134s0f1")
> +
> +* MAC_IPV6_ESP
> +
> +   matched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::2",nh=5
> 0)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> +   mismatched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::8",dst="2001::2",nh=5
> 0)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::9",nh=5
> 0)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::2",nh=5
> 0)/ESP(spi=17)/Raw('x'*480),iface="enp134s0f1")
> +
> +* MAC_IPV4_NAT-T-ESP
> +
> +   matched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.2
> 1")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> +   mismatched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.22",dst="192.168.0.2
> 1")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.1
> 1")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.2
> 1")/UDP(dport=4500)/ESP(spi=77)/Raw('x'*480),iface="enp134s0f1")
> +
> +
> +* MAC_IPV6_NAT-T-ESP
> +
> +   matched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::2")/UDP(
> dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
> +
> +   mismatched packets::
> +
> +
> sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::8",dst="2001::2")/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::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")
> +
>  Test case: flow validation
>  ==========================
> 
> @@ -2924,6 +2981,406 @@ Subcase 7: unsupported Ethertype
> 
>     the number "2" stands for switch rule, fdir doesn't support IPV4/IPV6
> ethertype.
> 
> +Test case: MAC_IPV4_ESP pattern
> +==================================
> +
> +Subcase 1: MAC_IPV4_ESP queue index
> +--------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / esp spi is 7 / end actions queue index 13 / mark id 7 / end
> +
> +2. send matched packets, check the packets are distributed to queue 13
> with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 13 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 packets are not distributed to queue 13 without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 2: MAC_IPV4_ESP rss queues
> +-------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / esp spi is 7 / end actions rss queues 1 2 3 4 end / mark id 6 /
> end
> +
> +2. send matched packets, check the packets are distributed to queue 1 or 2
> or 3 or 4 with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 1 or 2 or 3 or 4 without FDIR matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4
> without FDIR matched ID.
> +   check there is no rule listed.
> +
> +Subcase 3: MAC_IPV4_ESP passthru
> +-----------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / esp spi is 7 / end actions passthru / mark id 1 / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 4: MAC_IPV4_ESP drop
> +-------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / esp spi is 7 / end actions drop / end
> +
> +2. send matched packets, check the packets are dropped
> +   send mismatched packets, check the packets are not dropped.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not dropped.
> +   check there is no rule listed.
> +
> +Subcase 5: MAC_IPV4_ESP mark+rss
> +-----------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / esp spi is 7 / end actions mark id 2 / rss / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 6: MAC_IPV4_ESP mark
> +-------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / esp spi is 7 / end actions mark id 15 / end
> +
> +2. send matched packets, check the packets are received with FDIR matched
> ID.
> +   send mismatched packets, check the packets are received without FDIR
> matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are received without FDIR matched ID.
> +   check there is no rule listed.
> +
> +Test case: MAC_IPV6_ESP pattern
> +==================================
> +
> +Subcase 1: MAC_IPV6_ESP queue index
> +--------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp
> spi is 7 / end actions queue index 13 / mark id 7 / end
> +
> +2. send matched packets, check the packets are distributed to queue 13
> with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 13 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 packets are not distributed to queue 13 without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 2: MAC_IPV6_ESP rss queues
> +-------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp
> spi is 7 / end actions rss queues 1 2 3 4 end / mark id 6 / end
> +
> +2. send matched packets, check the packets are distributed to queue 1 or 2
> or 3 or 4 with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 1 or 2 or 3 or 4 without FDIR matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4
> without FDIR matched ID.
> +   check there is no rule listed.
> +
> +Subcase 3: MAC_IPV6_ESP passthru
> +-----------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp
> spi is 7 / end actions passthru / mark id 1 / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID=0x0.
> +   check there is no rule listed.
> +
> +Subcase 4: MAC_IPV6_ESP drop
> +-------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp
> spi is 7 / end actions drop / end
> +
> +2. send matched packets, check the packets are dropped
> +   send mismatched packets, check the packets are not dropped.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not dropped.
> +   check there is no rule listed.
> +
> +Subcase 5: MAC_IPV6_ESP mark+rss
> +-----------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp
> spi is 7 / end actions mark id 2 / rss / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 6: MAC_IPV6_ESP mark
> +-------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp
> spi is 7 / end actions mark id 15 / end
> +
> +2. send matched packets, check the packets are received with FDIR matched
> ID.
> +   send mismatched packets, check the packets are received without FDIR
> matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are received without FDIR matched ID.
> +   check there is no rule listed.
> +
> +Test case: MAC_IPV4_NAT-T-ESP pattern
> +========================================
> +
> +Subcase 1: MAC_IPV4_NAT-T-ESP queue index
> +--------------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / udp / esp spi is 7 / end actions queue index 13 / mark id 7 /
> end
> +
> +2. send matched packets, check the packets are distributed to queue 13
> with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 13 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 packets are not distributed to queue 13 without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 2: MAC_IPV4_NAT-T-ESP rss queues
> +-------------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / udp / esp spi is 7 / end actions rss queues 1 2 3 4 end / mark
> id 6 / end
> +
> +2. send matched packets, check the packets are distributed to queue 1 or 2
> or 3 or 4 with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 1 or 2 or 3 or 4 without FDIR matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4
> without FDIR matched ID.
> +   check there is no rule listed.
> +
> +Subcase 3: MAC_IPV4_NAT-T-ESP passthru
> +-----------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / udp / esp spi is 7 / end actions passthru / mark id 1 / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 4: MAC_IPV4_NAT-T-ESP drop
> +-------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / udp / esp spi is 7 / end actions drop / end
> +
> +2. send matched packets, check the packets are dropped
> +   send mismatched packets, check the packets are not dropped.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not dropped.
> +   check there is no rule listed.
> +
> +Subcase 5: MAC_IPV4_NAT-T-ESP mark+rss
> +-----------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / udp / esp spi is 7 / end actions mark id 2 / rss / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 6: MAC_IPV4_NAT-T-ESP mark
> +-------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is
> 192.168.0.21 / udp / esp spi is 7 / end actions mark id 15 / end
> +
> +2. send matched packets, check the packets are received with FDIR matched
> ID.
> +   send mismatched packets, check the packets are received without FDIR
> matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are received without FDIR matched ID.
> +   check there is no rule listed.
> +
> +Test case: MAC_IPV6_NAT-T-ESP pattern
> +========================================
> +
> +Subcase 1: MAC_IPV6_NAT-T-ESP queue index
> +--------------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp /
> esp spi is 7 / end actions queue index 13 / mark id 7 / end
> +
> +2. send matched packets, check the packets are distributed to queue 13
> with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 13 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 packets are not distributed to queue 13 without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 2: MAC_IPV6_NAT-T-ESP rss queues
> +-------------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp /
> esp spi is 7 / end actions rss queues 1 2 3 4 end / mark id 6 / end
> +
> +2. send matched packets, check the packets are distributed to queue 1 or 2
> or 3 or 4 with FDIR matched ID.
> +   send mismatched packets, check the packets are not distributed to queue
> 1 or 2 or 3 or 4 without FDIR matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4
> without FDIR matched ID.
> +   check there is no rule listed.
> +
> +Subcase 3: MAC_IPV6_NAT-T-ESP passthru
> +-----------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp /
> esp spi is 7 / end actions passthru / mark id 1 / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 4: MAC_IPV6_NAT-T-ESP drop
> +-------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp /
> esp spi is 7 / end actions drop / end
> +
> +2. send matched packets, check the packets are dropped
> +   send mismatched packets, check the packets are not dropped.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are not dropped.
> +   check there is no rule listed.
> +
> +Subcase 5: MAC_IPV6_NAT-T-ESP mark+rss
> +-----------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp /
> esp spi is 7 / end actions mark id 2 / rss / end
> +
> +2. send matched packets, check the packets are distributed by RSS with FDIR
> matched ID.
> +   send mismatched 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 to the same queue without FDIR
> matched ID.
> +   check there is no rule listed.
> +
> +Subcase 6: MAC_IPV6_NAT-T-ESP mark
> +-------------------------------------
> +
> +1. create filter rules::
> +
> +    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp /
> esp spi is 7 / end actions mark id 15 / end
> +
> +2. send matched packets, check the packets are received with FDIR matched
> ID.
> +   send mismatched packets, check the packets are received without FDIR
> matched ID.
> +
> +3. repeat step 3 of subcase 1.
> +
> +4. verify matched packets are received without FDIR matched ID.
> +   check there is no rule listed.
> +
>  Test case: negative cases
>  =========================
>  Note: the error message may be changed.
> --
> 2.17.1
  

Patch

diff --git a/test_plans/cvl_fdir_test_plan.rst b/test_plans/cvl_fdir_test_plan.rst
index 9f4cae4a..2ee2154c 100644
--- a/test_plans/cvl_fdir_test_plan.rst
+++ b/test_plans/cvl_fdir_test_plan.rst
@@ -87,6 +87,14 @@  Pattern and input set
     +------------------------------+----------------------------+-------------------------------------------------------------------------------+
     | 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]                                                   |
+    +------------------------------+----------------------------+-------------------------------------------------------------------------------+
 
 .. note::
 
@@ -518,6 +526,55 @@  Send packets
 
     sendp([Ether(dst="00:11:22:33:44:55",type=0x88f7)/"\\x00\\x02"], iface="enp134s0f1")
 
+* MAC_IPV4_ESP
+
+   matched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.21",proto=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+
+   mismatched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.22",dst="192.168.0.21",proto=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.11",proto=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.21",proto=50)/ESP(spi=17)/Raw('x'*480),iface="enp134s0f1")
+
+* MAC_IPV6_ESP
+
+   matched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::2",nh=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+
+   mismatched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::8",dst="2001::2",nh=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+    sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::9",nh=50)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+    sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::2",nh=50)/ESP(spi=17)/Raw('x'*480),iface="enp134s0f1")
+
+* MAC_IPV4_NAT-T-ESP
+
+   matched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+
+   mismatched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.22",dst="192.168.0.21")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.11")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+    sendp(Ether(dst='00:11:22:33:44:55')/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(dport=4500)/ESP(spi=77)/Raw('x'*480),iface="enp134s0f1")
+
+
+* MAC_IPV6_NAT-T-ESP
+
+   matched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::1",dst="2001::2")/UDP(dport=4500)/ESP(spi=7)/Raw('x'*480),iface="enp134s0f1")
+
+   mismatched packets::
+
+    sendp(Ether(dst='00:11:22:33:44:55')/IPv6(src="2001::8",dst="2001::2")/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::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")
+
 Test case: flow validation
 ==========================
 
@@ -2924,6 +2981,406 @@  Subcase 7: unsupported Ethertype
 
    the number "2" stands for switch rule, fdir doesn't support IPV4/IPV6 ethertype.
 
+Test case: MAC_IPV4_ESP pattern
+==================================
+
+Subcase 1: MAC_IPV4_ESP queue index
+--------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions queue index 13 / mark id 7 / end
+
+2. send matched packets, check the packets are distributed to queue 13 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 13 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 packets are not distributed to queue 13 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 2: MAC_IPV4_ESP rss queues
+-------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions rss queues 1 2 3 4 end / mark id 6 / end
+
+2. send matched packets, check the packets are distributed to queue 1 or 2 or 3 or 4 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 3: MAC_IPV4_ESP passthru
+-----------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions passthru / mark id 1 / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 4: MAC_IPV4_ESP drop
+-------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions drop / end
+
+2. send matched packets, check the packets are dropped
+   send mismatched packets, check the packets are not dropped.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not dropped.
+   check there is no rule listed.
+
+Subcase 5: MAC_IPV4_ESP mark+rss
+-----------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions mark id 2 / rss / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 6: MAC_IPV4_ESP mark
+-------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions mark id 15 / end
+
+2. send matched packets, check the packets are received with FDIR matched ID.
+   send mismatched packets, check the packets are received without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are received without FDIR matched ID.
+   check there is no rule listed.
+
+Test case: MAC_IPV6_ESP pattern
+==================================
+
+Subcase 1: MAC_IPV6_ESP queue index
+--------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp spi is 7 / end actions queue index 13 / mark id 7 / end
+
+2. send matched packets, check the packets are distributed to queue 13 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 13 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 packets are not distributed to queue 13 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 2: MAC_IPV6_ESP rss queues
+-------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp spi is 7 / end actions rss queues 1 2 3 4 end / mark id 6 / end
+
+2. send matched packets, check the packets are distributed to queue 1 or 2 or 3 or 4 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 3: MAC_IPV6_ESP passthru
+-----------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp spi is 7 / end actions passthru / mark id 1 / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID=0x0.
+   check there is no rule listed.
+
+Subcase 4: MAC_IPV6_ESP drop
+-------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp spi is 7 / end actions drop / end
+
+2. send matched packets, check the packets are dropped
+   send mismatched packets, check the packets are not dropped.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not dropped.
+   check there is no rule listed.
+
+Subcase 5: MAC_IPV6_ESP mark+rss
+-----------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp spi is 7 / end actions mark id 2 / rss / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 6: MAC_IPV6_ESP mark
+-------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / esp spi is 7 / end actions mark id 15 / end
+
+2. send matched packets, check the packets are received with FDIR matched ID.
+   send mismatched packets, check the packets are received without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are received without FDIR matched ID.
+   check there is no rule listed.
+
+Test case: MAC_IPV4_NAT-T-ESP pattern
+========================================
+
+Subcase 1: MAC_IPV4_NAT-T-ESP queue index
+--------------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions queue index 13 / mark id 7 / end
+
+2. send matched packets, check the packets are distributed to queue 13 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 13 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 packets are not distributed to queue 13 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 2: MAC_IPV4_NAT-T-ESP rss queues
+-------------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions rss queues 1 2 3 4 end / mark id 6 / end
+
+2. send matched packets, check the packets are distributed to queue 1 or 2 or 3 or 4 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 3: MAC_IPV4_NAT-T-ESP passthru
+-----------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions passthru / mark id 1 / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 4: MAC_IPV4_NAT-T-ESP drop
+-------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions drop / end
+
+2. send matched packets, check the packets are dropped
+   send mismatched packets, check the packets are not dropped.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not dropped.
+   check there is no rule listed.
+
+Subcase 5: MAC_IPV4_NAT-T-ESP mark+rss
+-----------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions mark id 2 / rss / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 6: MAC_IPV4_NAT-T-ESP mark
+-------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions mark id 15 / end
+
+2. send matched packets, check the packets are received with FDIR matched ID.
+   send mismatched packets, check the packets are received without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are received without FDIR matched ID.
+   check there is no rule listed.
+
+Test case: MAC_IPV6_NAT-T-ESP pattern
+========================================
+
+Subcase 1: MAC_IPV6_NAT-T-ESP queue index
+--------------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp / esp spi is 7 / end actions queue index 13 / mark id 7 / end
+
+2. send matched packets, check the packets are distributed to queue 13 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 13 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 packets are not distributed to queue 13 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 2: MAC_IPV6_NAT-T-ESP rss queues
+-------------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp / esp spi is 7 / end actions rss queues 1 2 3 4 end / mark id 6 / end
+
+2. send matched packets, check the packets are distributed to queue 1 or 2 or 3 or 4 with FDIR matched ID.
+   send mismatched packets, check the packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not distributed to queue 1 or 2 or 3 or 4 without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 3: MAC_IPV6_NAT-T-ESP passthru
+-----------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp / esp spi is 7 / end actions passthru / mark id 1 / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 4: MAC_IPV6_NAT-T-ESP drop
+-------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp / esp spi is 7 / end actions drop / end
+
+2. send matched packets, check the packets are dropped
+   send mismatched packets, check the packets are not dropped.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are not dropped.
+   check there is no rule listed.
+
+Subcase 5: MAC_IPV6_NAT-T-ESP mark+rss
+-----------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp / esp spi is 7 / end actions mark id 2 / rss / end
+
+2. send matched packets, check the packets are distributed by RSS with FDIR matched ID.
+   send mismatched 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 to the same queue without FDIR matched ID.
+   check there is no rule listed.
+
+Subcase 6: MAC_IPV6_NAT-T-ESP mark
+-------------------------------------
+
+1. create filter rules::
+
+    flow create 0 ingress pattern eth / ipv6 src is 2001::1 dst is 2001::2 / udp / esp spi is 7 / end actions mark id 15 / end
+
+2. send matched packets, check the packets are received with FDIR matched ID.
+   send mismatched packets, check the packets are received without FDIR matched ID.
+
+3. repeat step 3 of subcase 1.
+
+4. verify matched packets are received without FDIR matched ID.
+   check there is no rule listed.
+
 Test case: negative cases
 =========================
 Note: the error message may be changed.