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 <anthony.l.nguyen@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com>
This commit is contained in:
parent
8ae56d6af0
commit
56ec90f190
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user