diff mbox series

[v4,1/2] net/ice: clean redundant macro definition of filters

Message ID 20210426053814.984788-1-yuying.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series [v4,1/2] net/ice: clean redundant macro definition of filters | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Yuying Zhang April 26, 2021, 5:38 a.m. UTC
The input set has been divided into two parts to distinguish
inner and outer field. ICE_INSET_TUN_* is the same as non tunnel
macro definition. Clean redundant ICE_INSET_TUN_* codes.

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c   |  22 ++---
 drivers/net/ice/ice_generic_flow.h  |  61 +------------
 drivers/net/ice/ice_switch_filter.c | 128 ++++++++++++++--------------
 3 files changed, 78 insertions(+), 133 deletions(-)

Comments

Qi Zhang April 26, 2021, 8:04 a.m. UTC | #1
> -----Original Message-----
> From: Zhang, Yuying <yuying.zhang@intel.com>
> Sent: Monday, April 26, 2021 1:38 PM
> To: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>
> Cc: Yan, Zhirun <zhirun.yan@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Zhang, Yuying <yuying.zhang@intel.com>
> Subject: [PATCH v4 1/2] net/ice: clean redundant macro definition of filters
> 
> The input set has been divided into two parts to distinguish inner and outer
> field. ICE_INSET_TUN_* is the same as non tunnel macro definition. Clean
> redundant ICE_INSET_TUN_* codes.
> 
> Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 3b8ea32b1a..ad2dc40815 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -72,7 +72,7 @@ 
 
 #define ICE_FDIR_INSET_ETH_IPV4_VXLAN (\
 	ICE_FDIR_INSET_ETH | ICE_FDIR_INSET_ETH_IPV4 | \
-	ICE_INSET_TUN_VXLAN_VNI)
+	ICE_INSET_VXLAN_VNI)
 
 #define ICE_FDIR_INSET_IPV4_GTPU (\
 	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID)
@@ -893,17 +893,17 @@  ice_fdir_input_set_parse(uint64_t inset, enum ice_flow_field *field)
 		{ICE_INSET_UDP_DST_PORT, ICE_FLOW_FIELD_IDX_UDP_DST_PORT},
 		{ICE_INSET_SCTP_SRC_PORT, ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT},
 		{ICE_INSET_SCTP_DST_PORT, ICE_FLOW_FIELD_IDX_SCTP_DST_PORT},
-		{ICE_INSET_TUN_IPV4_SRC, ICE_FLOW_FIELD_IDX_IPV4_SA},
-		{ICE_INSET_TUN_IPV4_DST, ICE_FLOW_FIELD_IDX_IPV4_DA},
-		{ICE_INSET_TUN_TCP_SRC_PORT, ICE_FLOW_FIELD_IDX_TCP_SRC_PORT},
-		{ICE_INSET_TUN_TCP_DST_PORT, ICE_FLOW_FIELD_IDX_TCP_DST_PORT},
-		{ICE_INSET_TUN_UDP_SRC_PORT, ICE_FLOW_FIELD_IDX_UDP_SRC_PORT},
-		{ICE_INSET_TUN_UDP_DST_PORT, ICE_FLOW_FIELD_IDX_UDP_DST_PORT},
-		{ICE_INSET_TUN_SCTP_SRC_PORT, ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT},
-		{ICE_INSET_TUN_SCTP_DST_PORT, ICE_FLOW_FIELD_IDX_SCTP_DST_PORT},
+		{ICE_INSET_IPV4_SRC, ICE_FLOW_FIELD_IDX_IPV4_SA},
+		{ICE_INSET_IPV4_DST, ICE_FLOW_FIELD_IDX_IPV4_DA},
+		{ICE_INSET_TCP_SRC_PORT, ICE_FLOW_FIELD_IDX_TCP_SRC_PORT},
+		{ICE_INSET_TCP_DST_PORT, ICE_FLOW_FIELD_IDX_TCP_DST_PORT},
+		{ICE_INSET_UDP_SRC_PORT, ICE_FLOW_FIELD_IDX_UDP_SRC_PORT},
+		{ICE_INSET_UDP_DST_PORT, ICE_FLOW_FIELD_IDX_UDP_DST_PORT},
+		{ICE_INSET_SCTP_SRC_PORT, ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT},
+		{ICE_INSET_SCTP_DST_PORT, ICE_FLOW_FIELD_IDX_SCTP_DST_PORT},
 		{ICE_INSET_GTPU_TEID, ICE_FLOW_FIELD_IDX_GTPU_IP_TEID},
 		{ICE_INSET_GTPU_QFI, ICE_FLOW_FIELD_IDX_GTPU_EH_QFI},
-		{ICE_INSET_TUN_VXLAN_VNI, ICE_FLOW_FIELD_IDX_VXLAN_VNI},
+		{ICE_INSET_VXLAN_VNI, ICE_FLOW_FIELD_IDX_VXLAN_VNI},
 	};
 
 	for (i = 0, j = 0; i < RTE_DIM(ice_inset_map); i++) {
@@ -1916,7 +1916,7 @@  ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 			}
 
 			if (vxlan_mask->hdr.vx_vni)
-				*input_set |= ICE_INSET_TUN_VXLAN_VNI;
+				*input_set |= ICE_INSET_VXLAN_VNI;
 
 			filter->input.vxlan_data.vni = vxlan_spec->hdr.vx_vni;
 
diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h
index a4d0b6671d..b7634b9662 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -92,64 +92,9 @@ 
 
 /* tunnel */
 
-#define ICE_INSET_TUN_SMAC \
-	(ICE_PROT_MAC | ICE_SMAC)
-#define ICE_INSET_TUN_DMAC \
-	(ICE_PROT_MAC | ICE_DMAC)
-
-#define ICE_INSET_TUN_IPV4_SRC \
-	(ICE_PROT_IPV4 | ICE_IP_SRC)
-#define ICE_INSET_TUN_IPV4_DST \
-	(ICE_PROT_IPV4 | ICE_IP_DST)
-#define ICE_INSET_TUN_IPV4_TTL \
-	(ICE_PROT_IPV4 | ICE_IP_TTL)
-#define ICE_INSET_TUN_IPV4_PROTO \
-	(ICE_PROT_IPV4 | ICE_IP_PROTO)
-#define ICE_INSET_TUN_IPV4_TOS \
-	(ICE_PROT_IPV4 | ICE_IP_TOS)
-#define ICE_INSET_TUN_IPV6_SRC \
-	(ICE_PROT_IPV6 | ICE_IP_SRC)
-#define ICE_INSET_TUN_IPV6_DST \
-	(ICE_PROT_IPV6 | ICE_IP_DST)
-#define ICE_INSET_TUN_IPV6_HOP_LIMIT \
-	(ICE_PROT_IPV6 | ICE_IP_TTL)
-#define ICE_INSET_TUN_IPV6_NEXT_HDR \
-	(ICE_PROT_IPV6 | ICE_IP_PROTO)
-#define ICE_INSET_TUN_IPV6_TC \
-	(ICE_PROT_IPV6 | ICE_IP_TOS)
-
-#define ICE_INSET_TUN_TCP_SRC_PORT \
-	(ICE_PROT_TCP | ICE_SPORT)
-#define ICE_INSET_TUN_TCP_DST_PORT \
-	(ICE_PROT_TCP | ICE_DPORT)
-#define ICE_INSET_TUN_UDP_SRC_PORT \
-	(ICE_PROT_UDP | ICE_SPORT)
-#define ICE_INSET_TUN_UDP_DST_PORT \
-	(ICE_PROT_UDP | ICE_DPORT)
-#define ICE_INSET_TUN_SCTP_SRC_PORT \
-	(ICE_PROT_SCTP | ICE_SPORT)
-#define ICE_INSET_TUN_SCTP_DST_PORT \
-	(ICE_PROT_SCTP | ICE_DPORT)
-#define ICE_INSET_TUN_ICMP4_SRC_PORT \
-	(ICE_PROT_ICMP4 | ICE_SPORT)
-#define ICE_INSET_TUN_ICMP4_DST_PORT \
-	(ICE_PROT_ICMP4 | ICE_DPORT)
-#define ICE_INSET_TUN_ICMP6_SRC_PORT \
-	(ICE_PROT_ICMP6 | ICE_SPORT)
-#define ICE_INSET_TUN_ICMP6_DST_PORT \
-	(ICE_PROT_ICMP6 | ICE_DPORT)
-#define ICE_INSET_TUN_ICMP4_TYPE \
-	(ICE_PROT_ICMP4 | ICE_ICMP_TYPE)
-#define ICE_INSET_TUN_ICMP4_CODE \
-	(ICE_PROT_ICMP4 | ICE_ICMP_CODE)
-#define ICE_INSET_TUN_ICMP6_TYPE \
-	(ICE_PROT_ICMP6 | ICE_ICMP_TYPE)
-#define ICE_INSET_TUN_ICMP6_CODE \
-	(ICE_PROT_ICMP6 | ICE_ICMP_CODE)
-
-#define ICE_INSET_TUN_VXLAN_VNI \
+#define ICE_INSET_VXLAN_VNI \
 	(ICE_PROT_VXLAN | ICE_VXLAN_VNI)
-#define ICE_INSET_TUN_NVGRE_TNI \
+#define ICE_INSET_NVGRE_TNI \
 	(ICE_PROT_NVGRE | ICE_NVGRE_TNI)
 #define ICE_INSET_GTPU_TEID \
 	(ICE_PROT_GTPU | ICE_GTPU_TEID)
@@ -473,8 +418,8 @@  enum ice_flow_classification_stage {
 /* pattern structure */
 struct ice_pattern_match_item {
 	enum rte_flow_item_type *pattern_list;
-	uint64_t input_set_mask_o; /* used for tunnel outer or non tunnel fields */
 	/* pattern_list must end with RTE_FLOW_ITEM_TYPE_END */
+	uint64_t input_set_mask_o; /* used for tunnel outer or non tunnel fields */
 	uint64_t input_set_mask_i; /* only used for tunnel inner fields */
 	void *meta;
 };
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 0493e4dee2..aa395094ca 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -68,38 +68,38 @@ 
 	ICE_INSET_IPV6_HOP_LIMIT | ICE_INSET_IPV6_TC | \
 	ICE_INSET_UDP_DST_PORT | ICE_INSET_UDP_SRC_PORT)
 #define ICE_SW_INSET_DIST_NVGRE_IPV4 ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_DMAC | ICE_INSET_TUN_NVGRE_TNI | ICE_INSET_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_DMAC | ICE_INSET_NVGRE_TNI | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_DIST_VXLAN_IPV4 ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_DMAC | ICE_INSET_TUN_VXLAN_VNI | ICE_INSET_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_DMAC | ICE_INSET_VXLAN_VNI | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_DIST_NVGRE_IPV4_TCP ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT | \
-	ICE_INSET_TUN_DMAC | ICE_INSET_TUN_NVGRE_TNI | ICE_INSET_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT | \
+	ICE_INSET_DMAC | ICE_INSET_NVGRE_TNI | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_DIST_NVGRE_IPV4_UDP ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT | \
-	ICE_INSET_TUN_DMAC | ICE_INSET_TUN_NVGRE_TNI | ICE_INSET_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT | \
+	ICE_INSET_DMAC | ICE_INSET_NVGRE_TNI | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_DIST_VXLAN_IPV4_TCP ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT | \
-	ICE_INSET_TUN_DMAC | ICE_INSET_TUN_VXLAN_VNI | ICE_INSET_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT | \
+	ICE_INSET_DMAC | ICE_INSET_VXLAN_VNI | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_DIST_VXLAN_IPV4_UDP ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT | \
-	ICE_INSET_TUN_DMAC | ICE_INSET_TUN_VXLAN_VNI | ICE_INSET_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT | \
+	ICE_INSET_DMAC | ICE_INSET_VXLAN_VNI | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_PERM_TUNNEL_IPV4 ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_IPV4_PROTO | ICE_INSET_TUN_IPV4_TOS)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_IPV4_PROTO | ICE_INSET_IPV4_TOS)
 #define ICE_SW_INSET_PERM_TUNNEL_IPV4_TCP ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT | \
-	ICE_INSET_TUN_IPV4_TOS)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT | \
+	ICE_INSET_IPV4_TOS)
 #define ICE_SW_INSET_PERM_TUNNEL_IPV4_UDP ( \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT | \
-	ICE_INSET_TUN_IPV4_TOS)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT | \
+	ICE_INSET_IPV4_TOS)
 #define ICE_SW_INSET_MAC_PPPOE  ( \
 	ICE_INSET_VLAN_OUTER | ICE_INSET_VLAN_INNER | \
 	ICE_INSET_DMAC | ICE_INSET_ETHERTYPE | ICE_INSET_PPPOE_SESSION)
@@ -143,72 +143,72 @@ 
 	ICE_SW_INSET_MAC_IPV6 | ICE_INSET_GTPU_TEID)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_IPV4 ( \
 	ICE_INSET_DMAC | ICE_INSET_GTPU_TEID | \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV4 ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_IPV4 | ICE_INSET_GTPU_QFI)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_IPV6 ( \
 	ICE_INSET_DMAC | ICE_INSET_GTPU_TEID | \
-	ICE_INSET_TUN_IPV6_SRC | ICE_INSET_TUN_IPV6_DST)
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV6 ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_IPV6 | ICE_INSET_GTPU_QFI)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_IPV4 ( \
 	ICE_INSET_DMAC | ICE_INSET_GTPU_TEID | \
-	ICE_INSET_TUN_IPV4_SRC | ICE_INSET_TUN_IPV4_DST)
+	ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV4 ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_IPV4 | ICE_INSET_GTPU_QFI)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_IPV6 ( \
 	ICE_INSET_DMAC | ICE_INSET_GTPU_TEID | \
-	ICE_INSET_TUN_IPV6_SRC | ICE_INSET_TUN_IPV6_DST)
+	ICE_INSET_IPV6_SRC | ICE_INSET_IPV6_DST)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV6 ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_IPV6 | ICE_INSET_GTPU_QFI)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_IPV4_UDP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_IPV4 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV4_UDP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV4 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_IPV4_TCP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_IPV4 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV4_TCP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV4 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_IPV6_UDP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_IPV6 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV6_UDP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV6 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_IPV6_TCP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_IPV6 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV6_TCP ( \
 	ICE_SW_INSET_MAC_IPV4_GTPU_EH_IPV6 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_IPV4_UDP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_IPV4 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV4_UDP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV4 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_IPV4_TCP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_IPV4 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV4_TCP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV4 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_IPV6_UDP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_IPV6 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV6_UDP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV6 | \
-	ICE_INSET_TUN_UDP_SRC_PORT | ICE_INSET_TUN_UDP_DST_PORT)
+	ICE_INSET_UDP_SRC_PORT | ICE_INSET_UDP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_IPV6_TCP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_IPV6 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 #define ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV6_TCP ( \
 	ICE_SW_INSET_MAC_IPV6_GTPU_EH_IPV6 | \
-	ICE_INSET_TUN_TCP_SRC_PORT | ICE_INSET_TUN_TCP_DST_PORT)
+	ICE_INSET_TCP_SRC_PORT | ICE_INSET_TCP_DST_PORT)
 
 struct sw_meta {
 	struct ice_adv_lkup_elem *list;
@@ -553,7 +553,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				for (j = 0; j < RTE_ETHER_ADDR_LEN; j++) {
 					if (a[j] && tunnel_valid) {
 						input_set |=
-							ICE_INSET_TUN_SMAC;
+							ICE_INSET_SMAC;
 						break;
 					} else if (a[j]) {
 						input_set |=
@@ -564,7 +564,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				for (j = 0; j < RTE_ETHER_ADDR_LEN; j++) {
 					if (b[j] && tunnel_valid) {
 						input_set |=
-							ICE_INSET_TUN_DMAC;
+							ICE_INSET_DMAC;
 						break;
 					} else if (b[j]) {
 						input_set |=
@@ -637,19 +637,19 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				if (tunnel_valid) {
 					if (ipv4_mask->hdr.type_of_service)
 						input_set |=
-							ICE_INSET_TUN_IPV4_TOS;
+							ICE_INSET_IPV4_TOS;
 					if (ipv4_mask->hdr.src_addr)
 						input_set |=
-							ICE_INSET_TUN_IPV4_SRC;
+							ICE_INSET_IPV4_SRC;
 					if (ipv4_mask->hdr.dst_addr)
 						input_set |=
-							ICE_INSET_TUN_IPV4_DST;
+							ICE_INSET_IPV4_DST;
 					if (ipv4_mask->hdr.time_to_live)
 						input_set |=
-							ICE_INSET_TUN_IPV4_TTL;
+							ICE_INSET_IPV4_TTL;
 					if (ipv4_mask->hdr.next_proto_id)
 						input_set |=
-						ICE_INSET_TUN_IPV4_PROTO;
+						ICE_INSET_IPV4_PROTO;
 				} else {
 					if (ipv4_mask->hdr.src_addr)
 						input_set |= ICE_INSET_IPV4_SRC;
@@ -729,7 +729,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 					if (ipv6_mask->hdr.src_addr[j] &&
 						tunnel_valid) {
 						input_set |=
-						ICE_INSET_TUN_IPV6_SRC;
+						ICE_INSET_IPV6_SRC;
 						break;
 					} else if (ipv6_mask->hdr.src_addr[j]) {
 						input_set |= ICE_INSET_IPV6_SRC;
@@ -740,7 +740,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 					if (ipv6_mask->hdr.dst_addr[j] &&
 						tunnel_valid) {
 						input_set |=
-						ICE_INSET_TUN_IPV6_DST;
+						ICE_INSET_IPV6_DST;
 						break;
 					} else if (ipv6_mask->hdr.dst_addr[j]) {
 						input_set |= ICE_INSET_IPV6_DST;
@@ -750,14 +750,14 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				if (ipv6_mask->hdr.proto &&
 					tunnel_valid)
 					input_set |=
-						ICE_INSET_TUN_IPV6_NEXT_HDR;
+						ICE_INSET_IPV6_NEXT_HDR;
 				else if (ipv6_mask->hdr.proto)
 					input_set |=
 						ICE_INSET_IPV6_NEXT_HDR;
 				if (ipv6_mask->hdr.hop_limits &&
 					tunnel_valid)
 					input_set |=
-						ICE_INSET_TUN_IPV6_HOP_LIMIT;
+						ICE_INSET_IPV6_HOP_LIMIT;
 				else if (ipv6_mask->hdr.hop_limits)
 					input_set |=
 						ICE_INSET_IPV6_HOP_LIMIT;
@@ -766,7 +766,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 						(RTE_IPV6_HDR_TC_MASK)) &&
 					tunnel_valid)
 					input_set |=
-							ICE_INSET_TUN_IPV6_TC;
+							ICE_INSET_IPV6_TC;
 				else if (ipv6_mask->hdr.vtc_flow &
 						rte_cpu_to_be_32
 						(RTE_IPV6_HDR_TC_MASK))
@@ -851,10 +851,10 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				if (tunnel_valid) {
 					if (udp_mask->hdr.src_port)
 						input_set |=
-						ICE_INSET_TUN_UDP_SRC_PORT;
+						ICE_INSET_UDP_SRC_PORT;
 					if (udp_mask->hdr.dst_port)
 						input_set |=
-						ICE_INSET_TUN_UDP_DST_PORT;
+						ICE_INSET_UDP_DST_PORT;
 				} else {
 					if (udp_mask->hdr.src_port)
 						input_set |=
@@ -912,10 +912,10 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				if (tunnel_valid) {
 					if (tcp_mask->hdr.src_port)
 						input_set |=
-						ICE_INSET_TUN_TCP_SRC_PORT;
+						ICE_INSET_TCP_SRC_PORT;
 					if (tcp_mask->hdr.dst_port)
 						input_set |=
-						ICE_INSET_TUN_TCP_DST_PORT;
+						ICE_INSET_TCP_DST_PORT;
 				} else {
 					if (tcp_mask->hdr.src_port)
 						input_set |=
@@ -959,10 +959,10 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				if (tunnel_valid) {
 					if (sctp_mask->hdr.src_port)
 						input_set |=
-						ICE_INSET_TUN_SCTP_SRC_PORT;
+						ICE_INSET_SCTP_SRC_PORT;
 					if (sctp_mask->hdr.dst_port)
 						input_set |=
-						ICE_INSET_TUN_SCTP_DST_PORT;
+						ICE_INSET_SCTP_DST_PORT;
 				} else {
 					if (sctp_mask->hdr.src_port)
 						input_set |=
@@ -1021,7 +1021,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 						(vxlan_mask->vni[1] << 8) |
 						vxlan_mask->vni[0];
 					input_set |=
-						ICE_INSET_TUN_VXLAN_VNI;
+						ICE_INSET_VXLAN_VNI;
 					input_set_byte += 2;
 				}
 				t++;
@@ -1059,7 +1059,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 						(nvgre_mask->tni[1] << 8) |
 						nvgre_mask->tni[0];
 					input_set |=
-						ICE_INSET_TUN_NVGRE_TNI;
+						ICE_INSET_NVGRE_TNI;
 					input_set_byte += 2;
 				}
 				t++;