DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeff Guo <jia.guo@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com,
	qiming.yang@intel.com, haiyue.wang@intel.com
Cc: dev@dpdk.org, jia.guo@intel.com
Subject: [dpdk-dev] [dpdk-dev 21.02 3/5] net/ice: add ecpri package type
Date: Wed, 16 Dec 2020 16:58:52 +0800
Message-ID: <20201216085854.7842-4-jia.guo@intel.com> (raw)
In-Reply-To: <20201216085854.7842-1-jia.guo@intel.com>

Add new ecpri package type and process the new package type when handle
each flow engines.

Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ice/ice_ethdev.c        |   7 +-
 drivers/net/ice/ice_ethdev.h        |   1 +
 drivers/net/ice/ice_fdir_filter.c   |  66 +++++++++++++++
 drivers/net/ice/ice_hash.c          | 111 +++++++++++++++++++++++++
 drivers/net/ice/ice_rxtx.c          |  32 +++++++
 drivers/net/ice/ice_switch_filter.c | 124 ++++++++++++++++++++++++++++
 6 files changed, 340 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 9a5d6a559f..ae1a22572f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -71,7 +71,8 @@ static struct proto_xtr_ol_flag ice_proto_xtr_ol_flag_params[] = {
 #define ICE_DFLT_OUTER_TAG_TYPE ICE_AQ_VSI_OUTER_TAG_VLAN_9100
 
 #define ICE_OS_DEFAULT_PKG_NAME		"ICE OS Default Package"
-#define ICE_COMMS_PKG_NAME			"ICE COMMS Package"
+#define ICE_COMMS_PKG_NAME		"ICE COMMS Package"
+#define ICE_WIRELESS_EDGE_PKG_NAME	"ICE Wireless Edge Package"
 #define ICE_MAX_RES_DESC_NUM        1024
 
 static int ice_dev_configure(struct rte_eth_dev *dev);
@@ -1807,6 +1808,10 @@ ice_load_pkg_type(struct ice_hw *hw)
 	else if (!strncmp((char *)hw->active_pkg_name, ICE_COMMS_PKG_NAME,
 		ICE_PKG_NAME_SIZE))
 		package_type = ICE_PKG_TYPE_COMMS;
+	else if (!strncmp((char *)hw->active_pkg_name,
+			  ICE_WIRELESS_EDGE_PKG_NAME,
+			  ICE_PKG_NAME_SIZE))
+		package_type = ICE_PKG_TYPE_WIRELESS_EDGE;
 	else
 		package_type = ICE_PKG_TYPE_UNKNOWN;
 
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 899f446cde..7f8d0e9087 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -147,6 +147,7 @@ enum ice_pkg_type {
 	ICE_PKG_TYPE_UNKNOWN,
 	ICE_PKG_TYPE_OS_DEFAULT,
 	ICE_PKG_TYPE_COMMS,
+	ICE_PKG_TYPE_WIRELESS_EDGE,
 };
 
 struct ice_adapter;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 175abcdd5c..5ca74bfb71 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -143,8 +143,62 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = {
 	{pattern_eth_ipv6_gtpu_eh,     ICE_FDIR_INSET_IPV6_GTPU_EH,          ICE_INSET_NONE},
 };
 
+static struct ice_pattern_match_item ice_fdir_pattern_wireless_edge[] = {
+	{pattern_ethertype,		ICE_FDIR_INSET_ETH,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4,		ICE_FDIR_INSET_ETH_IPV4,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp,		ICE_FDIR_INSET_ETH_IPV4_UDP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_tcp,		ICE_FDIR_INSET_ETH_IPV4_TCP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_sctp,		ICE_FDIR_INSET_ETH_IPV4_SCTP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv6,		ICE_FDIR_INSET_ETH_IPV6,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp,		ICE_FDIR_INSET_ETH_IPV6_UDP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv6_tcp,		ICE_FDIR_INSET_ETH_IPV6_TCP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv6_sctp,		ICE_FDIR_INSET_ETH_IPV6_SCTP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_ipv4,
+					ICE_FDIR_INSET_VXLAN_IPV4,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_ipv4_udp,
+					ICE_FDIR_INSET_VXLAN_IPV4_UDP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_ipv4_tcp,
+					ICE_FDIR_INSET_VXLAN_IPV4_TCP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_ipv4_sctp,
+					ICE_FDIR_INSET_VXLAN_IPV4_SCTP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
+					ICE_FDIR_INSET_VXLAN_IPV4,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
+					ICE_FDIR_INSET_VXLAN_IPV4_UDP,
+					ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
+					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_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;
 static struct ice_flow_parser ice_fdir_parser_comms;
+static struct ice_flow_parser ice_fdir_parser_wireless_edge;
 
 static int
 ice_fdir_is_tunnel_profile(enum ice_fdir_tunnel_type tunnel_type);
@@ -1113,6 +1167,8 @@ ice_fdir_init(struct ice_adapter *ad)
 
 	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		parser = &ice_fdir_parser_comms;
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+		parser = &ice_fdir_parser_wireless_edge;
 	else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
 		parser = &ice_fdir_parser_os;
 	else
@@ -1132,6 +1188,8 @@ ice_fdir_uninit(struct ice_adapter *ad)
 
 	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		parser = &ice_fdir_parser_comms;
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+		parser = &ice_fdir_parser_wireless_edge;
 	else
 		parser = &ice_fdir_parser_os;
 
@@ -2083,6 +2141,14 @@ static struct ice_flow_parser ice_fdir_parser_comms = {
 	.stage = ICE_FLOW_STAGE_DISTRIBUTOR,
 };
 
+static struct ice_flow_parser ice_fdir_parser_wireless_edge = {
+	.engine = &ice_fdir_engine,
+	.array = ice_fdir_pattern_wireless_edge,
+	.array_len = RTE_DIM(ice_fdir_pattern_wireless_edge),
+	.parse_pattern_action = ice_fdir_parse,
+	.stage = ICE_FLOW_STAGE_DISTRIBUTOR,
+};
+
 RTE_INIT(ice_fdir_engine_register)
 {
 	ice_register_flow_engine(&ice_fdir_engine);
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index fe3e06c579..a52ede0173 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -446,6 +446,104 @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
 		&hint_eth_pppoes},
 };
 
+/* Supported pattern for wireless edge package. */
+static struct ice_pattern_match_item ice_hash_pattern_list_wireless_edge[] = {
+	{pattern_empty,			    ICE_INSET_NONE,
+		&hint_empty},
+	{pattern_eth_ipv4,		    ICE_INSET_NONE,
+		&hint_eth_ipv4},
+	{pattern_eth_ipv4_udp,		    ICE_INSET_NONE,
+		&hint_eth_ipv4_udp},
+	{pattern_eth_ipv4_tcp,		    ICE_INSET_NONE,
+		&hint_eth_ipv4_tcp},
+	{pattern_eth_ipv4_sctp,		    ICE_INSET_NONE,
+		&hint_eth_ipv4_sctp},
+	{pattern_eth_ipv4_gtpu_ipv4,	    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_ipv4},
+	{pattern_eth_ipv4_gtpu_ipv4_udp,    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_ipv4_udp},
+	{pattern_eth_ipv4_gtpu_ipv4_tcp,    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_ipv4_tcp},
+	{pattern_eth_ipv4_gtpu_ipv6,	    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_ipv6},
+	{pattern_eth_ipv4_gtpu_ipv6_udp,    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_ipv6_udp},
+	{pattern_eth_ipv4_gtpu_ipv6_tcp,    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_ipv6_tcp},
+	{pattern_eth_ipv6_gtpu_ipv4,	    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_ipv4},
+	{pattern_eth_ipv6_gtpu_ipv4_udp,    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_ipv4_udp},
+	{pattern_eth_ipv6_gtpu_ipv4_tcp,    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_ipv4_tcp},
+	{pattern_eth_ipv6_gtpu_ipv6,	    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_ipv6},
+	{pattern_eth_ipv6_gtpu_ipv6_udp,    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_ipv6_udp},
+	{pattern_eth_ipv6_gtpu_ipv6_tcp,    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_ipv6_tcp},
+	{pattern_eth_ipv4_gtpu_eh_ipv4,	    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_eh_ipv4},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_eh_ipv4_udp},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_eh_ipv4_tcp},
+	{pattern_eth_ipv4_gtpu_eh_ipv6,	    ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_eh_ipv6},
+	{pattern_eth_ipv4_gtpu_eh_ipv6_udp, ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_eh_ipv6_udp},
+	{pattern_eth_ipv4_gtpu_eh_ipv6_tcp, ICE_INSET_NONE,
+		&hint_eth_ipv4_gtpu_eh_ipv6_tcp},
+	{pattern_eth_ipv6_gtpu_eh_ipv4,	    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_eh_ipv4},
+	{pattern_eth_ipv6_gtpu_eh_ipv4_udp, ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_eh_ipv4_udp},
+	{pattern_eth_ipv6_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_eh_ipv4_tcp},
+	{pattern_eth_ipv6_gtpu_eh_ipv6,	    ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_eh_ipv6},
+	{pattern_eth_ipv6_gtpu_eh_ipv6_udp, ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_eh_ipv6_udp},
+	{pattern_eth_ipv6_gtpu_eh_ipv6_tcp, ICE_INSET_NONE,
+		&hint_eth_ipv6_gtpu_eh_ipv6_tcp},
+	{pattern_eth_ipv4_esp,		    ICE_INSET_NONE,
+		&hint_eth_ipv4_esp},
+	{pattern_eth_ipv4_udp_esp,	    ICE_INSET_NONE,
+		&hint_eth_ipv4_udp_esp},
+	{pattern_eth_ipv4_ah,		    ICE_INSET_NONE,
+		&hint_eth_ipv4_ah},
+	{pattern_eth_vlan_ipv4,		    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv4},
+	{pattern_eth_vlan_ipv4_udp,	    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv4_udp},
+	{pattern_eth_vlan_ipv4_tcp,	    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv4_tcp},
+	{pattern_eth_vlan_ipv4_sctp,	    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv4_sctp},
+	{pattern_eth_ipv6,		    ICE_INSET_NONE,
+		&hint_eth_ipv6},
+	{pattern_eth_ipv6_udp,		    ICE_INSET_NONE,
+		&hint_eth_ipv6_udp},
+	{pattern_eth_ipv6_tcp,		    ICE_INSET_NONE,
+		&hint_eth_ipv6_tcp},
+	{pattern_eth_ipv6_sctp,		    ICE_INSET_NONE,
+		&hint_eth_ipv6_sctp},
+	{pattern_eth_ipv6_esp,		    ICE_INSET_NONE,
+		&hint_eth_ipv6_esp},
+	{pattern_eth_ipv6_udp_esp,	    ICE_INSET_NONE,
+		&hint_eth_ipv6_udp_esp},
+	{pattern_eth_ipv6_ah,		    ICE_INSET_NONE,
+		&hint_eth_ipv6_ah},
+	{pattern_eth_vlan_ipv6,		    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv6},
+	{pattern_eth_vlan_ipv6_udp,	    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv6_udp},
+	{pattern_eth_vlan_ipv6_tcp,	    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv6_tcp},
+	{pattern_eth_vlan_ipv6_sctp,	    ICE_INSET_NONE,
+		&hint_eth_vlan_ipv6_sctp},
+};
+
 /**
  * The first member is input set combination,
  * the second member is hash fields.
@@ -932,6 +1030,15 @@ static struct ice_flow_parser ice_hash_parser_comms = {
 	.stage = ICE_FLOW_STAGE_RSS,
 };
 
+/* Register parser for wireless edge package. */
+static struct ice_flow_parser ice_hash_parser_wireless_edge = {
+	.engine = &ice_hash_engine,
+	.array = ice_hash_pattern_list_wireless_edge,
+	.array_len = RTE_DIM(ice_hash_pattern_list_wireless_edge),
+	.parse_pattern_action = ice_hash_parse_pattern_action,
+	.stage = ICE_FLOW_STAGE_RSS,
+};
+
 RTE_INIT(ice_hash_engine_init)
 {
 	struct ice_flow_engine *engine = &ice_hash_engine;
@@ -950,6 +1057,8 @@ ice_hash_init(struct ice_adapter *ad)
 		parser = &ice_hash_parser_os;
 	else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		parser = &ice_hash_parser_comms;
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+		parser = &ice_hash_parser_wireless_edge;
 	else
 		return -EINVAL;
 
@@ -1356,6 +1465,8 @@ ice_hash_uninit(struct ice_adapter *ad)
 		ice_unregister_parser(&ice_hash_parser_os, ad);
 	else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		ice_unregister_parser(&ice_hash_parser_comms, ad);
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+		ice_unregister_parser(&ice_hash_parser_wireless_edge, ad);
 }
 
 static void
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index d052bd0f1b..0cf7d6abb8 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1948,8 +1948,40 @@ ice_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_UNKNOWN
 	};
 
+	static const uint32_t ptypes_wireless_edge[] = {
+		/* refers to ice_get_default_pkt_type() */
+		RTE_PTYPE_L2_ETHER,
+		RTE_PTYPE_L2_ETHER_TIMESYNC,
+		RTE_PTYPE_L2_ETHER_LLDP,
+		RTE_PTYPE_L2_ETHER_ARP,
+		RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
+		RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
+		RTE_PTYPE_L4_FRAG,
+		RTE_PTYPE_L4_ICMP,
+		RTE_PTYPE_L4_NONFRAG,
+		RTE_PTYPE_L4_SCTP,
+		RTE_PTYPE_L4_TCP,
+		RTE_PTYPE_L4_UDP,
+		RTE_PTYPE_TUNNEL_GRENAT,
+		RTE_PTYPE_TUNNEL_IP,
+		RTE_PTYPE_INNER_L2_ETHER,
+		RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN,
+		RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN,
+		RTE_PTYPE_INNER_L4_FRAG,
+		RTE_PTYPE_INNER_L4_ICMP,
+		RTE_PTYPE_INNER_L4_NONFRAG,
+		RTE_PTYPE_INNER_L4_SCTP,
+		RTE_PTYPE_INNER_L4_TCP,
+		RTE_PTYPE_INNER_L4_UDP,
+		RTE_PTYPE_TUNNEL_GTPC,
+		RTE_PTYPE_TUNNEL_GTPU,
+		RTE_PTYPE_UNKNOWN
+	};
+
 	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		ptypes = ptypes_comms;
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+		ptypes = ptypes_wireless_edge;
 	else
 		ptypes = ptypes_os;
 
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 8cba6eb7b1..dc8578d5aa 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -139,8 +139,10 @@ struct sw_meta {
 
 static struct ice_flow_parser ice_switch_dist_parser_os;
 static struct ice_flow_parser ice_switch_dist_parser_comms;
+static struct ice_flow_parser ice_switch_dist_parser_wireless_edge;
 static struct ice_flow_parser ice_switch_perm_parser_os;
 static struct ice_flow_parser ice_switch_perm_parser_comms;
+static struct ice_flow_parser ice_switch_perm_parser_wireless_edge;
 
 static struct
 ice_pattern_match_item ice_switch_pattern_dist_os[] = {
@@ -264,6 +266,54 @@ ice_pattern_match_item ice_switch_pattern_dist_comms[] = {
 			ICE_INSET_NONE, ICE_INSET_NONE},
 };
 
+static struct
+ice_pattern_match_item ice_switch_pattern_dist_wireless_edge[] = {
+	{pattern_ethertype,
+			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
+	{pattern_ethertype_vlan,
+			ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE},
+	{pattern_eth_arp,
+			ICE_INSET_NONE, ICE_INSET_NONE},
+	{pattern_eth_ipv4,
+			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp,
+			ICE_SW_INSET_MAC_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_tcp,
+			ICE_SW_INSET_MAC_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv6,
+			ICE_SW_INSET_MAC_IPV6, ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp,
+			ICE_SW_INSET_MAC_IPV6_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv6_tcp,
+			ICE_SW_INSET_MAC_IPV6_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
+			ICE_SW_INSET_DIST_VXLAN_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
+			ICE_SW_INSET_DIST_VXLAN_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
+			ICE_SW_INSET_DIST_VXLAN_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4,
+			ICE_SW_INSET_DIST_NVGRE_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4_udp,
+			ICE_SW_INSET_DIST_NVGRE_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
+			ICE_SW_INSET_DIST_NVGRE_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_esp,
+			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_esp,
+			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv6_esp,
+			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp_esp,
+			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_ah,
+			ICE_SW_INSET_MAC_IPV4_AH, ICE_INSET_NONE},
+	{pattern_eth_ipv6_ah,
+			ICE_SW_INSET_MAC_IPV6_AH, ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp_ah,
+			ICE_INSET_NONE, ICE_INSET_NONE},
+};
+
 static struct
 ice_pattern_match_item ice_switch_pattern_perm_os[] = {
 	{pattern_ethertype,
@@ -386,6 +436,54 @@ ice_pattern_match_item ice_switch_pattern_perm_comms[] = {
 			ICE_INSET_NONE, ICE_INSET_NONE},
 };
 
+static struct
+ice_pattern_match_item ice_switch_pattern_perm_wireless_edge[] = {
+	{pattern_ethertype,
+			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
+	{pattern_ethertype_vlan,
+			ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE},
+	{pattern_eth_arp,
+		ICE_INSET_NONE, ICE_INSET_NONE},
+	{pattern_eth_ipv4,
+			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp,
+			ICE_SW_INSET_MAC_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_tcp,
+			ICE_SW_INSET_MAC_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv6,
+			ICE_SW_INSET_MAC_IPV6, ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp,
+			ICE_SW_INSET_MAC_IPV6_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv6_tcp,
+			ICE_SW_INSET_MAC_IPV6_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
+			ICE_SW_INSET_PERM_TUNNEL_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4,
+			ICE_SW_INSET_PERM_TUNNEL_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4_udp,
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_esp,
+			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_esp,
+			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv6_esp,
+			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp_esp,
+			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_ah,
+			ICE_SW_INSET_MAC_IPV4_AH, ICE_INSET_NONE},
+	{pattern_eth_ipv6_ah,
+			ICE_SW_INSET_MAC_IPV6_AH, ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp_ah,
+			ICE_INSET_NONE, ICE_INSET_NONE},
+};
+
 static int
 ice_switch_create(struct ice_adapter *ad,
 		struct rte_flow *flow,
@@ -1861,6 +1959,8 @@ ice_switch_init(struct ice_adapter *ad)
 
 	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		dist_parser = &ice_switch_dist_parser_comms;
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+		dist_parser = &ice_switch_dist_parser_wireless_edge;
 	else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
 		dist_parser = &ice_switch_dist_parser_os;
 	else
@@ -1869,6 +1969,8 @@ ice_switch_init(struct ice_adapter *ad)
 	if (ad->devargs.pipe_mode_support) {
 		if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 			perm_parser = &ice_switch_perm_parser_comms;
+		else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+			perm_parser = &ice_switch_perm_parser_wireless_edge;
 		else
 			perm_parser = &ice_switch_perm_parser_os;
 
@@ -1887,6 +1989,8 @@ ice_switch_uninit(struct ice_adapter *ad)
 
 	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		dist_parser = &ice_switch_dist_parser_comms;
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+		dist_parser = &ice_switch_dist_parser_wireless_edge;
 	else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
 		dist_parser = &ice_switch_dist_parser_os;
 	else
@@ -1895,6 +1999,8 @@ ice_switch_uninit(struct ice_adapter *ad)
 	if (ad->devargs.pipe_mode_support) {
 		if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 			perm_parser = &ice_switch_perm_parser_comms;
+		else if (ad->active_pkg_type == ICE_PKG_TYPE_WIRELESS_EDGE)
+			perm_parser = &ice_switch_perm_parser_wireless_edge;
 		else
 			perm_parser = &ice_switch_perm_parser_os;
 
@@ -1934,6 +2040,15 @@ ice_flow_parser ice_switch_dist_parser_comms = {
 	.stage = ICE_FLOW_STAGE_DISTRIBUTOR,
 };
 
+static struct
+ice_flow_parser ice_switch_dist_parser_wireless_edge = {
+	.engine = &ice_switch_engine,
+	.array = ice_switch_pattern_dist_wireless_edge,
+	.array_len = RTE_DIM(ice_switch_pattern_dist_wireless_edge),
+	.parse_pattern_action = ice_switch_parse_pattern_action,
+	.stage = ICE_FLOW_STAGE_DISTRIBUTOR,
+};
+
 static struct
 ice_flow_parser ice_switch_perm_parser_os = {
 	.engine = &ice_switch_engine,
@@ -1952,6 +2067,15 @@ ice_flow_parser ice_switch_perm_parser_comms = {
 	.stage = ICE_FLOW_STAGE_PERMISSION,
 };
 
+static struct
+ice_flow_parser ice_switch_perm_parser_wireless_edge = {
+	.engine = &ice_switch_engine,
+	.array = ice_switch_pattern_perm_wireless_edge,
+	.array_len = RTE_DIM(ice_switch_pattern_perm_wireless_edge),
+	.parse_pattern_action = ice_switch_parse_pattern_action,
+	.stage = ICE_FLOW_STAGE_PERMISSION,
+};
+
 RTE_INIT(ice_sw_engine_init)
 {
 	struct ice_flow_engine *engine = &ice_switch_engine;
-- 
2.20.1


  parent reply	other threads:[~2020-12-16  9:02 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  8:58 [dpdk-dev] [dpdk-dev 21.02 0/5] enable UDP ecpri configure in dcf Jeff Guo
2020-12-16  8:58 ` [dpdk-dev] [dpdk-dev 21.02 1/5] ethdev: add new tunnel type for ecpri Jeff Guo
2020-12-23  9:28   ` Zhang, Qi Z
2020-12-16  8:58 ` [dpdk-dev] [dpdk-dev 21.02 2/5] net/ice/base: add new UDP " Jeff Guo
2020-12-16  8:58 ` Jeff Guo [this message]
2020-12-16  8:58 ` [dpdk-dev] [dpdk-dev 21.02 4/5] net/ice: enable ecpri tunnel port configure in dcf Jeff Guo
2020-12-16  8:58 ` [dpdk-dev] [dpdk-dev 21.02 5/5] app/testpmd: add new UDP tunnel port for ecpri Jeff Guo
2020-12-24  6:59 ` [dpdk-dev] [dpdk-dev v2 0/2] " Jeff Guo
2020-12-24  6:59   ` [dpdk-dev] [dpdk-dev v2 1/2] ethdev: add new tunnel type " Jeff Guo
2021-01-06 22:12     ` Thomas Monjalon
2021-01-07  9:32       ` Guo, Jia
2021-01-07 10:09         ` Andrew Rybchenko
2021-01-07 10:11         ` Thomas Monjalon
2021-01-07 12:47           ` Zhang, Qi Z
2021-01-07 13:33             ` Thomas Monjalon
2021-01-07 13:45               ` David Marchand
2021-01-07 14:27                 ` Dodji Seketeli
2021-01-07 15:24               ` Zhang, Qi Z
2021-01-07 16:58                 ` Thomas Monjalon
2021-01-08  1:41                   ` Zhang, Qi Z
2021-01-08  8:57                     ` Ferruh Yigit
2021-01-08  9:29                       ` Andrew Rybchenko
2021-01-08 10:36                         ` Thomas Monjalon
2021-01-09  1:01                           ` Zhang, Qi Z
2021-01-10 10:46                             ` Ori Kam
2021-01-11  9:23                               ` Thomas Monjalon
2021-01-11 11:26                                 ` Zhang, Qi Z
2021-01-11 11:37                                   ` Thomas Monjalon
2021-01-11 14:02                                     ` Zhang, Qi Z
2021-01-11 14:53                                       ` Thomas Monjalon
2021-01-12  2:14                                         ` Zhang, Qi Z
2021-01-15 15:15                                           ` Thomas Monjalon
2021-01-08  9:22               ` Ferruh Yigit
2021-01-08 10:23                 ` Thomas Monjalon
2021-01-08 10:43                   ` Ferruh Yigit
2021-01-08 14:06                     ` Thomas Monjalon
2021-01-08 14:07                       ` Kinsella, Ray
2021-01-08 14:10                         ` Thomas Monjalon
2021-01-08 12:38                   ` Kinsella, Ray
2021-01-08 14:27                     ` Ferruh Yigit
2021-01-08 14:31                       ` Kinsella, Ray
2021-01-08 17:34                       ` Kinsella, Ray
2021-01-14 14:34     ` Ferruh Yigit
2021-01-15  2:51       ` Guo, Jia
2020-12-24  6:59   ` [dpdk-dev] [dpdk-dev v2 2/2] app/testpmd: add new UDP tunnel port " Jeff Guo
2021-01-14 14:33     ` Ferruh Yigit
2021-01-15  2:13       ` Guo, Jia
2020-12-24 13:40   ` [dpdk-dev] [dpdk-dev v2 0/2] " Zhang, Qi Z
2020-12-24  7:01 ` [dpdk-dev] [dpdk-dev v2 0/6] enable UDP ecpri configure in dcf Jeff Guo
2020-12-24  7:01   ` [dpdk-dev] [dpdk-dev v2 1/6] net/ice/base: add package PTYPE enable information Jeff Guo
2020-12-24  7:01   ` [dpdk-dev] [dpdk-dev v2 2/6] net/ice: refactor package type parsing Jeff Guo
2020-12-24  7:01   ` [dpdk-dev] [dpdk-dev v2 3/6] net/ice/base: add new UDP tunnel type for ecpri Jeff Guo
2020-12-24  7:01   ` [dpdk-dev] [dpdk-dev v2 4/6] net/ice: add PTYPE mapping " Jeff Guo
2020-12-24  7:01   ` [dpdk-dev] [dpdk-dev v2 5/6] net/iavf: " Jeff Guo
2020-12-24  7:01   ` [dpdk-dev] [dpdk-dev v2 6/6] net/ice: enable ecpri tunnel port configure in dcf Jeff Guo
2021-01-12  9:32 ` [dpdk-dev] [dpdk-dev v3 0/3] net/ice: refactor PTYPE parsing Jeff Guo
2021-01-12  9:32   ` [dpdk-dev] [dpdk-dev v3 1/3] net/ice/base: add package PTYPE enable information Jeff Guo
2021-01-12  9:32   ` [dpdk-dev] [dpdk-dev v3 2/3] net/ice/base: add PTYPE value Jeff Guo
2021-01-12  9:32   ` [dpdk-dev] [dpdk-dev v3 3/3] net/ice: refactor PTYPE parsing Jeff Guo
2021-01-13  5:31 ` [dpdk-dev] [dpdk-dev v4 0/2] " Jeff Guo
2021-01-13  5:31   ` [dpdk-dev] [dpdk-dev v4 1/2] net/ice/base: add PTYPE value Jeff Guo
2021-01-13  5:31   ` [dpdk-dev] [dpdk-dev v4 2/2] net/ice: refactor PTYPE parsing Jeff Guo
2021-01-13  6:07   ` [dpdk-dev] [dpdk-dev v4 0/2] " Zhang, Qi Z
2021-01-13 14:05 ` [dpdk-dev] [dpdk-dev v3 0/3] enable UDP ecpri configure in dcf Jeff Guo
2021-01-13 14:05   ` [dpdk-dev] [dpdk-dev v3 1/3] net/ice: add PTYPE mapping for ecpri Jeff Guo
2021-01-13 14:05   ` [dpdk-dev] [dpdk-dev v3 2/3] net/iavf: " Jeff Guo
2021-01-13 14:05   ` [dpdk-dev] [dpdk-dev v3 3/3] net/ice: enable ecpri tunnel port configure in dcf Jeff Guo
2021-01-14  4:18   ` [dpdk-dev] [dpdk-dev v3 0/3] enable UDP ecpri " Zhang, Qi Z
2021-01-18  9:28     ` Ferruh Yigit
2021-01-15  2:42 ` [dpdk-dev] [dpdk-dev v3 0/2] add new UDP tunnel port for ecpri Jeff Guo
2021-01-15  2:42   ` [dpdk-dev] [dpdk-dev v3 1/2] ethdev: add new tunnel type " Jeff Guo
2021-01-15  2:42   ` [dpdk-dev] [dpdk-dev v3 2/2] app/testpmd: add new UDP tunnel port " Jeff Guo
2021-01-15  4:35 ` [dpdk-dev] [dpdk-dev v4 0/2] add new UDP tunnel port configure for eCPRI Jeff Guo
2021-01-15  4:35   ` [dpdk-dev] [dpdk-dev v4 1/2] ethdev: add new tunnel type " Jeff Guo
2021-01-15  4:35   ` [dpdk-dev] [dpdk-dev v4 2/2] app/testpmd: add new UDP tunnel port " Jeff Guo
2021-01-15  5:15 ` [dpdk-dev] [dpdk-dev v5 0/2] add new UDP tunnel port configure " Jeff Guo
2021-01-15  5:15   ` [dpdk-dev] [dpdk-dev v5 1/2] ethdev: add new tunnel type " Jeff Guo
2021-01-15 12:23     ` Ferruh Yigit
2021-01-18  2:40       ` Guo, Jia
2021-01-15  5:15   ` [dpdk-dev] [dpdk-dev v5 2/2] app/testpmd: add new UDP tunnel port " Jeff Guo
2021-01-15 12:24     ` Ferruh Yigit
2021-01-15 12:28   ` [dpdk-dev] [dpdk-dev v5 0/2] add new UDP tunnel port configure " Ferruh Yigit
2021-01-19  3:59 ` [dpdk-dev] [dpdk-dev v4] net/ice: enable eCPRI tunnel port configure in dcf Jeff Guo
2021-01-19  4:15 ` Jeff Guo
2021-01-19  4:19 ` [dpdk-dev] [dpdk-dev v5] " Jeff Guo
2021-01-20 10:14   ` Zhang, Qi Z
2021-01-20 10:19     ` Thomas Monjalon
2021-01-20 10:23       ` Zhang, Qi Z
2021-01-20 10:30         ` Thomas Monjalon
2021-01-20 10:36           ` Zhang, Qi Z
2021-01-20 10:39             ` Thomas Monjalon

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=20201216085854.7842-4-jia.guo@intel.com \
    --to=jia.guo@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@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

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