From: Qi Zhang Date: Wed, 26 Aug 2020 12:37:36 +0000 (+0800) Subject: net/ice/base: move a function X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=56ec90f1903df89d2a019b5c4c49cb8ddf2c3526;p=dpdk.git net/ice/base: move a function 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 Acked-by: Qiming Yang --- diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index a612c8dc6b..65ab2394f8 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 /** @@ -2232,30 +2256,6 @@ out: return status; } -/** - * 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