DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] net/ice: fix fdir GTP-U pattern
@ 2020-01-21  1:30 Qi Zhang
  2020-01-26  9:04 ` Ye Xiaolong
  0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2020-01-21  1:30 UTC (permalink / raw)
  To: yahui.cao, beilei.xing; +Cc: chenmin.sun, dev, Qi Zhang, stable

Base on current fdir implementation for GTP-U, inner specification is
not supported, issue a rule for eth/ipv4/gtpu/ipv4 will also match
eth/ipv4/gtpu/ipv6, the patch add new pattern list to align with exist
implementation.

Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---

v2:
- rename ICE_FDIR_INSET_GTPU_IPV4 to ICE_FDIR_INSET_GTPU
- rename ICE_FDIR_INSET_GTPU_EH_IPV4 to ICE_FDIR_INSET_GTPU_EH

 drivers/net/ice/ice_fdir_filter.c  |  9 ++++-----
 drivers/net/ice/ice_generic_flow.c | 15 +++++++++++++++
 drivers/net/ice/ice_generic_flow.h |  2 ++
 3 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 4c5ddfbdb..8a7212675 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -67,10 +67,10 @@
 	ICE_FDIR_INSET_VXLAN_IPV4 | \
 	ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
 
-#define ICE_FDIR_INSET_GTPU_IPV4 (\
+#define ICE_FDIR_INSET_GTPU (\
 	ICE_INSET_GTPU_TEID)
 
-#define ICE_FDIR_INSET_GTPU_EH_IPV4 (\
+#define ICE_FDIR_INSET_GTPU_EH (\
 	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
 
 static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
@@ -125,9 +125,8 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = {
 				       ICE_FDIR_INSET_VXLAN_IPV4_TCP,        ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_sctp,
 				       ICE_FDIR_INSET_VXLAN_IPV4_SCTP,       ICE_INSET_NONE},
-	{pattern_eth_ipv4_gtpu_ipv4,   ICE_FDIR_INSET_GTPU_IPV4,             ICE_INSET_NONE},
-	{pattern_eth_ipv4_gtpu_eh_ipv4,
-				       ICE_FDIR_INSET_GTPU_EH_IPV4,          ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu,	       ICE_FDIR_INSET_GTPU,                  ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_GTPU_EH,               ICE_INSET_NONE},
 };
 
 static struct ice_flow_parser ice_fdir_parser_os;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index c9efa8356..38ac799d8 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1034,6 +1034,13 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
 };
 
 /* GTPU */
+enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
 enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1042,6 +1049,14 @@ 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_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
+	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,
diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h
index ac085b47f..adc30ee2a 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -336,7 +336,9 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_sctp[];
 extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[];
 
 /* GTPU */
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu[];
 extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[];
 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[];
-- 
2.13.6


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

* Re: [dpdk-dev] [PATCH v2] net/ice: fix fdir GTP-U pattern
  2020-01-21  1:30 [dpdk-dev] [PATCH v2] net/ice: fix fdir GTP-U pattern Qi Zhang
@ 2020-01-26  9:04 ` Ye Xiaolong
  0 siblings, 0 replies; 2+ messages in thread
From: Ye Xiaolong @ 2020-01-26  9:04 UTC (permalink / raw)
  To: Qi Zhang; +Cc: yahui.cao, beilei.xing, chenmin.sun, dev, stable

On 01/21, Qi Zhang wrote:
>Base on current fdir implementation for GTP-U, inner specification is
>not supported, issue a rule for eth/ipv4/gtpu/ipv4 will also match
>eth/ipv4/gtpu/ipv6, the patch add new pattern list to align with exist
>implementation.
>
>Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
>Cc: stable@dpdk.org
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>---
>
>v2:
>- rename ICE_FDIR_INSET_GTPU_IPV4 to ICE_FDIR_INSET_GTPU
>- rename ICE_FDIR_INSET_GTPU_EH_IPV4 to ICE_FDIR_INSET_GTPU_EH
>
> drivers/net/ice/ice_fdir_filter.c  |  9 ++++-----
> drivers/net/ice/ice_generic_flow.c | 15 +++++++++++++++
> drivers/net/ice/ice_generic_flow.h |  2 ++
> 3 files changed, 21 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
>index 4c5ddfbdb..8a7212675 100644
>--- a/drivers/net/ice/ice_fdir_filter.c
>+++ b/drivers/net/ice/ice_fdir_filter.c
>@@ -67,10 +67,10 @@
> 	ICE_FDIR_INSET_VXLAN_IPV4 | \
> 	ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
> 
>-#define ICE_FDIR_INSET_GTPU_IPV4 (\
>+#define ICE_FDIR_INSET_GTPU (\
> 	ICE_INSET_GTPU_TEID)
> 
>-#define ICE_FDIR_INSET_GTPU_EH_IPV4 (\
>+#define ICE_FDIR_INSET_GTPU_EH (\
> 	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
> 
> static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
>@@ -125,9 +125,8 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = {
> 				       ICE_FDIR_INSET_VXLAN_IPV4_TCP,        ICE_INSET_NONE},
> 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_sctp,
> 				       ICE_FDIR_INSET_VXLAN_IPV4_SCTP,       ICE_INSET_NONE},
>-	{pattern_eth_ipv4_gtpu_ipv4,   ICE_FDIR_INSET_GTPU_IPV4,             ICE_INSET_NONE},
>-	{pattern_eth_ipv4_gtpu_eh_ipv4,
>-				       ICE_FDIR_INSET_GTPU_EH_IPV4,          ICE_INSET_NONE},
>+	{pattern_eth_ipv4_gtpu,	       ICE_FDIR_INSET_GTPU,                  ICE_INSET_NONE},
>+	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_GTPU_EH,               ICE_INSET_NONE},
> };
> 
> static struct ice_flow_parser ice_fdir_parser_os;
>diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
>index c9efa8356..38ac799d8 100644
>--- a/drivers/net/ice/ice_generic_flow.c
>+++ b/drivers/net/ice/ice_generic_flow.c
>@@ -1034,6 +1034,13 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
> };
> 
> /* GTPU */
>+enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
>+	RTE_FLOW_ITEM_TYPE_ETH,
>+	RTE_FLOW_ITEM_TYPE_IPV4,
>+	RTE_FLOW_ITEM_TYPE_UDP,
>+	RTE_FLOW_ITEM_TYPE_GTPU,
>+	RTE_FLOW_ITEM_TYPE_END,
>+};
> enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
> 	RTE_FLOW_ITEM_TYPE_ETH,
> 	RTE_FLOW_ITEM_TYPE_IPV4,
>@@ -1042,6 +1049,14 @@ 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_eh[] = {
>+	RTE_FLOW_ITEM_TYPE_ETH,
>+	RTE_FLOW_ITEM_TYPE_IPV4,
>+	RTE_FLOW_ITEM_TYPE_UDP,
>+	RTE_FLOW_ITEM_TYPE_GTPU,
>+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
>+	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,
>diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h
>index ac085b47f..adc30ee2a 100644
>--- a/drivers/net/ice/ice_generic_flow.h
>+++ b/drivers/net/ice/ice_generic_flow.h
>@@ -336,7 +336,9 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_sctp[];
> extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[];
> 
> /* GTPU */
>+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu[];
> extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
>+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[];
> 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[];
>-- 
>2.13.6
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel, Thanks.

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

end of thread, other threads:[~2020-01-26  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21  1:30 [dpdk-dev] [PATCH v2] net/ice: fix fdir GTP-U pattern Qi Zhang
2020-01-26  9:04 ` Ye Xiaolong

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git