From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83DF8A04B5; Mon, 7 Sep 2020 13:28:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA2FB1C20E; Mon, 7 Sep 2020 13:25:10 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 135EB1C1FC for ; Mon, 7 Sep 2020 13:25:07 +0200 (CEST) IronPort-SDR: BxWpznqPyrmrEeceTrdXvQOt6yuF/8XIbiz2OEswp6EvUG9bFqg6L9aPpZYXLkkXuc2fxX2gez vxIGCsuSVeLw== X-IronPort-AV: E=McAfee;i="6000,8403,9736"; a="157252683" X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="157252683" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2020 04:25:07 -0700 IronPort-SDR: pguAjLROBE3ScVjISiyHosj/gJWucdRsdNLUCQUKtFvQ+kW51frRtD188LAs4JjFFn3VTddJLS 5hHLXX15OzAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="328058876" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by fmsmga004.fm.intel.com with ESMTP; 07 Sep 2020 04:25:06 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Tony Nguyen Date: Mon, 7 Sep 2020 19:28:11 +0800 Message-Id: <20200907112826.48493-26-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200907112826.48493-1-qi.z.zhang@intel.com> References: <20200907112826.48493-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH 25/40] net/ice/base: move a function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Move ice_flow_get_hw_prof, this is not necessary for DPDK, just sync the code with other compile option which ice_flow_get_hw_prof is declared as a static function. Signed-off-by: Tony Nguyen Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 48 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 00ea42655..0ae39c094 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -1642,6 +1642,30 @@ ice_dealloc_flow_entry(struct ice_hw *hw, struct ice_flow_entry *entry) ice_free(hw, entry); } +/** + * ice_flow_get_hw_prof - return the HW profile for a specific profile ID handle + * @hw: pointer to the HW struct + * @blk: classification stage + * @prof_id: the profile ID handle + * @hw_prof_id: pointer to variable to receive the HW profile ID + */ +enum ice_status +ice_flow_get_hw_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id, + u8 *hw_prof_id) +{ + enum ice_status status = ICE_ERR_DOES_NOT_EXIST; + struct ice_prof_map *map; + + ice_acquire_lock(&hw->blk[blk].es.prof_map_lock); + map = ice_search_prof_id(hw, blk, prof_id); + if (map) { + *hw_prof_id = map->prof_id; + status = ICE_SUCCESS; + } + ice_release_lock(&hw->blk[blk].es.prof_map_lock); + return status; +} + #define ICE_ACL_INVALID_SCEN 0x3f /** @@ -2233,30 +2257,6 @@ ice_flow_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id) } /** - * ice_flow_get_hw_prof - return the HW profile for a specific profile ID handle - * @hw: pointer to the HW struct - * @blk: classification stage - * @prof_id: the profile ID handle - * @hw_prof_id: pointer to variable to receive the HW profile ID - */ -enum ice_status -ice_flow_get_hw_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id, - u8 *hw_prof_id) -{ - enum ice_status status = ICE_ERR_DOES_NOT_EXIST; - struct ice_prof_map *map; - - ice_acquire_lock(&hw->blk[blk].es.prof_map_lock); - map = ice_search_prof_id(hw, blk, prof_id); - if (map) { - *hw_prof_id = map->prof_id; - status = ICE_SUCCESS; - } - ice_release_lock(&hw->blk[blk].es.prof_map_lock); - return status; -} - -/** * ice_flow_find_entry - look for a flow entry using its unique ID * @hw: pointer to the HW struct * @blk: classification stage -- 2.13.6