net/ice/base: group function prototypes together
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 15 Jun 2020 02:04:37 +0000 (10:04 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jun 2020 17:21:07 +0000 (19:21 +0200)
There are some function prototypes at the beginning of the file and
some at the end, group them all together so that they are in one
consistent location.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@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_fdir.h

index 97553c8..b39ce0b 100644 (file)
@@ -7,47 +7,6 @@
 
 #include "ice_common.h"
 
-/* Flow Director (FD) Filter Programming descriptor */
-struct ice_fd_fltr_desc_ctx {
-       u32 fdid;
-       u16 qindex;
-       u16 cnt_index;
-       u16 fd_vsi;
-       u16 flex_val;
-       u8 comp_q;
-       u8 comp_report;
-       u8 fd_space;
-       u8 cnt_ena;
-       u8 evict_ena;
-       u8 toq;
-       u8 toq_prio;
-       u8 dpu_recipe;
-       u8 drop;
-       u8 flex_prio;
-       u8 flex_mdid;
-       u8 dtype;
-       u8 pcmd;
-       u8 desc_prof_prio;
-       u8 desc_prof;
-       u8 swap;
-       u8 fdid_prio;
-       u8 fdid_mdid;
-};
-
-enum ice_status ice_alloc_fd_res_cntr(struct ice_hw *hw, u16 *cntr_id);
-enum ice_status ice_free_fd_res_cntr(struct ice_hw *hw, u16 cntr_id);
-void ice_set_dflt_val_fd_desc(struct ice_fd_fltr_desc_ctx *fd_fltr_ctx);
-enum ice_status
-ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
-enum ice_status
-ice_free_fd_guar_item(struct ice_hw *hw, u16 cntr_id, u16 num_fltr);
-enum ice_status
-ice_alloc_fd_shrd_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
-enum ice_status
-ice_free_fd_shrd_item(struct ice_hw *hw, u16 cntr_id, u16 num_fltr);
-enum ice_status ice_clear_vsi_fd_table(struct ice_hw *hw, u16 vsi_num);
-enum ice_status ice_clear_pf_fd_table(struct ice_hw *hw);
-
 #define ICE_FDIR_IP_PROTOCOLS
 #define ICE_IP_PROTO_TCP               6
 #define ICE_IP_PROTO_UDP               17
@@ -111,6 +70,33 @@ enum ice_fltr_prgm_desc_fd_status {
        ICE_FLTR_PRGM_DESC_FD_STATUS_8FLEX_BYTES,
 };
 
+/* Flow Director (FD) Filter Programming descriptor */
+struct ice_fd_fltr_desc_ctx {
+       u32 fdid;
+       u16 qindex;
+       u16 cnt_index;
+       u16 fd_vsi;
+       u16 flex_val;
+       u8 comp_q;
+       u8 comp_report;
+       u8 fd_space;
+       u8 cnt_ena;
+       u8 evict_ena;
+       u8 toq;
+       u8 toq_prio;
+       u8 dpu_recipe;
+       u8 drop;
+       u8 flex_prio;
+       u8 flex_mdid;
+       u8 dtype;
+       u8 pcmd;
+       u8 desc_prof_prio;
+       u8 desc_prof;
+       u8 swap;
+       u8 fdid_prio;
+       u8 fdid_mdid;
+};
+
 #define ICE_FLTR_PRGM_FLEX_WORD_SIZE   sizeof(__be16)
 
 struct ice_rx_flow_userdef {
@@ -207,7 +193,7 @@ struct ice_fdir_fltr {
        bool acl_fltr;
 };
 
-/* Dummy packet filter definition structure. */
+/* Dummy packet filter definition structure */
 struct ice_fdir_base_pkt {
        enum ice_fltr_ptype flow;
        u16 pkt_len;
@@ -216,6 +202,19 @@ struct ice_fdir_base_pkt {
        const u8 *tun_pkt;
 };
 
+enum ice_status ice_alloc_fd_res_cntr(struct ice_hw *hw, u16 *cntr_id);
+enum ice_status ice_free_fd_res_cntr(struct ice_hw *hw, u16 cntr_id);
+void ice_set_dflt_val_fd_desc(struct ice_fd_fltr_desc_ctx *fd_fltr_ctx);
+enum ice_status
+ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
+enum ice_status
+ice_free_fd_guar_item(struct ice_hw *hw, u16 cntr_id, u16 num_fltr);
+enum ice_status
+ice_alloc_fd_shrd_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
+enum ice_status
+ice_free_fd_shrd_item(struct ice_hw *hw, u16 cntr_id, u16 num_fltr);
+enum ice_status ice_clear_vsi_fd_table(struct ice_hw *hw, u16 vsi_num);
+enum ice_status ice_clear_pf_fd_table(struct ice_hw *hw);
 void
 ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
                       struct ice_fltr_desc *fdesc, bool add);