[4/8] net/ice/base: code clean in FDIR module
diff mbox series

Message ID 20200627150615.2233-5-qi.z.zhang@intel.com
State Superseded
Delegated to: Qi Zhang
Headers show
Series
  • update base code batch 3
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Zhang, Qi Z June 27, 2020, 3:06 p.m. UTC
Remove unused macro and funciton.
Declare no external referenced function as static.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_fdir.c | 23 +----------------------
 drivers/net/ice/base/ice_fdir.h |  3 ---
 2 files changed, 1 insertion(+), 25 deletions(-)

Comments

Yang, Qiming June 29, 2020, 2:46 a.m. UTC | #1
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Saturday, June 27, 2020 23:06
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Stillwell Jr, Paul M
> <paul.m.stillwell.jr@intel.com>
> Subject: [PATCH 4/8] net/ice/base: code clean in FDIR module
> 
> Remove unused macro and funciton.

funciton  / Function

> Declare no external referenced function as static.
> 
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ice/base/ice_fdir.c | 23 +----------------------
> drivers/net/ice/base/ice_fdir.h |  3 ---
>  2 files changed, 1 insertion(+), 25 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
> index c5a20632c..b1dc2afb7 100644
> --- a/drivers/net/ice/base/ice_fdir.c
> +++ b/drivers/net/ice/base/ice_fdir.c
> @@ -597,7 +597,7 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = {
>   * ice_set_dflt_val_fd_desc
>   * @fd_fltr_ctx: pointer to fd filter descriptor
>   */
> -void ice_set_dflt_val_fd_desc(struct ice_fd_fltr_desc_ctx *fd_fltr_ctx)
> +static void ice_set_dflt_val_fd_desc(struct ice_fd_fltr_desc_ctx
> +*fd_fltr_ctx)
>  {
>  	fd_fltr_ctx->comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
>  	fd_fltr_ctx->comp_report =
> ICE_FXD_FLTR_QW0_COMP_REPORT_SW_FAIL;
> @@ -1389,27 +1389,6 @@ bool ice_fdir_is_dup_fltr(struct ice_hw *hw,
> struct ice_fdir_fltr *input)  }
> 
>  /**
> - * ice_clear_vsi_fd_table - admin command to clear FD table for a VSI
> - * @hw: hardware data structure
> - * @vsi_num: vsi_num (HW VSI num)
> - *
> - * Clears FD table entries by issuing admin command (direct, 0x0B06)
> - * Must to pass valid vsi_num as returned by "AddVSI".
> - */
> -enum ice_status ice_clear_vsi_fd_table(struct ice_hw *hw, u16 vsi_num) -{
> -	struct ice_aqc_clear_fd_table *cmd;
> -	struct ice_aq_desc desc;
> -
> -	cmd = &desc.params.clear_fd_table;
> -	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_clear_fd_table);
> -	cmd->clear_type = CL_FD_VM_VF_TYPE_VSI_IDX;
> -
> -	cmd->vsi_index = CPU_TO_LE16(vsi_num);
> -	return ice_aq_send_cmd(hw, &desc, NULL, 0, NULL);
> -}
> -
> -/**
>   * ice_clear_pf_fd_table - admin command to clear FD table for PF
>   * @hw: hardware data structure
>   *
> diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
> index 1f31debe6..ad3e11a5b 100644
> --- a/drivers/net/ice/base/ice_fdir.h
> +++ b/drivers/net/ice/base/ice_fdir.h
> @@ -17,7 +17,6 @@
>  #define ICE_FDIR_TUN_PKT_OFF		50
>  #define ICE_FDIR_MAX_RAW_PKT_SIZE	(512 +
> ICE_FDIR_TUN_PKT_OFF)
>  #define ICE_FDIR_BUF_FULL_MARGIN	10
> -#define ICE_FDIR_BUF_HEAD_ROOM		32
> 
>  /* macros for offsets into packets for flow director programming */
>  #define ICE_IPV4_SRC_ADDR_OFFSET	26
> @@ -222,7 +221,6 @@ struct ice_fdir_base_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 @@ -231,7 +229,6 @@ 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,
> --
> 2.13.6

Patch
diff mbox series

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index c5a20632c..b1dc2afb7 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -597,7 +597,7 @@  static const struct ice_fdir_base_pkt ice_fdir_pkt[] = {
  * ice_set_dflt_val_fd_desc
  * @fd_fltr_ctx: pointer to fd filter descriptor
  */
-void ice_set_dflt_val_fd_desc(struct ice_fd_fltr_desc_ctx *fd_fltr_ctx)
+static void ice_set_dflt_val_fd_desc(struct ice_fd_fltr_desc_ctx *fd_fltr_ctx)
 {
 	fd_fltr_ctx->comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
 	fd_fltr_ctx->comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW_FAIL;
@@ -1389,27 +1389,6 @@  bool ice_fdir_is_dup_fltr(struct ice_hw *hw, struct ice_fdir_fltr *input)
 }
 
 /**
- * ice_clear_vsi_fd_table - admin command to clear FD table for a VSI
- * @hw: hardware data structure
- * @vsi_num: vsi_num (HW VSI num)
- *
- * Clears FD table entries by issuing admin command (direct, 0x0B06)
- * Must to pass valid vsi_num as returned by "AddVSI".
- */
-enum ice_status ice_clear_vsi_fd_table(struct ice_hw *hw, u16 vsi_num)
-{
-	struct ice_aqc_clear_fd_table *cmd;
-	struct ice_aq_desc desc;
-
-	cmd = &desc.params.clear_fd_table;
-	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_clear_fd_table);
-	cmd->clear_type = CL_FD_VM_VF_TYPE_VSI_IDX;
-
-	cmd->vsi_index = CPU_TO_LE16(vsi_num);
-	return ice_aq_send_cmd(hw, &desc, NULL, 0, NULL);
-}
-
-/**
  * ice_clear_pf_fd_table - admin command to clear FD table for PF
  * @hw: hardware data structure
  *
diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index 1f31debe6..ad3e11a5b 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -17,7 +17,6 @@ 
 #define ICE_FDIR_TUN_PKT_OFF		50
 #define ICE_FDIR_MAX_RAW_PKT_SIZE	(512 + ICE_FDIR_TUN_PKT_OFF)
 #define ICE_FDIR_BUF_FULL_MARGIN	10
-#define ICE_FDIR_BUF_HEAD_ROOM		32
 
 /* macros for offsets into packets for flow director programming */
 #define ICE_IPV4_SRC_ADDR_OFFSET	26
@@ -222,7 +221,6 @@  struct ice_fdir_base_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
@@ -231,7 +229,6 @@  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,