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 2EF4CA0093; Mon, 15 Jun 2020 04:03:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 12FAC1BF02; Mon, 15 Jun 2020 04:01:56 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E9EA749E0 for ; Mon, 15 Jun 2020 04:01:50 +0200 (CEST) IronPort-SDR: MqQd7AMuuHXsX014wzSO93WYIXFvMLeESBkP6etS9CqcCE/xFkvI5t8yYwiTSwPf8pt22FSZiP o0gP+NDOd1FQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2020 19:01:50 -0700 IronPort-SDR: GONxuThoDqhHK7HjWCHhc2gSOZvWXtnDtUNXa+NLsiS08QrlzrBfXi805/vuKFXByyUcqSOJyh QcKyx9Vr1avg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,513,1583222400"; d="scan'208";a="298318891" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by fmsmga004.fm.intel.com with ESMTP; 14 Jun 2020 19:01:48 -0700 From: Qi Zhang To: ferruh.yigit@intel.com Cc: xiaolong.ye@intel.com, qiming.yang@intel.com, dev@dpdk.org, Qi Zhang , Tony Nguyen , "Paul M . Stillwell Jr" Date: Mon, 15 Jun 2020 10:04:37 +0800 Message-Id: <20200615020515.1359-16-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200615020515.1359-1-qi.z.zhang@intel.com> References: <20200603024016.30636-1-qi.z.zhang@intel.com> <20200615020515.1359-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v3 15/53] net/ice/base: group function prototypes together 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" 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 Signed-off-by: Paul M. Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_fdir.h | 83 ++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h index 97553c8e7..b39ce0bbf 100644 --- a/drivers/net/ice/base/ice_fdir.h +++ b/drivers/net/ice/base/ice_fdir.h @@ -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); -- 2.13.6