DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yahui Cao <yahui.cao@intel.com>
To: Qiming Yang <qiming.yang@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
	Yahui Cao <yahui.cao@intel.com>,
	Xiaolong Ye <xiaolong.ye@intel.com>,
	Ying A Wang <ying.a.wang@intel.com>,
	Simei Su <simei.su@intel.com>,
	Chenmin Sun <chenmin.sun@intel.com>
Subject: [dpdk-dev] [PATCH 1/2] net/ice: fix GTPU and GTPU extension header mix
Date: Wed, 20 Nov 2019 21:28:35 +0800	[thread overview]
Message-ID: <20191120132836.75142-2-yahui.cao@intel.com> (raw)
In-Reply-To: <20191120132836.75142-1-yahui.cao@intel.com>

GTP-U packet with extension header is GTP-U packet with GTP_PSC header
inserted between GTP-U header and inner payload.

Fixes: 3e4eab9c2192 ("net/ice: add pattern manifest")
Cc: ying.a.wang@intel.com

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 14 ++++++++++---
 drivers/net/ice/ice_generic_flow.h |  7 ++++---
 drivers/net/ice/ice_hash.c         | 32 +++++++++++++++---------------
 3 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 5594f8555..4f29dbaa0 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1035,6 +1035,14 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
 
 /* GTPU */
 enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
 	RTE_FLOW_ITEM_TYPE_UDP,
@@ -1043,7 +1051,7 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_IPV4,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_udp[] = {
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_udp[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
 	RTE_FLOW_ITEM_TYPE_UDP,
@@ -1053,7 +1061,7 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_udp[] = {
 	RTE_FLOW_ITEM_TYPE_UDP,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_tcp[] = {
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_tcp[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
 	RTE_FLOW_ITEM_TYPE_UDP,
@@ -1064,7 +1072,7 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_tcp[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_icmp[] = {
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_icmp[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
 	RTE_FLOW_ITEM_TYPE_UDP,
diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h
index b6e4ed0e1..ac085b47f 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -337,9 +337,10 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[];
 
 /* GTPU */
 extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
-extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_udp[];
-extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_tcp[];
-extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_icmp[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_udp[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_tcp[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_icmp[];
 
 /* PPPoE */
 extern enum rte_flow_item_type pattern_eth_pppoed[];
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 2e9c1bc67..b145a3f0d 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -120,22 +120,22 @@ static struct ice_pattern_match_item ice_hash_pattern_list_os[] = {
 
 /* Supported pattern for comms package. */
 static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
-	{pattern_eth_ipv4,		 ICE_INSET_NONE,  &hint_1},
-	{pattern_eth_ipv4_udp,		 ICE_INSET_NONE,  &hint_2},
-	{pattern_eth_ipv4_tcp,		 ICE_INSET_NONE,  &hint_3},
-	{pattern_eth_ipv4_sctp,		 ICE_INSET_NONE,  &hint_4},
-	{pattern_eth_ipv6,		 ICE_INSET_NONE,  &hint_5},
-	{pattern_eth_ipv6_udp,		 ICE_INSET_NONE,  &hint_6},
-	{pattern_eth_ipv6_tcp,		 ICE_INSET_NONE,  &hint_7},
-	{pattern_eth_ipv6_sctp,		 ICE_INSET_NONE,  &hint_8},
-	{pattern_empty,			 ICE_INSET_NONE,  &hint_0},
-	{pattern_eth_ipv4_gtpu_ipv4,	 ICE_INSET_NONE,  &hint_9},
-	{pattern_eth_ipv4_gtpu_ipv4_udp, ICE_INSET_NONE,  &hint_9},
-	{pattern_eth_ipv4_gtpu_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
-	{pattern_eth_pppoes_ipv4,	 ICE_INSET_NONE,  &hint_10},
-	{pattern_eth_pppoes_ipv4_udp,	 ICE_INSET_NONE,  &hint_11},
-	{pattern_eth_pppoes_ipv4_tcp,	 ICE_INSET_NONE,  &hint_12},
-	{pattern_eth_pppoes_ipv4_sctp,	 ICE_INSET_NONE,  &hint_13},
+	{pattern_eth_ipv4,		    ICE_INSET_NONE,  &hint_1},
+	{pattern_eth_ipv4_udp,		    ICE_INSET_NONE,  &hint_2},
+	{pattern_eth_ipv4_tcp,		    ICE_INSET_NONE,  &hint_3},
+	{pattern_eth_ipv4_sctp,		    ICE_INSET_NONE,  &hint_4},
+	{pattern_eth_ipv6,		    ICE_INSET_NONE,  &hint_5},
+	{pattern_eth_ipv6_udp,		    ICE_INSET_NONE,  &hint_6},
+	{pattern_eth_ipv6_tcp,		    ICE_INSET_NONE,  &hint_7},
+	{pattern_eth_ipv6_sctp,		    ICE_INSET_NONE,  &hint_8},
+	{pattern_empty,			    ICE_INSET_NONE,  &hint_0},
+	{pattern_eth_ipv4_gtpu_eh_ipv4,	    ICE_INSET_NONE,  &hint_9},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_9},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
+	{pattern_eth_pppoes_ipv4,	    ICE_INSET_NONE,  &hint_10},
+	{pattern_eth_pppoes_ipv4_udp,	    ICE_INSET_NONE,  &hint_11},
+	{pattern_eth_pppoes_ipv4_tcp,	    ICE_INSET_NONE,  &hint_12},
+	{pattern_eth_pppoes_ipv4_sctp,	    ICE_INSET_NONE,  &hint_13},
 };
 
 /**
-- 
2.17.1


  reply	other threads:[~2019-11-20  5:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 13:28 [dpdk-dev] [PATCH 0/2] fix FDIR support for non-extension-header GTPU Yahui Cao
2019-11-20 13:28 ` Yahui Cao [this message]
2019-11-20 13:28 ` [dpdk-dev] [PATCH 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao
2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao
2019-11-20 15:05   ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming Yahui Cao
2019-11-20  9:17     ` Zhang, Qi Z
2019-11-20 15:05   ` [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao
2019-11-20  9:18     ` Zhang, Qi Z
2019-11-21 11:20   ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao
2019-11-21  3:58     ` Zhang, Qi Z
2019-11-21  5:27     ` Ye Xiaolong
2019-11-21 11:20     ` [dpdk-dev] [PATCH v3 1/2] net/ice: fix pattern name of GTPU with extension header Yahui Cao
2019-11-21 11:20     ` [dpdk-dev] [PATCH v3 2/2] net/ice: add missing FDIR support for GTPU without " Yahui Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191120132836.75142-2-yahui.cao@intel.com \
    --to=yahui.cao@intel.com \
    --cc=chenmin.sun@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=simei.su@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiaolong.ye@intel.com \
    --cc=ying.a.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).