DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF
@ 2020-06-12  8:13 Junfeng Guo
  2020-06-12  8:13 ` [dpdk-dev] [PATCH 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-12  8:13 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

[PATCH 1/2] add FD support for GTPU with outer IP on PF
[PATCH 2/2] add FD support for GTPU with outer IP on VF

*** BLURB HERE ***

Junfeng Guo (2):
  net/ice: add FD support for GTPU with outer IP
  net/iavf: add FD support for GTPU with outer IP

 drivers/net/iavf/iavf_fdir.c         | 22 +++++++++---
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 +++++--
 drivers/net/ice/ice_fdir_filter.c    | 54 ++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c   | 31 +++++++++++++---
 drivers/net/ice/ice_generic_flow.h   | 12 +++++--
 6 files changed, 133 insertions(+), 20 deletions(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH 1/2] net/ice: add FD support for GTPU with outer IP
  2020-06-12  8:13 [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
@ 2020-06-12  8:13 ` Junfeng Guo
  2020-06-12  8:13 ` [dpdk-dev] [PATCH 2/2] net/iavf: " Junfeng Guo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-12  8:13 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching. Note that outer IP matching fields here
includes both SRC & DST of both IPv4 & IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c  | 54 ++++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c | 31 ++++++++++++++---
 drivers/net/ice/ice_generic_flow.h | 12 +++++--
 3 files changed, 84 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index c3f23a019..4793b81c5 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -67,13 +67,20 @@
 	ICE_FDIR_INSET_VXLAN_IPV4 | \
 	ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
 
-#define ICE_FDIR_INSET_GTPU (\
+#define ICE_FDIR_INSET_IPV4_GTPU (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID)
 
-#define ICE_FDIR_INSET_GTPU_EH (\
+#define ICE_FDIR_INSET_IPV4_GTPU_EH (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
 	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
 
+#define ICE_FDIR_INSET_IPV6_GTPU (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | ICE_INSET_GTPU_TEID)
+
+#define ICE_FDIR_INSET_IPV6_GTPU_EH (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | \
+	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
+
 static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
 	{pattern_eth_ipv4,             ICE_FDIR_INSET_ETH_IPV4,              ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp,         ICE_FDIR_INSET_ETH_IPV4_UDP,          ICE_INSET_NONE},
@@ -126,8 +133,11 @@ 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,	       ICE_FDIR_INSET_GTPU,                  ICE_INSET_NONE},
-	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_GTPU_EH,               ICE_INSET_NONE},
+
+	{pattern_eth_ipv4_gtpu,	       ICE_FDIR_INSET_IPV4_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_IPV4_GTPU_EH,          ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu,	       ICE_FDIR_INSET_IPV6_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu_eh,     ICE_FDIR_INSET_IPV6_GTPU_EH,          ICE_INSET_NONE},
 };
 
 static struct ice_flow_parser ice_fdir_parser_os;
@@ -778,6 +788,21 @@ ice_fdir_cross_prof_conflict(struct ice_pf *pf,
 			(pf, cflct_ptype, is_tunnel))
 			goto err;
 		break;
+	/* IPv6 GTPU */
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		break;
 	/* IPv6 */
 	case ICE_FLTR_PTYPE_NONF_IPV6_UDP:
 	case ICE_FLTR_PTYPE_NONF_IPV6_TCP:
@@ -1008,6 +1033,19 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
 		else
 			PMD_DRV_LOG(ERR, "not supported tunnel type.");
 		break;
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+					  ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else
+			PMD_DRV_LOG(ERR, "not supported tunnel type.");
+		break;
 	default:
 		PMD_DRV_LOG(ERR, "not supported filter type.");
 		break;
@@ -1948,8 +1986,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 	}
 
 	if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU ||
-	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
-		flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH) {
+		if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+		else
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+	}
 
 	filter->tunnel_type = tunnel_type;
 	filter->input.flow_type = flow_type;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index ad103d0e8..abb5d22d1 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1033,7 +1033,7 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1041,22 +1041,43 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+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_IPV4,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[] = {
+
+/* IPv6 GTPU (EH) */
+enum rte_flow_item_type pattern_eth_ipv6_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
-	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
 	RTE_FLOW_ITEM_TYPE_UDP,
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
+
+/* IPv4 GTPU IPv4 */
+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,
+};
+
+/* IPv4 GTPU EH IPv4 */
 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 492a48cd9..3ce9a1f27 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -361,10 +361,18 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_udp[];
 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 */
+/* IPv4 GTPU (EH) */
 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[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 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.17.1


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

* [dpdk-dev] [PATCH 2/2] net/iavf: add FD support for GTPU with outer IP
  2020-06-12  8:13 [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
  2020-06-12  8:13 ` [dpdk-dev] [PATCH 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
@ 2020-06-12  8:13 ` Junfeng Guo
  2020-06-12  8:30 ` [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Ye Xiaolong
  2020-06-15  5:04 ` [dpdk-dev] [PATCH v2 " Junfeng Guo
  3 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-12  8:13 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching. Note that outer IP matching fields here
includes both SRC & DST of both IPv4 & IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/iavf/iavf_fdir.c         | 22 ++++++++++++++++++----
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 ++++++++++--
 3 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 264c47d83..5ea524ed4 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -68,14 +68,22 @@
 	IAVF_INSET_IPV6_TC | IAVF_INSET_IPV6_HOP_LIMIT | \
 	IAVF_INSET_SCTP_SRC_PORT | IAVF_INSET_SCTP_DST_PORT)
 
-#define IAVF_FDIR_INSET_GTPU (\
+#define IAVF_FDIR_INSET_IPV4_GTPU (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID)
 
-#define IAVF_FDIR_INSET_GTPU_EH (\
+#define IAVF_FDIR_INSET_IPV4_GTPU_EH (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
 
+#define IAVF_FDIR_INSET_IPV6_GTPU (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID)
+
+#define IAVF_FDIR_INSET_IPV6_GTPU_EH (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
+
 #define IAVF_FDIR_INSET_L2TPV3OIP (\
 	IAVF_L2TPV3OIP_SESSION_ID)
 
@@ -98,16 +106,22 @@
 
 static struct iavf_pattern_match_item iavf_fdir_pattern[] = {
 	{iavf_pattern_ethertype,		IAVF_FDIR_INSET_ETH,			IAVF_INSET_NONE},
+
 	{iavf_pattern_eth_ipv4,			IAVF_FDIR_INSET_ETH_IPV4,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_udp,		IAVF_FDIR_INSET_ETH_IPV4_UDP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_tcp,		IAVF_FDIR_INSET_ETH_IPV4_TCP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_sctp,		IAVF_FDIR_INSET_ETH_IPV4_SCTP,		IAVF_INSET_NONE},
+
 	{iavf_pattern_eth_ipv6,			IAVF_FDIR_INSET_ETH_IPV6,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_udp,		IAVF_FDIR_INSET_ETH_IPV6_UDP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_tcp,		IAVF_FDIR_INSET_ETH_IPV6_TCP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_sctp,		IAVF_FDIR_INSET_ETH_IPV6_SCTP,		IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_GTPU,			IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_GTPU_EH,		IAVF_INSET_NONE},
+
+	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_IPV4_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_IPV4_GTPU_EH,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu,		IAVF_FDIR_INSET_IPV6_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu_eh,		IAVF_FDIR_INSET_IPV6_GTPU_EH,		IAVF_INSET_NONE},
+
 	{iavf_pattern_eth_ipv4_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_esp,		IAVF_FDIR_INSET_ESP,			IAVF_INSET_NONE},
diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index b6c26c4fd..e4d693774 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -315,7 +315,7 @@ enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -333,6 +333,25 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPv6 GTPU (EH) */
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+/* IPv4 GTPU IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -342,6 +361,7 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPv4 GTPU EH IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h
index 978d0716b..8a6687542 100644
--- a/drivers/net/iavf/iavf_generic_flow.h
+++ b/drivers/net/iavf/iavf_generic_flow.h
@@ -182,10 +182,18 @@ extern enum rte_flow_item_type iavf_pattern_eth_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[];
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[];
-extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp[];
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF
  2020-06-12  8:13 [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
  2020-06-12  8:13 ` [dpdk-dev] [PATCH 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
  2020-06-12  8:13 ` [dpdk-dev] [PATCH 2/2] net/iavf: " Junfeng Guo
@ 2020-06-12  8:30 ` Ye Xiaolong
  2020-06-12  9:06   ` Guo, Junfeng
  2020-06-15  5:04 ` [dpdk-dev] [PATCH v2 " Junfeng Guo
  3 siblings, 1 reply; 15+ messages in thread
From: Ye Xiaolong @ 2020-06-12  8:30 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: qi.z.zhang, beilei.xing, dev, jia.guo, simei.su

Hi, junfeng

On 06/12, Junfeng Guo wrote:
>[PATCH 1/2] add FD support for GTPU with outer IP on PF
>[PATCH 2/2] add FD support for GTPU with outer IP on VF
>
>*** BLURB HERE ***

Better to have some description about your patchset in the cover letter other
than keeping the auto-generated "*** BLURB HERE ***". :)

Thanks,
Xiaolong

>
>Junfeng Guo (2):
>  net/ice: add FD support for GTPU with outer IP
>  net/iavf: add FD support for GTPU with outer IP
>
> drivers/net/iavf/iavf_fdir.c         | 22 +++++++++---
> drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++-
> drivers/net/iavf/iavf_generic_flow.h | 12 +++++--
> drivers/net/ice/ice_fdir_filter.c    | 54 ++++++++++++++++++++++++----
> drivers/net/ice/ice_generic_flow.c   | 31 +++++++++++++---
> drivers/net/ice/ice_generic_flow.h   | 12 +++++--
> 6 files changed, 133 insertions(+), 20 deletions(-)
>
>-- 
>2.17.1
>

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

* Re: [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF
  2020-06-12  8:30 ` [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Ye Xiaolong
@ 2020-06-12  9:06   ` Guo, Junfeng
  0 siblings, 0 replies; 15+ messages in thread
From: Guo, Junfeng @ 2020-06-12  9:06 UTC (permalink / raw)
  To: Ye, Xiaolong; +Cc: Zhang, Qi Z, Xing, Beilei, dev, Guo, Jia, Su, Simei

Hi Xiaolong,

> -----Original Message-----
> From: Ye, Xiaolong <xiaolong.ye@intel.com>
> Sent: Friday, June 12, 2020 16:30
> To: Guo, Junfeng <junfeng.guo@intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: Re: [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF
> 
> Hi, junfeng
> 
> On 06/12, Junfeng Guo wrote:
> >[PATCH 1/2] add FD support for GTPU with outer IP on PF [PATCH 2/2] add
> >FD support for GTPU with outer IP on VF
> >
> >*** BLURB HERE ***
> 
> Better to have some description about your patchset in the cover letter other
> than keeping the auto-generated "*** BLURB HERE ***". :)
> 
> Thanks,
> Xiaolong
> 

Sorry I just forgot to remove this log. I'll fix this and correct this in the v2.
Thanks for your review!

Regards,
Junfeng Guo

> >
> >Junfeng Guo (2):
> >  net/ice: add FD support for GTPU with outer IP
> >  net/iavf: add FD support for GTPU with outer IP
> >
> > drivers/net/iavf/iavf_fdir.c         | 22 +++++++++---
> > drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++-
> > drivers/net/iavf/iavf_generic_flow.h | 12 +++++--
> > drivers/net/ice/ice_fdir_filter.c    | 54 ++++++++++++++++++++++++----
> > drivers/net/ice/ice_generic_flow.c   | 31 +++++++++++++---
> > drivers/net/ice/ice_generic_flow.h   | 12 +++++--
> > 6 files changed, 133 insertions(+), 20 deletions(-)
> >
> >--
> >2.17.1
> >

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

* [dpdk-dev] [PATCH v2 0/2] add FD support for GTPU with outer IP on PF and VF
  2020-06-12  8:13 [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
                   ` (2 preceding siblings ...)
  2020-06-12  8:30 ` [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Ye Xiaolong
@ 2020-06-15  5:04 ` Junfeng Guo
  2020-06-15  5:04   ` [dpdk-dev] [PATCH v2 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
                     ` (2 more replies)
  3 siblings, 3 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-15  5:04 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

This series contains adding FD support for GTPU with outer IP and IPv6
on both PF and VF.

[PATCH v2 1/2] add FD support for GTPU with outer IP on PF.
[PATCH v2 2/2] add FD support for GTPU with outer IP on VF.

v2:
* Fix minor cover letter commit log issue.

Junfeng Guo (2):
  net/ice: add FD support for GTPU with outer IP
  net/iavf: add FD support for GTPU with outer IP

 drivers/net/iavf/iavf_fdir.c         | 22 +++++++++---
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 +++++--
 drivers/net/ice/ice_fdir_filter.c    | 54 ++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c   | 31 +++++++++++++---
 drivers/net/ice/ice_generic_flow.h   | 12 +++++--
 6 files changed, 133 insertions(+), 20 deletions(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH v2 1/2] net/ice: add FD support for GTPU with outer IP
  2020-06-15  5:04 ` [dpdk-dev] [PATCH v2 " Junfeng Guo
@ 2020-06-15  5:04   ` Junfeng Guo
  2020-06-15  5:04   ` [dpdk-dev] [PATCH v2 2/2] net/iavf: " Junfeng Guo
  2020-06-17  2:43   ` [dpdk-dev] [PATCH v3 0/2] add FD support for GTPU with outer IP on VF and PF Junfeng Guo
  2 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-15  5:04 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching. Note that outer IP matching fields here
includes both SRC & DST of both IPv4 & IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c  | 54 ++++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c | 31 ++++++++++++++---
 drivers/net/ice/ice_generic_flow.h | 12 +++++--
 3 files changed, 84 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index c3f23a019..4793b81c5 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -67,13 +67,20 @@
 	ICE_FDIR_INSET_VXLAN_IPV4 | \
 	ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
 
-#define ICE_FDIR_INSET_GTPU (\
+#define ICE_FDIR_INSET_IPV4_GTPU (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID)
 
-#define ICE_FDIR_INSET_GTPU_EH (\
+#define ICE_FDIR_INSET_IPV4_GTPU_EH (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
 	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
 
+#define ICE_FDIR_INSET_IPV6_GTPU (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | ICE_INSET_GTPU_TEID)
+
+#define ICE_FDIR_INSET_IPV6_GTPU_EH (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | \
+	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
+
 static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
 	{pattern_eth_ipv4,             ICE_FDIR_INSET_ETH_IPV4,              ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp,         ICE_FDIR_INSET_ETH_IPV4_UDP,          ICE_INSET_NONE},
@@ -126,8 +133,11 @@ 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,	       ICE_FDIR_INSET_GTPU,                  ICE_INSET_NONE},
-	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_GTPU_EH,               ICE_INSET_NONE},
+
+	{pattern_eth_ipv4_gtpu,	       ICE_FDIR_INSET_IPV4_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_IPV4_GTPU_EH,          ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu,	       ICE_FDIR_INSET_IPV6_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu_eh,     ICE_FDIR_INSET_IPV6_GTPU_EH,          ICE_INSET_NONE},
 };
 
 static struct ice_flow_parser ice_fdir_parser_os;
@@ -778,6 +788,21 @@ ice_fdir_cross_prof_conflict(struct ice_pf *pf,
 			(pf, cflct_ptype, is_tunnel))
 			goto err;
 		break;
+	/* IPv6 GTPU */
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		break;
 	/* IPv6 */
 	case ICE_FLTR_PTYPE_NONF_IPV6_UDP:
 	case ICE_FLTR_PTYPE_NONF_IPV6_TCP:
@@ -1008,6 +1033,19 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
 		else
 			PMD_DRV_LOG(ERR, "not supported tunnel type.");
 		break;
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+					  ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else
+			PMD_DRV_LOG(ERR, "not supported tunnel type.");
+		break;
 	default:
 		PMD_DRV_LOG(ERR, "not supported filter type.");
 		break;
@@ -1948,8 +1986,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 	}
 
 	if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU ||
-	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
-		flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH) {
+		if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+		else
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+	}
 
 	filter->tunnel_type = tunnel_type;
 	filter->input.flow_type = flow_type;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index ad103d0e8..abb5d22d1 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1033,7 +1033,7 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1041,22 +1041,43 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+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_IPV4,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[] = {
+
+/* IPv6 GTPU (EH) */
+enum rte_flow_item_type pattern_eth_ipv6_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
-	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
 	RTE_FLOW_ITEM_TYPE_UDP,
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
+
+/* IPv4 GTPU IPv4 */
+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,
+};
+
+/* IPv4 GTPU EH IPv4 */
 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 492a48cd9..3ce9a1f27 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -361,10 +361,18 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_udp[];
 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 */
+/* IPv4 GTPU (EH) */
 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[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 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.17.1


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

* [dpdk-dev] [PATCH v2 2/2] net/iavf: add FD support for GTPU with outer IP
  2020-06-15  5:04 ` [dpdk-dev] [PATCH v2 " Junfeng Guo
  2020-06-15  5:04   ` [dpdk-dev] [PATCH v2 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
@ 2020-06-15  5:04   ` Junfeng Guo
  2020-06-17  2:43   ` [dpdk-dev] [PATCH v3 0/2] add FD support for GTPU with outer IP on VF and PF Junfeng Guo
  2 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-15  5:04 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching. Note that outer IP matching fields here
includes both SRC & DST of both IPv4 & IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/iavf/iavf_fdir.c         | 22 ++++++++++++++++++----
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 ++++++++++--
 3 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 264c47d83..5ea524ed4 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -68,14 +68,22 @@
 	IAVF_INSET_IPV6_TC | IAVF_INSET_IPV6_HOP_LIMIT | \
 	IAVF_INSET_SCTP_SRC_PORT | IAVF_INSET_SCTP_DST_PORT)
 
-#define IAVF_FDIR_INSET_GTPU (\
+#define IAVF_FDIR_INSET_IPV4_GTPU (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID)
 
-#define IAVF_FDIR_INSET_GTPU_EH (\
+#define IAVF_FDIR_INSET_IPV4_GTPU_EH (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
 
+#define IAVF_FDIR_INSET_IPV6_GTPU (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID)
+
+#define IAVF_FDIR_INSET_IPV6_GTPU_EH (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
+
 #define IAVF_FDIR_INSET_L2TPV3OIP (\
 	IAVF_L2TPV3OIP_SESSION_ID)
 
@@ -98,16 +106,22 @@
 
 static struct iavf_pattern_match_item iavf_fdir_pattern[] = {
 	{iavf_pattern_ethertype,		IAVF_FDIR_INSET_ETH,			IAVF_INSET_NONE},
+
 	{iavf_pattern_eth_ipv4,			IAVF_FDIR_INSET_ETH_IPV4,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_udp,		IAVF_FDIR_INSET_ETH_IPV4_UDP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_tcp,		IAVF_FDIR_INSET_ETH_IPV4_TCP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_sctp,		IAVF_FDIR_INSET_ETH_IPV4_SCTP,		IAVF_INSET_NONE},
+
 	{iavf_pattern_eth_ipv6,			IAVF_FDIR_INSET_ETH_IPV6,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_udp,		IAVF_FDIR_INSET_ETH_IPV6_UDP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_tcp,		IAVF_FDIR_INSET_ETH_IPV6_TCP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_sctp,		IAVF_FDIR_INSET_ETH_IPV6_SCTP,		IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_GTPU,			IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_GTPU_EH,		IAVF_INSET_NONE},
+
+	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_IPV4_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_IPV4_GTPU_EH,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu,		IAVF_FDIR_INSET_IPV6_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu_eh,		IAVF_FDIR_INSET_IPV6_GTPU_EH,		IAVF_INSET_NONE},
+
 	{iavf_pattern_eth_ipv4_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_esp,		IAVF_FDIR_INSET_ESP,			IAVF_INSET_NONE},
diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index b6c26c4fd..e4d693774 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -315,7 +315,7 @@ enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -333,6 +333,25 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPv6 GTPU (EH) */
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+/* IPv4 GTPU IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -342,6 +361,7 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPv4 GTPU EH IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h
index 978d0716b..8a6687542 100644
--- a/drivers/net/iavf/iavf_generic_flow.h
+++ b/drivers/net/iavf/iavf_generic_flow.h
@@ -182,10 +182,18 @@ extern enum rte_flow_item_type iavf_pattern_eth_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[];
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[];
-extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp[];
-- 
2.17.1


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

* [dpdk-dev] [PATCH v3 0/2] add FD support for GTPU with outer IP on VF and PF
  2020-06-15  5:04 ` [dpdk-dev] [PATCH v2 " Junfeng Guo
  2020-06-15  5:04   ` [dpdk-dev] [PATCH v2 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
  2020-06-15  5:04   ` [dpdk-dev] [PATCH v2 2/2] net/iavf: " Junfeng Guo
@ 2020-06-17  2:43   ` Junfeng Guo
  2020-06-17  2:43     ` [dpdk-dev] [PATCH v3 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
                       ` (2 more replies)
  2 siblings, 3 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-17  2:43 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching for both VF and PF. Note that outer IP
matching fields here includes both SRC & DST of both IPv4 & IPv6.

[PATCH v3 1/2] add FD support for GTPU with outer IP on PF
[PATCH v3 2/2] add FD support for GTPU with outer IP on VF

v3:
* Code rebase.

v2:
* Fix minor cover letter commit log issue.

Junfeng Guo (2):
  net/ice: add FD support for GTPU with outer IP
  net/iavf: add FD support for GTPU with outer IP

 drivers/net/iavf/iavf_fdir.c         | 18 +++++++---
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 +++++--
 drivers/net/ice/ice_fdir_filter.c    | 53 ++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c   | 33 ++++++++++++++---
 drivers/net/ice/ice_generic_flow.h   | 12 +++++--
 6 files changed, 130 insertions(+), 20 deletions(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH v3 1/2] net/ice: add FD support for GTPU with outer IP
  2020-06-17  2:43   ` [dpdk-dev] [PATCH v3 0/2] add FD support for GTPU with outer IP on VF and PF Junfeng Guo
@ 2020-06-17  2:43     ` Junfeng Guo
  2020-06-17  2:43     ` [dpdk-dev] [PATCH v3 2/2] net/iavf: " Junfeng Guo
  2020-07-08  4:26     ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
  2 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-17  2:43 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching. Note that outer IP matching fields here
includes both SRC & DST of both IPv4 & IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c  | 53 ++++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c | 33 ++++++++++++++++---
 drivers/net/ice/ice_generic_flow.h | 12 +++++--
 3 files changed, 85 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 3bee4a103..710995749 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -70,13 +70,20 @@
 	ICE_FDIR_INSET_VXLAN_IPV4 | \
 	ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
 
-#define ICE_FDIR_INSET_GTPU (\
+#define ICE_FDIR_INSET_IPV4_GTPU (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID)
 
-#define ICE_FDIR_INSET_GTPU_EH (\
+#define ICE_FDIR_INSET_IPV4_GTPU_EH (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
 	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
 
+#define ICE_FDIR_INSET_IPV6_GTPU (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | ICE_INSET_GTPU_TEID)
+
+#define ICE_FDIR_INSET_IPV6_GTPU_EH (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | \
+	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
+
 static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
 	{pattern_eth_ipv4,             ICE_FDIR_INSET_ETH_IPV4,              ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp,         ICE_FDIR_INSET_ETH_IPV4_UDP,          ICE_INSET_NONE},
@@ -130,8 +137,10 @@ 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,	       ICE_FDIR_INSET_GTPU,                  ICE_INSET_NONE},
-	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_GTPU_EH,               ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu,	       ICE_FDIR_INSET_IPV4_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_IPV4_GTPU_EH,          ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu,	       ICE_FDIR_INSET_IPV6_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu_eh,     ICE_FDIR_INSET_IPV6_GTPU_EH,          ICE_INSET_NONE},
 };
 
 static struct ice_flow_parser ice_fdir_parser_os;
@@ -782,6 +791,21 @@ ice_fdir_cross_prof_conflict(struct ice_pf *pf,
 			(pf, cflct_ptype, is_tunnel))
 			goto err;
 		break;
+	/* IPv6 GTPU */
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		break;
 	/* IPv6 */
 	case ICE_FLTR_PTYPE_NONF_IPV6_UDP:
 	case ICE_FLTR_PTYPE_NONF_IPV6_TCP:
@@ -1013,6 +1037,19 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
 		else
 			PMD_DRV_LOG(ERR, "not supported tunnel type.");
 		break;
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+					  ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else
+			PMD_DRV_LOG(ERR, "not supported tunnel type.");
+		break;
 	case ICE_FLTR_PTYPE_NON_IP_L2:
 		ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_ETH_NON_IP);
 		break;
@@ -1970,8 +2007,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 	}
 
 	if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU ||
-	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
-		flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH) {
+		if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+		else
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+	}
 
 	filter->tunnel_type = tunnel_type;
 	filter->input.flow_type = flow_type;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index ad103d0e8..9f83a428d 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1033,7 +1033,7 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/*IPv4 GTPU (EH) */
 enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1041,22 +1041,45 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+
+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_IPV4,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[] = {
+
+/*IPv6 GTPU (EH) */
+enum rte_flow_item_type pattern_eth_ipv6_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
-	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
 	RTE_FLOW_ITEM_TYPE_UDP,
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
+
+/*IPv4 GTPU IPv4 */
+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,
+};
+
+/*IPv4 GTPU EH IPv4 */
 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 492a48cd9..3ce9a1f27 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -361,10 +361,18 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_udp[];
 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 */
+/* IPv4 GTPU (EH) */
 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[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 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.17.1


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

* [dpdk-dev] [PATCH v3 2/2] net/iavf: add FD support for GTPU with outer IP
  2020-06-17  2:43   ` [dpdk-dev] [PATCH v3 0/2] add FD support for GTPU with outer IP on VF and PF Junfeng Guo
  2020-06-17  2:43     ` [dpdk-dev] [PATCH v3 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
@ 2020-06-17  2:43     ` Junfeng Guo
  2020-07-08  4:26     ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
  2 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-06-17  2:43 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching. Note that outer IP matching fields here
includes both SRC & DST of both IPv4 & IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/iavf/iavf_fdir.c         | 18 ++++++++++++++----
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 ++++++++++--
 3 files changed, 45 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 264c47d83..f584e5624 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -68,14 +68,22 @@
 	IAVF_INSET_IPV6_TC | IAVF_INSET_IPV6_HOP_LIMIT | \
 	IAVF_INSET_SCTP_SRC_PORT | IAVF_INSET_SCTP_DST_PORT)
 
-#define IAVF_FDIR_INSET_GTPU (\
+#define IAVF_FDIR_INSET_IPV4_GTPU (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID)
 
-#define IAVF_FDIR_INSET_GTPU_EH (\
+#define IAVF_FDIR_INSET_IPV4_GTPU_EH (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
 
+#define IAVF_FDIR_INSET_IPV6_GTPU (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID)
+
+#define IAVF_FDIR_INSET_IPV6_GTPU_EH (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
+
 #define IAVF_FDIR_INSET_L2TPV3OIP (\
 	IAVF_L2TPV3OIP_SESSION_ID)
 
@@ -106,8 +114,10 @@ static struct iavf_pattern_match_item iavf_fdir_pattern[] = {
 	{iavf_pattern_eth_ipv6_udp,		IAVF_FDIR_INSET_ETH_IPV6_UDP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_tcp,		IAVF_FDIR_INSET_ETH_IPV6_TCP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_sctp,		IAVF_FDIR_INSET_ETH_IPV6_SCTP,		IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_GTPU,			IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_GTPU_EH,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_IPV4_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_IPV4_GTPU_EH,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu,		IAVF_FDIR_INSET_IPV6_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu_eh,		IAVF_FDIR_INSET_IPV6_GTPU_EH,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_esp,		IAVF_FDIR_INSET_ESP,			IAVF_INSET_NONE},
diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index b6c26c4fd..c6d48f081 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -315,7 +315,7 @@ enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/* IPV4 GTPU (EH) */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -333,6 +333,25 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPV6 GTPU (EH) */
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+/* IPV4 GTPU IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -342,6 +361,7 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPV4 GTPU EH IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h
index 978d0716b..8a6687542 100644
--- a/drivers/net/iavf/iavf_generic_flow.h
+++ b/drivers/net/iavf/iavf_generic_flow.h
@@ -182,10 +182,18 @@ extern enum rte_flow_item_type iavf_pattern_eth_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[];
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[];
-extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp[];
-- 
2.17.1


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

* [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF
  2020-06-17  2:43   ` [dpdk-dev] [PATCH v3 0/2] add FD support for GTPU with outer IP on VF and PF Junfeng Guo
  2020-06-17  2:43     ` [dpdk-dev] [PATCH v3 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
  2020-06-17  2:43     ` [dpdk-dev] [PATCH v3 2/2] net/iavf: " Junfeng Guo
@ 2020-07-08  4:26     ` Junfeng Guo
  2020-07-08  4:26       ` [dpdk-dev] [PATCH v4 1/2] net/ice: add FD support for GTPU with outer IPv4 and IPv6 Junfeng Guo
                         ` (2 more replies)
  2 siblings, 3 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-07-08  4:26 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid
and qfi fields matching for both VF and PF. Note that outer IP
matching fields here includes both SRC & DST of both IPv4 & IPv6.:

[PATCH v4 1/2] add FD support for GTPU with outer IP on PF
[PATCH v4 2/2] add FD support for GTPU with outer IP on VF

v4:
* Code rebase.

v3:
* Code rebase.

v2:
* Fix minor cover letter commit log issue.

Junfeng Guo (2):
  net/ice: add FD support for GTPU with outer IPv4 and IPv6
  net/iavf: add FD support for GTPU with outer IPv4 and IPv6

 drivers/net/iavf/iavf_fdir.c         | 18 +++++++---
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 +++++--
 drivers/net/ice/ice_fdir_filter.c    | 53 ++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c   | 33 ++++++++++++++---
 drivers/net/ice/ice_generic_flow.h   | 12 +++++--
 6 files changed, 130 insertions(+), 20 deletions(-)

-- 
2.25.1


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

* [dpdk-dev] [PATCH v4 1/2] net/ice: add FD support for GTPU with outer IPv4 and IPv6
  2020-07-08  4:26     ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
@ 2020-07-08  4:26       ` Junfeng Guo
  2020-07-08  4:26       ` [dpdk-dev] [PATCH v4 2/2] net/iavf: " Junfeng Guo
  2020-07-08  8:30       ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Zhang, Qi Z
  2 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-07-08  4:26 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV4_GTPU and MAC_IPV6_GTPU type with outer
IPv4/IPv6 address, teid and qfi fields matching. Note that outer IPv4
and IPv6 matching fields here include both SRC & DST of both IPv4 &
IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c  | 53 ++++++++++++++++++++++++++----
 drivers/net/ice/ice_generic_flow.c | 33 ++++++++++++++++---
 drivers/net/ice/ice_generic_flow.h | 12 +++++--
 3 files changed, 85 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 3bee4a103..710995749 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -70,13 +70,20 @@
 	ICE_FDIR_INSET_VXLAN_IPV4 | \
 	ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
 
-#define ICE_FDIR_INSET_GTPU (\
+#define ICE_FDIR_INSET_IPV4_GTPU (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID)
 
-#define ICE_FDIR_INSET_GTPU_EH (\
+#define ICE_FDIR_INSET_IPV4_GTPU_EH (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
 	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
 
+#define ICE_FDIR_INSET_IPV6_GTPU (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | ICE_INSET_GTPU_TEID)
+
+#define ICE_FDIR_INSET_IPV6_GTPU_EH (\
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST | \
+	ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
+
 static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
 	{pattern_eth_ipv4,             ICE_FDIR_INSET_ETH_IPV4,              ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp,         ICE_FDIR_INSET_ETH_IPV4_UDP,          ICE_INSET_NONE},
@@ -130,8 +137,10 @@ 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,	       ICE_FDIR_INSET_GTPU,                  ICE_INSET_NONE},
-	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_GTPU_EH,               ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu,	       ICE_FDIR_INSET_IPV4_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv4_gtpu_eh,     ICE_FDIR_INSET_IPV4_GTPU_EH,          ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu,	       ICE_FDIR_INSET_IPV6_GTPU,             ICE_INSET_NONE},
+	{pattern_eth_ipv6_gtpu_eh,     ICE_FDIR_INSET_IPV6_GTPU_EH,          ICE_INSET_NONE},
 };
 
 static struct ice_flow_parser ice_fdir_parser_os;
@@ -782,6 +791,21 @@ ice_fdir_cross_prof_conflict(struct ice_pf *pf,
 			(pf, cflct_ptype, is_tunnel))
 			goto err;
 		break;
+	/* IPv6 GTPU */
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		cflct_ptype = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+		if (!ice_fdir_prof_resolve_conflict
+			(pf, cflct_ptype, is_tunnel))
+			goto err;
+		break;
 	/* IPv6 */
 	case ICE_FLTR_PTYPE_NONF_IPV6_UDP:
 	case ICE_FLTR_PTYPE_NONF_IPV6_TCP:
@@ -1013,6 +1037,19 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
 		else
 			PMD_DRV_LOG(ERR, "not supported tunnel type.");
 		break;
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
+			ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+					  ICE_FLOW_SEG_HDR_GTPU_IP |
+					  ICE_FLOW_SEG_HDR_IPV6 |
+					  ICE_FLOW_SEG_HDR_IPV_OTHER);
+		else
+			PMD_DRV_LOG(ERR, "not supported tunnel type.");
+		break;
 	case ICE_FLTR_PTYPE_NON_IP_L2:
 		ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_ETH_NON_IP);
 		break;
@@ -1970,8 +2007,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 	}
 
 	if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU ||
-	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
-		flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+	    tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH) {
+		if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP)
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
+		else
+			flow_type = ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER;
+	}
 
 	filter->tunnel_type = tunnel_type;
 	filter->input.flow_type = flow_type;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index ad103d0e8..9f83a428d 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1033,7 +1033,7 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/*IPv4 GTPU (EH) */
 enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1041,22 +1041,45 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+
+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_IPV4,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[] = {
+
+/*IPv6 GTPU (EH) */
+enum rte_flow_item_type pattern_eth_ipv6_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
-	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
 	RTE_FLOW_ITEM_TYPE_UDP,
 	RTE_FLOW_ITEM_TYPE_GTPU,
 	RTE_FLOW_ITEM_TYPE_GTP_PSC,
 	RTE_FLOW_ITEM_TYPE_END,
 };
+
+/*IPv4 GTPU IPv4 */
+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,
+};
+
+/*IPv4 GTPU EH IPv4 */
 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 492a48cd9..3ce9a1f27 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -361,10 +361,18 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_udp[];
 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 */
+/* IPv4 GTPU (EH) */
 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[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 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.25.1


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

* [dpdk-dev] [PATCH v4 2/2] net/iavf: add FD support for GTPU with outer IPv4 and IPv6
  2020-07-08  4:26     ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
  2020-07-08  4:26       ` [dpdk-dev] [PATCH v4 1/2] net/ice: add FD support for GTPU with outer IPv4 and IPv6 Junfeng Guo
@ 2020-07-08  4:26       ` Junfeng Guo
  2020-07-08  8:30       ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Zhang, Qi Z
  2 siblings, 0 replies; 15+ messages in thread
From: Junfeng Guo @ 2020-07-08  4:26 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

Add FDir support for MAC_IPV4_GTPU and MAC_IPV6_GTPU type with outer
IPv4/IPv6 address, teid and qfi fields matching. Note that outer IPv4
and IPv6 matching fields here include both SRC & DST of both IPv4 &
IPv6.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/iavf/iavf_fdir.c         | 18 ++++++++++++++----
 drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++++++++++++-
 drivers/net/iavf/iavf_generic_flow.h | 12 ++++++++++--
 3 files changed, 45 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 264c47d83..f584e5624 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -68,14 +68,22 @@
 	IAVF_INSET_IPV6_TC | IAVF_INSET_IPV6_HOP_LIMIT | \
 	IAVF_INSET_SCTP_SRC_PORT | IAVF_INSET_SCTP_DST_PORT)
 
-#define IAVF_FDIR_INSET_GTPU (\
+#define IAVF_FDIR_INSET_IPV4_GTPU (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID)
 
-#define IAVF_FDIR_INSET_GTPU_EH (\
+#define IAVF_FDIR_INSET_IPV4_GTPU_EH (\
 	IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \
 	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
 
+#define IAVF_FDIR_INSET_IPV6_GTPU (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID)
+
+#define IAVF_FDIR_INSET_IPV6_GTPU_EH (\
+	IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \
+	IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI)
+
 #define IAVF_FDIR_INSET_L2TPV3OIP (\
 	IAVF_L2TPV3OIP_SESSION_ID)
 
@@ -106,8 +114,10 @@ static struct iavf_pattern_match_item iavf_fdir_pattern[] = {
 	{iavf_pattern_eth_ipv6_udp,		IAVF_FDIR_INSET_ETH_IPV6_UDP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_tcp,		IAVF_FDIR_INSET_ETH_IPV6_TCP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_sctp,		IAVF_FDIR_INSET_ETH_IPV6_SCTP,		IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_GTPU,			IAVF_INSET_NONE},
-	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_GTPU_EH,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv4_gtpu,		IAVF_FDIR_INSET_IPV4_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv4_gtpu_eh,		IAVF_FDIR_INSET_IPV4_GTPU_EH,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu,		IAVF_FDIR_INSET_IPV6_GTPU,		IAVF_INSET_NONE},
+	{iavf_pattern_eth_ipv6_gtpu_eh,		IAVF_FDIR_INSET_IPV6_GTPU_EH,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv6_l2tpv3,		IAVF_FDIR_INSET_L2TPV3OIP,		IAVF_INSET_NONE},
 	{iavf_pattern_eth_ipv4_esp,		IAVF_FDIR_INSET_ESP,			IAVF_INSET_NONE},
diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c
index b6c26c4fd..c6d48f081 100644
--- a/drivers/net/iavf/iavf_generic_flow.c
+++ b/drivers/net/iavf/iavf_generic_flow.c
@@ -315,7 +315,7 @@ enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
-/* GTPU */
+/* IPV4 GTPU (EH) */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -333,6 +333,25 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPV6 GTPU (EH) */
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_GTPU,
+	RTE_FLOW_ITEM_TYPE_GTP_PSC,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+/* IPV4 GTPU IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
@@ -342,6 +361,7 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* IPV4 GTPU EH IPv4 */
 enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[] = {
 	RTE_FLOW_ITEM_TYPE_ETH,
 	RTE_FLOW_ITEM_TYPE_IPV4,
diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h
index 978d0716b..8a6687542 100644
--- a/drivers/net/iavf/iavf_generic_flow.h
+++ b/drivers/net/iavf/iavf_generic_flow.h
@@ -182,10 +182,18 @@ extern enum rte_flow_item_type iavf_pattern_eth_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_icmp6[];
 extern enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[];
 
-/* GTPU */
+/* IPv4 GTPU (EH) */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[];
-extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[];
+
+/* IPv6 GTPU (EH) */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[];
+extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[];
+
+/* IPv4 GTPU IPv4 */
+extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[];
+
+/* IPv4 GTPU EH IPv4 */
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp[];
 extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp[];
-- 
2.25.1


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

* Re: [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF
  2020-07-08  4:26     ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
  2020-07-08  4:26       ` [dpdk-dev] [PATCH v4 1/2] net/ice: add FD support for GTPU with outer IPv4 and IPv6 Junfeng Guo
  2020-07-08  4:26       ` [dpdk-dev] [PATCH v4 2/2] net/iavf: " Junfeng Guo
@ 2020-07-08  8:30       ` Zhang, Qi Z
  2 siblings, 0 replies; 15+ messages in thread
From: Zhang, Qi Z @ 2020-07-08  8:30 UTC (permalink / raw)
  To: Guo, Junfeng, Ye, Xiaolong, Xing, Beilei; +Cc: dev, Guo, Jia, Su, Simei



> -----Original Message-----
> From: Guo, Junfeng <junfeng.guo@intel.com>
> Sent: Wednesday, July 8, 2020 12:26 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF
> 
> Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid and
> qfi fields matching for both VF and PF. Note that outer IP matching fields
> here includes both SRC & DST of both IPv4 & IPv6.:
> 
> [PATCH v4 1/2] add FD support for GTPU with outer IP on PF [PATCH v4 2/2]
> add FD support for GTPU with outer IP on VF
> 
> v4:
> * Code rebase.
> 
> v3:
> * Code rebase.
> 
> v2:
> * Fix minor cover letter commit log issue.
> 
> Junfeng Guo (2):
>   net/ice: add FD support for GTPU with outer IPv4 and IPv6
>   net/iavf: add FD support for GTPU with outer IPv4 and IPv6
> 
>  drivers/net/iavf/iavf_fdir.c         | 18 +++++++---
>  drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++-
> drivers/net/iavf/iavf_generic_flow.h | 12 +++++--
>  drivers/net/ice/ice_fdir_filter.c    | 53 ++++++++++++++++++++++++----
>  drivers/net/ice/ice_generic_flow.c   | 33 ++++++++++++++---
>  drivers/net/ice/ice_generic_flow.h   | 12 +++++--
>  6 files changed, 130 insertions(+), 20 deletions(-)
> 
> --
> 2.25.1

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

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2020-07-08  8:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12  8:13 [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
2020-06-12  8:13 ` [dpdk-dev] [PATCH 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
2020-06-12  8:13 ` [dpdk-dev] [PATCH 2/2] net/iavf: " Junfeng Guo
2020-06-12  8:30 ` [dpdk-dev] [PATCH 0/2] add FD support for GTPU with outer IP on PF and VF Ye Xiaolong
2020-06-12  9:06   ` Guo, Junfeng
2020-06-15  5:04 ` [dpdk-dev] [PATCH v2 " Junfeng Guo
2020-06-15  5:04   ` [dpdk-dev] [PATCH v2 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
2020-06-15  5:04   ` [dpdk-dev] [PATCH v2 2/2] net/iavf: " Junfeng Guo
2020-06-17  2:43   ` [dpdk-dev] [PATCH v3 0/2] add FD support for GTPU with outer IP on VF and PF Junfeng Guo
2020-06-17  2:43     ` [dpdk-dev] [PATCH v3 1/2] net/ice: add FD support for GTPU with outer IP Junfeng Guo
2020-06-17  2:43     ` [dpdk-dev] [PATCH v3 2/2] net/iavf: " Junfeng Guo
2020-07-08  4:26     ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Junfeng Guo
2020-07-08  4:26       ` [dpdk-dev] [PATCH v4 1/2] net/ice: add FD support for GTPU with outer IPv4 and IPv6 Junfeng Guo
2020-07-08  4:26       ` [dpdk-dev] [PATCH v4 2/2] net/iavf: " Junfeng Guo
2020-07-08  8:30       ` [dpdk-dev] [PATCH v4 0/2] add FD support for GTPU with outer IP on PF and VF Zhang, Qi Z

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