net/ice/base: move a function
authorQi Zhang <qi.z.zhang@intel.com>
Wed, 26 Aug 2020 12:37:36 +0000 (20:37 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:09 +0000 (18:55 +0200)
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>
drivers/net/ice/base/ice_flow.c

index a612c8d..65ab239 100644 (file)
@@ -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