DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
	Dave Ertman <david.m.ertman@intel.com>
Subject: [dpdk-dev] [PATCH 1/8] net/ice/base: code cleanup
Date: Mon, 29 Mar 2021 22:14:04 +0800	[thread overview]
Message-ID: <20210329141411.2395069-2-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20210329141411.2395069-1-qi.z.zhang@intel.com>

1. There are a lots of function header mismatch its function name.
2. remove unnecessary header file include.
3. remove unnecessary macro.
4. remove unnecessary comment.

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_common.c    |  4 ++--
 drivers/net/ice/base/ice_dcb.c       |  2 +-
 drivers/net/ice/base/ice_fdir.c      |  2 +-
 drivers/net/ice/base/ice_flex_pipe.c |  1 -
 drivers/net/ice/base/ice_sched.c     | 11 +++++------
 drivers/net/ice/base/ice_switch.c    | 15 +++++++--------
 drivers/net/ice/base/ice_type.h      |  2 --
 drivers/net/ice/base/ice_vlan_mode.c |  3 +--
 8 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 1546309da1..65018690c2 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -638,7 +638,7 @@ ice_cleanup_fltr_mgmt_single(struct ice_hw *hw, struct ice_switch_info *sw)
 }
 
 /**
- * ice_cleanup_all_fltr_mgmt - cleanup filter management list and locks
+ * ice_cleanup_fltr_mgmt_struct - cleanup filter management list and locks
  * @hw: pointer to the HW struct
  */
 void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw)
@@ -4903,7 +4903,7 @@ ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size,
 }
 
 /**
- * ice_fw_supports_lldp_fltr - check NVM version supports lldp_fltr_ctrl
+ * ice_fw_supports_lldp_fltr_ctrl - check NVM version supports lldp_fltr_ctrl
  * @hw: pointer to HW struct
  */
 bool ice_fw_supports_lldp_fltr_ctrl(struct ice_hw *hw)
diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c
index 7a85e56abf..d5e2cb6e5d 100644
--- a/drivers/net/ice/base/ice_dcb.c
+++ b/drivers/net/ice/base/ice_dcb.c
@@ -857,7 +857,7 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg,
 }
 
 /**
- * ice_get_ieee_dcb_cfg
+ * ice_get_ieee_or_cee_dcb_cfg
  * @pi: port information structure
  * @dcbx_mode: mode of DCBX (IEEE or CEE)
  *
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 2b39c13127..8f9c0d346b 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -1845,7 +1845,7 @@ bool ice_fdir_has_frag(enum ice_fltr_ptype flow)
 }
 
 /**
- * ice_fdir_find_by_idx - find filter with idx
+ * ice_fdir_find_fltr_by_idx - find filter with idx
  * @hw: pointer to hardware structure
  * @fltr_idx: index to find.
  *
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index f429bfb0d1..90264240c4 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -357,7 +357,6 @@ ice_marker_ptype_tcam_handler(u32 sect_type, void *section, u32 index,
 	if (sect_type != ICE_SID_RXPARSER_MARKER_PTYPE)
 		return NULL;
 
-	/* cppcheck-suppress nullPointer */
 	if (index > ICE_MAX_MARKER_PTYPE_TCAMS_IN_BUF)
 		return NULL;
 
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 38d1f2cc54..be3f56cdf6 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1984,7 +1984,7 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs,
 }
 
 /**
- * ice_sched_rm_agg_vsi_entry - remove aggregator related VSI info entry
+ * ice_sched_rm_agg_vsi_info - remove aggregator related VSI info entry
  * @pi: port information structure
  * @vsi_handle: software VSI handle
  *
@@ -3360,7 +3360,7 @@ ice_cfg_vsi_bw_lmt_per_tc(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
 }
 
 /**
- * ice_cfg_dflt_vsi_bw_lmt_per_tc - configure default VSI BW limit per TC
+ * ice_cfg_vsi_bw_dflt_lmt_per_tc - configure default VSI BW limit per TC
  * @pi: port information structure
  * @vsi_handle: software VSI handle
  * @tc: traffic class
@@ -3515,7 +3515,7 @@ ice_cfg_agg_bw_no_shared_lmt(struct ice_port_info *pi, u32 agg_id)
 }
 
 /**
- * ice_cfg_agg_bw_shared_lmt_per_tc - configure aggregator BW shared limit per tc
+ * ice_cfg_agg_bw_shared_lmt_per_tc - config aggregator BW shared limit per tc
  * @pi: port information structure
  * @agg_id: aggregator ID
  * @tc: traffic class
@@ -3535,7 +3535,7 @@ ice_cfg_agg_bw_shared_lmt_per_tc(struct ice_port_info *pi, u32 agg_id, u8 tc,
 }
 
 /**
- * ice_cfg_agg_bw_shared_lmt_per_tc - configure aggregator BW shared limit per tc
+ * ice_cfg_agg_bw_no_shared_lmt_per_tc - cfg aggregator BW shared limit per tc
  * @pi: port information structure
  * @agg_id: aggregator ID
  * @tc: traffic class
@@ -3553,7 +3553,7 @@ ice_cfg_agg_bw_no_shared_lmt_per_tc(struct ice_port_info *pi, u32 agg_id, u8 tc)
 }
 
 /**
- * ice_config_vsi_queue_priority - config VSI queue priority of node
+ * ice_cfg_vsi_q_priority - config VSI queue priority of node
  * @pi: port information structure
  * @num_qs: number of VSI queues
  * @q_ids: queue IDs array
@@ -3649,7 +3649,6 @@ ice_cfg_agg_vsi_priority_per_tc(struct ice_port_info *pi, u32 agg_id,
 		LIST_FOR_EACH_ENTRY(agg_vsi_info, &agg_info->agg_vsi_list,
 				    ice_sched_agg_vsi_info, list_entry)
 			if (agg_vsi_info->vsi_handle == vsi_handle) {
-				/* cppcheck-suppress unreadVariable */
 				vsi_handle_valid = true;
 				break;
 			}
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 3dc764266b..393fec3d40 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -2298,7 +2298,7 @@ enum ice_status ice_alloc_rss_global_lut(struct ice_hw *hw, bool shared_res, u16
 }
 
 /**
- * ice_free_global_lut - free a RSS global LUT
+ * ice_free_rss_global_lut - free a RSS global LUT
  * @hw: pointer to the HW struct
  * @global_lut_id: ID of the RSS global LUT to free
  */
@@ -3174,7 +3174,6 @@ ice_aq_get_recipe(struct ice_hw *hw,
 	buf_size = *num_recipes * sizeof(*s_recipe_list);
 
 	status = ice_aq_send_cmd(hw, &desc, s_recipe_list, buf_size, cd);
-	/* cppcheck-suppress constArgument */
 	*num_recipes = LE16_TO_CPU(cmd->num_sub_recipes);
 
 	return status;
@@ -4979,7 +4978,7 @@ enum ice_status ice_add_vlan(struct ice_hw *hw, struct LIST_HEAD_TYPE *v_list)
 }
 
 /**
- * ice_add_mac_vlan - Add MAC and VLAN pair based filter rule
+ * ice_add_mac_vlan_rule - Add MAC and VLAN pair based filter rule
  * @hw: pointer to the hardware structure
  * @mv_list: list of MAC and VLAN filters
  * @sw: pointer to switch info struct for which function add rule
@@ -5671,7 +5670,7 @@ ice_get_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 *promisc_mask,
 }
 
 /**
- * ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI
+ * _ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI
  * @hw: pointer to the hardware structure
  * @vsi_handle: VSI handle to retrieve info from
  * @promisc_mask: pointer to mask to be filled in
@@ -6664,7 +6663,7 @@ static bool ice_prot_type_to_id(enum ice_protocol_type type, u8 *id)
 }
 
 /**
- * ice_find_valid_words - count valid words
+ * ice_fill_valid_words - count valid words
  * @rule: advanced rule with lookup information
  * @lkup_exts: byte offset extractions of the words that are valid
  *
@@ -7263,7 +7262,7 @@ ice_get_fv(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
 }
 
 /**
- * ice_tun_type_match_mask - determine if tun type needs a match mask
+ * ice_tun_type_match_word - determine if tun type needs a match mask
  * @tun_type: tunnel type
  * @mask: mask to be used for the tunnel
  */
@@ -8860,7 +8859,7 @@ ice_rem_adv_rule_by_id(struct ice_hw *hw,
 }
 
 /**
- * ice_rem_adv_for_vsi - removes existing advanced switch rules for a
+ * ice_rem_adv_rule_for_vsi - removes existing advanced switch rules for a
  *                       given VSI handle
  * @hw: pointer to the hardware structure
  * @vsi_handle: VSI handle for which we are supposed to remove all the rules.
@@ -9142,7 +9141,7 @@ ice_replay_vsi_all_fltr(struct ice_hw *hw, struct ice_port_info *pi,
 }
 
 /**
- * ice_rm_all_sw_replay_rule - helper function to delete filter replay rules
+ * ice_rm_sw_replay_rule_info - helper function to delete filter replay rules
  * @hw: pointer to the HW struct
  * @sw: pointer to switch info struct for which function removes filters
  *
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index a6599363f9..3c534a7711 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -44,9 +44,7 @@
 #define ice_struct_size(ptr, field, num) \
 	(sizeof(*(ptr)) + sizeof(*(ptr)->field) * (num))
 
-#ifndef FLEX_ARRAY_SIZE
 #define FLEX_ARRAY_SIZE(_ptr, _mem, cnt) ((cnt) * sizeof(_ptr->_mem[0]))
-#endif /* FLEX_ARRAY_SIZE */
 
 #include "ice_status.h"
 #include "ice_hw_autogen.h"
diff --git a/drivers/net/ice/base/ice_vlan_mode.c b/drivers/net/ice/base/ice_vlan_mode.c
index 4ba78ed4cd..ce150009c2 100644
--- a/drivers/net/ice/base/ice_vlan_mode.c
+++ b/drivers/net/ice/base/ice_vlan_mode.c
@@ -2,11 +2,10 @@
  * Copyright(c) 2001-2021 Intel Corporation
  */
 
-#include "ice_vlan_mode.h"
 #include "ice_common.h"
 
 /**
- * ice_pkg_supports_dvm - determine if DDP supports Double VLAN mode (DVM)
+ * ice_pkg_get_supported_vlan_mode - chk if DDP supports Double VLAN mode (DVM)
  * @hw: pointer to the HW struct
  * @dvm: output variable to determine if DDP supports DVM(true) or SVM(false)
  */
-- 
2.26.2


  reply	other threads:[~2021-03-29 14:10 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 14:14 [dpdk-dev] [PATCH 0/8] ice: base code update batch 2 Qi Zhang
2021-03-29 14:14 ` Qi Zhang [this message]
2021-03-29 14:14 ` [dpdk-dev] [PATCH 2/8] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 3/8] net/ice/base: print link configure error Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 4/8] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 5/8] net/ice/base: set MAC type for E823C device Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 6/8] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 7/8] net/ice/base: enable I2C read/write commands Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 8/8] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13  5:06 ` [dpdk-dev] [PATCH v2 00/14] base code update batch 2 Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 01/14] net/ice/base: code cleanup Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 02/14] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 03/14] net/ice/base: print link configure error Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 04/14] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 05/14] net/ice/base: set MAC type for E823C device Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 06/14] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 07/14] net/ice/base: enable I2C read/write commands Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 08/14] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 09/14] net/ice/base: add set/get GPIO helper functions Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 10/14] net/ice/base: add priority check of matching recipe Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 11/14] net/ice/base: add inner VLAN protocol type for QinQ filter Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 12/14] net/ice/base: fix QinQ PPPoE dummy pkt selection Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 13/14] net/ice/base: add PTYPE values for PPPoL2TPv2oUDP Qi Zhang
2021-04-13  5:06   ` [dpdk-dev] [PATCH v2 14/14] net/ice/base: allow support for GTP-U filter using only inner protocols Qi Zhang
2021-04-13  6:16   ` [dpdk-dev] [PATCH v2 00/14] base code update batch 2 Yang, Qiming
2021-04-13 11:38     ` Ferruh Yigit
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 00/14] ice: " Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 01/14] net/ice/base: code cleanup Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 02/14] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 03/14] net/ice/base: print link configure error Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 04/14] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 05/14] net/ice/base: set MAC type for E823C device Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 06/14] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 07/14] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 08/14] net/ice/base: add priority check of matching recipe Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 09/14] net/ice/base: enable I2C read/write commands Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 10/14] net/ice/base: add set/get GPIO helper functions Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 11/14] net/ice/base: add inner VLAN protocol type for QinQ filter Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 12/14] net/ice/base: fix QinQ PPPoE dummy pkt selection Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 13/14] net/ice/base: add PTYPE values for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 14:30   ` [dpdk-dev] [PATCH v3 14/14] net/ice/base: allow support for GTP-U filter using only inner protocols Qi Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210329141411.2395069-2-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=david.m.ertman@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).