From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26357A0548; Sun, 25 Apr 2021 15:40:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0873741139; Sun, 25 Apr 2021 15:40:27 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 7D5414110A for ; Sun, 25 Apr 2021 15:40:24 +0200 (CEST) IronPort-SDR: KGBckiIn1R3IpkV7OTPZIFXJEKcQ4ed24pk/WQPXHvhTenAmv9Bbxw+GyLejsh+PeTkHi9xohO 6w65ijFIzX9Q== X-IronPort-AV: E=McAfee;i="6200,9189,9965"; a="193048603" X-IronPort-AV: E=Sophos;i="5.82,250,1613462400"; d="scan'208";a="193048603" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2021 06:40:23 -0700 IronPort-SDR: zFtO4QB7IuFHhWRqDvZyVVcNSiwH+nsACoiGAC8mU/qOh+UVNj2gYzpWLvMEXx6pEASzMkfBAq doThgZ+doVGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,250,1613462400"; d="scan'208";a="422311691" Received: from dpdk-yyzhang2.sh.intel.com ([10.67.117.129]) by fmsmga008.fm.intel.com with ESMTP; 25 Apr 2021 06:40:21 -0700 From: Yuying Zhang To: dev@dpdk.org, qi.z.zhang@intel.com, haiyue.wang@intel.com Cc: Zhirun.Yan@intel.com, junfeng.guo@intel.com, Yuying Zhang Date: Sun, 25 Apr 2021 13:29:05 +0000 Message-Id: <20210425132906.976067-1-yuying.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210422100541.935478-1-yuying.zhang@intel.com> References: <20210422100541.935478-1-yuying.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/2] net/ice: clean redundant macro definition of filters X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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(-) 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++; -- 2.25.1