From patchwork Mon Mar 29 04:56:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 89990 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF324A034F; Mon, 29 Mar 2021 07:15:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 783B340151; Mon, 29 Mar 2021 07:15:13 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 8DD4C40042 for ; Mon, 29 Mar 2021 07:15:11 +0200 (CEST) IronPort-SDR: 6a0WJBZ6I3jKcqMBMM/vYEx4jzWwrBOfnHBFUEObDnP08X7RiilsvvhFFok3YTPzro/vnE9Njz ySpEaCBYyLsg== X-IronPort-AV: E=McAfee;i="6000,8403,9937"; a="255475396" X-IronPort-AV: E=Sophos;i="5.81,285,1610438400"; d="scan'208";a="255475396" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2021 22:15:08 -0700 IronPort-SDR: xxFXk5t56pp8ERQvzO4nSYX/VS7yO/953TYov44XB8WaX/32+4/6XT08J/rNuEvkAvuy0UhcMd aOMgymySczTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,285,1610438400"; d="scan'208";a="444401706" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.118.220]) by fmsmga002.fm.intel.com with ESMTP; 28 Mar 2021 22:15:07 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: qi.z.zhang@intel.com, Haiyue Wang , Qiming Yang Date: Mon, 29 Mar 2021 12:56:26 +0800 Message-Id: <20210329045626.461621-1-haiyue.wang@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v1] net/ice: remove the redundant function type 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 function 'ice_is_profile_rule' is defined as 'ice_is_prof_rule' in base code, which has the exactly same function body. So remove the 'ice_is_profile_rule', use the 'ice_is_prof_rule' instead. Signed-off-by: Haiyue Wang Acked-by: Qi Zhang --- drivers/net/ice/ice_switch_filter.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index bc7771abd5..0bf3660677 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -1534,26 +1534,6 @@ ice_switch_check_action(const struct rte_flow_action *actions, return 0; } -static bool -ice_is_profile_rule(enum ice_sw_tunnel_type tun_type) -{ - switch (tun_type) { - case ICE_SW_TUN_PROFID_IPV6_ESP: - case ICE_SW_TUN_PROFID_IPV6_AH: - case ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3: - case ICE_SW_TUN_PROFID_IPV6_NAT_T: - case ICE_SW_TUN_PROFID_IPV4_PFCP_NODE: - case ICE_SW_TUN_PROFID_IPV4_PFCP_SESSION: - case ICE_SW_TUN_PROFID_IPV6_PFCP_NODE: - case ICE_SW_TUN_PROFID_IPV6_PFCP_SESSION: - return true; - default: - break; - } - - return false; -} - static int ice_switch_parse_pattern_action(struct ice_adapter *ad, struct ice_pattern_match_item *array, @@ -1633,7 +1613,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, inputset = ice_switch_inset_get (pattern, error, list, &lkups_num, &tun_type); - if ((!inputset && !ice_is_profile_rule(tun_type)) || + if ((!inputset && !ice_is_prof_rule(tun_type)) || (inputset & ~pattern_match_item->input_set_mask_o)) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM_SPEC,