From: Qi Zhang Date: Mon, 15 Jun 2020 02:04:38 +0000 (+0800) Subject: net/ice/base: cleanup comment formatting X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=06dd554ac7c7e757acf0eeb5e8071b496e0dd7e2;p=dpdk.git net/ice/base: cleanup comment formatting Add missing space between end of comment text and comment terminator, and remove unnecessary punctuation. Signed-off-by: Bruce Allan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- diff --git a/drivers/net/ice/base/ice_acl.c b/drivers/net/ice/base/ice_acl.c index 31244cb4b9..fd12507d79 100644 --- a/drivers/net/ice/base/ice_acl.c +++ b/drivers/net/ice/base/ice_acl.c @@ -123,7 +123,7 @@ ice_aq_program_acl_entry(struct ice_hw *hw, u8 tcam_idx, u16 entry_idx, * @buf: address of indirect data buffer * @cd: pointer to command details structure or NULL * - * Query ACL entry (direct 0x0C24) + * Query ACL entry (direct 0x0C24) * * NOTE: Caller of this API to parse 'buf' appropriately since it contains * response (key and key invert) @@ -250,7 +250,7 @@ ice_aq_query_actpair(struct ice_hw *hw, u8 act_mem_idx, u16 act_entry_idx, * @hw: pointer to the HW struct * @cd: pointer to command details structure or NULL * - * ACL - de-allocate (direct 0x0C1A) resources. Used by SW to release all the + * De-allocate ACL resources (direct 0x0C1A). Used by SW to release all the * resources allocated for it using a single command */ enum ice_status ice_aq_dealloc_acl_res(struct ice_hw *hw, struct ice_sq_cd *cd) @@ -263,7 +263,7 @@ enum ice_status ice_aq_dealloc_acl_res(struct ice_hw *hw, struct ice_sq_cd *cd) } /** - * ice_acl_prof_aq_send - sending acl profile aq commands + * ice_acl_prof_aq_send - sending ACL profile AQ commands * @hw: pointer to the HW struct * @opc: command opcode * @prof_id: profile ID @@ -294,7 +294,7 @@ ice_acl_prof_aq_send(struct ice_hw *hw, u16 opc, u8 prof_id, * @buf: ptr to buffer * @cd: pointer to command details structure or NULL * - * ACL - program ACL profile extraction (indirect 0x0C1D) + * Program ACL profile extraction (indirect 0x0C1D) */ enum ice_status ice_prgm_acl_prof_extrt(struct ice_hw *hw, u8 prof_id, @@ -312,7 +312,7 @@ ice_prgm_acl_prof_extrt(struct ice_hw *hw, u8 prof_id, * @buf: ptr to buffer (which will contain response of this command) * @cd: pointer to command details structure or NULL * - * ACL - query ACL profile (indirect 0x0C21) + * Query ACL profile (indirect 0x0C21) */ enum ice_status ice_query_acl_prof(struct ice_hw *hw, u8 prof_id, @@ -354,7 +354,7 @@ static enum ice_status ice_aq_acl_cntrs_chk_params(struct ice_acl_cntrs *cntrs) status = ICE_ERR_OUT_OF_RANGE; break; default: - /* Unspecified counter type - Invalid or error*/ + /* Unspecified counter type - Invalid or error */ status = ICE_ERR_PARAM; } @@ -367,7 +367,7 @@ static enum ice_status ice_aq_acl_cntrs_chk_params(struct ice_acl_cntrs *cntrs) * @cntrs: ptr to buffer describing input and output params * @cd: pointer to command details structure or NULL * - * ACL - allocate (indirect 0x0C16) counters. This function attempts to + * Allocate ACL counters (indirect 0x0C16). This function attempts to * allocate a contiguous block of counters. In case of failures, caller can * attempt to allocate a smaller chunk. The allocation is considered * unsuccessful if returned counter value is invalid. In this case it returns @@ -410,8 +410,7 @@ ice_aq_alloc_acl_cntrs(struct ice_hw *hw, struct ice_acl_cntrs *cntrs, * @cntrs: ptr to buffer describing input and output params * @cd: pointer to command details structure or NULL * - * ACL - de-allocate (direct 0x0C17) counters. - * This function deallocate ACL counters. + * De-allocate ACL counters (direct 0x0C17) */ enum ice_status ice_aq_dealloc_acl_cntrs(struct ice_hw *hw, struct ice_acl_cntrs *cntrs, @@ -443,7 +442,7 @@ ice_aq_dealloc_acl_cntrs(struct ice_hw *hw, struct ice_acl_cntrs *cntrs, * @cntr_val: pointer to counter or packet counter value * @cd: pointer to command details structure or NULL * - * ACL - query ACL counter (direct 0x0C27) + * Query ACL counter (direct 0x0C27) */ enum ice_status ice_aq_query_acl_cntrs(struct ice_hw *hw, u8 bank, u16 index, u64 *cntr_val, @@ -478,7 +477,7 @@ ice_aq_query_acl_cntrs(struct ice_hw *hw, u8 bank, u16 index, u64 *cntr_val, * @buf: pointer to input buffer * @cd: pointer to command details structure or NULL * - * ACL - program ACL profile ranges (indirect 0x0C1E) + * Program ACL profile ranges (indirect 0x0C1E) */ enum ice_status ice_prog_acl_prof_ranges(struct ice_hw *hw, u8 prof_id, @@ -501,7 +500,7 @@ ice_prog_acl_prof_ranges(struct ice_hw *hw, u8 prof_id, * @buf: pointer to response buffer * @cd: pointer to command details structure or NULL * - * ACL - query ACL profile ranges (indirect 0x0C22) + * Query ACL profile ranges (indirect 0x0C22) */ enum ice_status ice_query_acl_prof_ranges(struct ice_hw *hw, u8 prof_id, @@ -571,7 +570,7 @@ ice_aq_dealloc_acl_scen(struct ice_hw *hw, u16 scen_id, struct ice_sq_cd *cd) /** * ice_aq_update_query_scen - update or query ACL scenario * @hw: pointer to the HW struct - * @opcode: aq command opcode for either query or update scenario + * @opcode: AQ command opcode for either query or update scenario * @scen_id: scen_id to be updated or queried * @buf: address of indirect data buffer * @cd: pointer to command details structure or NULL diff --git a/drivers/net/ice/base/ice_acl_ctrl.c b/drivers/net/ice/base/ice_acl_ctrl.c index 39b399dd40..5310b9d9f6 100644 --- a/drivers/net/ice/base/ice_acl_ctrl.c +++ b/drivers/net/ice/base/ice_acl_ctrl.c @@ -12,6 +12,7 @@ #define ICE_ACL_TBL_TCAM_ENTRY_IDX(e) ((e) % ICE_AQC_ACL_TCAM_DEPTH) #define ICE_ACL_SCEN_ENTRY_INVAL 0xFFFF + /** * ice_acl_init_entry * @scen: pointer to the scenario struct @@ -20,8 +21,7 @@ */ static void ice_acl_init_entry(struct ice_acl_scen *scen) { - /** - * low priority: start from the highest index, 25% of total entries + /* low priority: start from the highest index, 25% of total entries * normal priority: start from the highest index, 50% of total entries * high priority: start from the lowest index, 25% of total entries */ @@ -44,8 +44,9 @@ static void ice_acl_init_entry(struct ice_acl_scen *scen) * Returns ICE_ACL_SCEN_ENTRY_INVAL if fails * Returns index on success */ -static u16 ice_acl_scen_assign_entry_idx(struct ice_acl_scen *scen, - enum ice_acl_entry_prior prior) +static u16 +ice_acl_scen_assign_entry_idx(struct ice_acl_scen *scen, + enum ice_acl_entry_prior prior) { u16 first_idx, last_idx, i; s8 step; @@ -198,7 +199,7 @@ static enum ice_status ice_acl_init_tbl(struct ice_hw *hw) /** * ice_acl_assign_act_mems_to_tcam - * @tbl: pointer to acl table structure + * @tbl: pointer to ACL table structure * @cur_tcam: Index of current TCAM. Value = 0 to (ICE_AQC_ACL_SLICES - 1) * @cur_mem_idx: Index of current action memory bank. Value = 0 to * (ICE_AQC_MAX_ACTION_MEMORIES - 1) @@ -229,7 +230,7 @@ ice_acl_assign_act_mems_to_tcam(struct ice_acl_tbl *tbl, u8 cur_tcam, /** * ice_acl_divide_act_mems_to_tcams - * @tbl: pointer to acl table structure + * @tbl: pointer to ACL table structure * * Figure out how to divide given action memory banks to given TCAMs. This * division is for SW book keeping. In the time when scenario is created, @@ -351,7 +352,7 @@ ice_acl_create_tbl(struct ice_hw *hw, struct ice_acl_tbl_params *params) CPU_TO_LE16(params->dep_tbls[i]); } - /* call the aq command to create the ACL table with these values */ + /* call the AQ command to create the ACL table with these values */ status = ice_aq_alloc_acl_tbl(hw, &tbl_alloc, NULL); if (status) { @@ -660,7 +661,7 @@ ice_acl_set_scen_chnk_msk(struct ice_aqc_acl_scen *scen_buf, /** * ice_acl_assign_act_mem_for_scen - * @tbl: pointer to acl table structure + * @tbl: pointer to ACL table structure * @scen: pointer to the scenario struct * @scen_buf: pointer to the available space for the scenario * @current_tcam_idx: theoretical index of the TCAM that we associated those @@ -897,7 +898,7 @@ enum ice_status ice_acl_destroy_tbl(struct ice_hw *hw) } } - /* call the aq command to destroy the ACL table */ + /* call the AQ command to destroy the ACL table */ status = ice_aq_dealloc_acl_tbl(hw, hw->acl_tbl->id, &resp_buf, NULL); if (status) { @@ -1107,7 +1108,7 @@ ice_acl_rem_entry(struct ice_hw *hw, struct ice_acl_scen *scen, u16 entry_idx) NULL); if (status) ice_debug(hw, ICE_DBG_ACL, - "aq program acl entry failed status: %d\n", + "AQ program ACL entry failed status: %d\n", status); } @@ -1164,7 +1165,7 @@ enum ice_status ice_acl_destroy_scen(struct ice_hw *hw, u16 scen_id) } } - /* Call the aq command to destroy the targeted scenario */ + /* Call the AQ command to destroy the targeted scenario */ status = ice_aq_dealloc_acl_scen(hw, scen_id, NULL); if (status) { diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h index a5d689dc8d..dec4c38cf8 100644 --- a/drivers/net/ice/base/ice_adminq_cmd.h +++ b/drivers/net/ice/base/ice_adminq_cmd.h @@ -533,7 +533,7 @@ struct ice_aqc_vsi_props { u8 q_opt_reserved[3]; /* outer up section */ __le32 outer_up_table; /* same structure and defines as ingress tbl */ - /* acl section */ + /* ACL section */ __le16 acl_def_act; #define ICE_AQ_VSI_ACL_DEF_RX_PROF_S 0 #define ICE_AQ_VSI_ACL_DEF_RX_PROF_M (0xF << ICE_AQ_VSI_ACL_DEF_RX_PROF_S) @@ -675,7 +675,7 @@ struct ice_aqc_storm_cfg { #define ICE_MAX_NUM_RECIPES 64 -/* Add/Get Recipe (indirect 0x0290/0x0292)*/ +/* Add/Get Recipe (indirect 0x0290/0x0292) */ struct ice_aqc_add_get_recipe { __le16 num_sub_recipes; /* Input in Add cmd, Output in Get cmd */ __le16 return_index; /* Input, used for Get cmd only */ @@ -2020,7 +2020,7 @@ struct ice_aqc_clear_fd_table { u8 reserved[12]; }; -/* ACL - allocate (indirect 0x0C10) table */ +/* Allocate ACL table (indirect 0x0C10) */ #define ICE_AQC_ACL_KEY_WIDTH 40 #define ICE_AQC_ACL_KEY_WIDTH_BYTES 5 #define ICE_AQC_ACL_TCAM_DEPTH 512 @@ -2065,9 +2065,9 @@ struct ice_aqc_acl_alloc_table_data { __le16 alloc_ids[ICE_AQC_MAX_CONCURRENT_ACL_TBL]; }; -/* ACL - deallocate (indirect 0x0C11) table - * ACL - allocate (indirect 0x0C12) action-pair - * ACL - deallocate (indirect 0x0C13) action-pair +/* Deallocate ACL table (indirect 0x0C11) + * Allocate ACL action-pair (indirect 0x0C12) + * Deallocate ACL action-pair (indirect 0x0C13) */ /* Following structure is common and used in case of deallocation @@ -2126,7 +2126,7 @@ struct ice_aqc_acl_generic { u8 act_mem[ICE_AQC_MAX_ACTION_MEMORIES]; }; -/* ACL - allocate (indirect 0x0C14) scenario. This command doesn't have separate +/* Allocate ACL scenario (indirect 0x0C14). This command doesn't have separate * response buffer since original command buffer gets updated with * 'scen_id' in case of success */ @@ -2144,7 +2144,7 @@ struct ice_aqc_acl_alloc_scen { __le32 addr_low; }; -/* ACL - de-allocate (direct 0x0C15) scenario. This command doesn't need +/* De-allocate ACL scenario (direct 0x0C15). This command doesn't need * separate response buffer since nothing to be returned as a response * except status. */ @@ -2153,8 +2153,9 @@ struct ice_aqc_acl_dealloc_scen { u8 reserved[14]; }; -/* ACL - update (direct 0x0C1B) scenario */ -/* ACL - query (direct 0x0C23) scenario */ +/* Update ACL scenario (direct 0x0C1B) + * Query ACL scenario (direct 0x0C23) + */ struct ice_aqc_acl_update_query_scen { __le16 scen_id; u8 reserved[6]; @@ -2202,7 +2203,7 @@ struct ice_aqc_acl_scen { u8 act_mem_cfg[ICE_AQC_MAX_ACTION_MEMORIES]; }; -/* ACL - allocate (indirect 0x0C16) counters */ +/* Allocate ACL counters (indirect 0x0C16) */ struct ice_aqc_acl_alloc_counters { /* Amount of contiguous counters requested. Min value is 1 and * max value is 255 @@ -2253,7 +2254,7 @@ struct ice_aqc_acl_alloc_counters { } ops; }; -/* ACL - de-allocate (direct 0x0C17) counters */ +/* De-allocate ACL counters (direct 0x0C17) */ struct ice_aqc_acl_dealloc_counters { /* first counter being released */ __le16 first_counter; @@ -2266,15 +2267,16 @@ struct ice_aqc_acl_dealloc_counters { u8 reserved[10]; }; -/* ACL - de-allocate (direct 0x0C1A) resources. Used by SW to release all the +/* De-allocate ACL resources (direct 0x0C1A). Used by SW to release all the * resources allocated for it using a single command */ struct ice_aqc_acl_dealloc_res { u8 reserved[16]; }; -/* ACL - program actionpair (indirect 0x0C1C) */ -/* ACL - query actionpair (indirect 0x0C25) */ +/* Program ACL actionpair (indirect 0x0C1C) + * Query ACL actionpair (indirect 0x0C25) + */ struct ice_aqc_acl_actpair { /* action mem index to program/update */ u8 act_mem_index; @@ -2349,10 +2351,11 @@ struct ice_aqc_acl_prof_generic_frmt { u8 pf_scenario_num[ICE_AQC_ACL_PROF_PF_SCEN_NUM_ELEMS]; }; -/* ACL - program ACL profile extraction (indirect 0x0C1D) */ -/* ACL - program ACL profile ranges (indirect 0x0C1E) */ -/* ACL - query ACL profile (indirect 0x0C21) */ -/* ACL - query ACL profile ranges (indirect 0x0C22) */ +/* Program ACL profile extraction (indirect 0x0C1D) + * Program ACL profile ranges (indirect 0x0C1E) + * Query ACL profile (indirect 0x0C21) + * Query ACL profile ranges (indirect 0x0C22) + */ struct ice_aqc_acl_profile { u8 profile_id; /* Programmed/Updated profile ID */ u8 reserved[7]; @@ -2389,8 +2392,9 @@ struct ice_aqc_acl_profile_ranges { struct ice_acl_rng_data checker_cfg[ICE_AQC_ACL_PROF_RANGES_NUM_CFG]; }; -/* ACL - program ACL entry (indirect 0x0C20) */ -/* ACL - query ACL entry (indirect 0x0C24) */ +/* Program ACL entry (indirect 0x0C20) + * Query ACL entry (indirect 0x0C24) + */ struct ice_aqc_acl_entry { u8 tcam_index; /* Updated TCAM block index */ u8 reserved; @@ -2414,7 +2418,7 @@ struct ice_aqc_acl_data { } entry_key, entry_key_invert; }; -/* ACL - query ACL counter (direct 0x0C27) */ +/* Query ACL counter (direct 0x0C27) */ struct ice_aqc_acl_query_counter { /* Queried counter index */ __le16 counter_index; @@ -2556,7 +2560,7 @@ struct ice_aqc_move_txqs_data { }; /* Download Package (indirect 0x0C40) */ -/* Also used for Update Package (indirect 0x0C42) */ +/* Also used for Update Package (indirect 0x0C42 and 0x0C41) */ struct ice_aqc_download_pkg { u8 flags; #define ICE_AQC_DOWNLOAD_PKG_LAST_BUF 0x01 diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h index 87f47b2386..3022116a4b 100644 --- a/drivers/net/ice/base/ice_bitops.h +++ b/drivers/net/ice/base/ice_bitops.h @@ -214,7 +214,7 @@ ice_or_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1, ice_bitmap_t mask; u16 i; - /* Handle all but last chunk*/ + /* Handle all but last chunk */ for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++) dst[i] = bmp1[i] | bmp2[i]; @@ -245,7 +245,7 @@ ice_xor_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1, ice_bitmap_t mask; u16 i; - /* Handle all but last chunk*/ + /* Handle all but last chunk */ for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++) dst[i] = bmp1[i] ^ bmp2[i]; @@ -276,7 +276,7 @@ ice_andnot_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1, ice_bitmap_t mask; u16 i; - /* Handle all but last chunk*/ + /* Handle all but last chunk */ for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++) dst[i] = bmp1[i] & ~bmp2[i]; @@ -389,12 +389,12 @@ ice_cmp_bitmap(ice_bitmap_t *bmp1, ice_bitmap_t *bmp2, u16 size) ice_bitmap_t mask; u16 i; - /* Handle all but last chunk*/ + /* Handle all but last chunk */ for (i = 0; i < BITS_TO_CHUNKS(size) - 1; i++) if (bmp1[i] != bmp2[i]) return false; - /* We want to only compare bits within the size.*/ + /* We want to only compare bits within the size */ mask = LAST_CHUNK_MASK(size); if ((bmp1[i] & mask) != (bmp2[i] & mask)) return false; diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index e266ba56c3..908ef9085a 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -747,7 +747,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw) /* Initialize max burst size */ if (!hw->max_burst_size) ice_cfg_rl_burst_size(hw, ICE_SCHED_DFLT_BURST_SIZE); - status = ice_init_fltr_mgmt_struct(hw); if (status) goto err_unroll_sched; @@ -1901,6 +1900,7 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count, } if (func_p) { u32 reg_val, val; + if (hw->dcf_enabled) break; reg_val = rd32(hw, GLQF_FD_SIZE); @@ -2611,7 +2611,7 @@ ice_set_fc(struct ice_port_info *pi, u8 *aq_failures, bool ena_auto_link_update) ice_copy_phy_caps_to_cfg(pi, pcaps, &cfg); - /* Configure the set phy data */ + /* Configure the set PHY data */ status = ice_cfg_phy_fc(pi, &cfg, pi->fc.req_mode); if (status) { if (status != ICE_ERR_BAD_PTR) diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c index 2257eba60c..0155597bc2 100644 --- a/drivers/net/ice/base/ice_fdir.c +++ b/drivers/net/ice/base/ice_fdir.c @@ -495,7 +495,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input, fdir_fltr_ctx.toq_prio = 0; else fdir_fltr_ctx.toq_prio = 3; - fdir_fltr_ctx.pcmd = (add) ? ICE_FXD_FLTR_QW1_PCMD_ADD : + fdir_fltr_ctx.pcmd = add ? ICE_FXD_FLTR_QW1_PCMD_ADD : ICE_FXD_FLTR_QW1_PCMD_REMOVE; fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET; fdir_fltr_ctx.comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO; @@ -684,7 +684,6 @@ static void ice_pkt_insert_u32(u8 *pkt, int offset, __be32 data) /** * ice_pkt_insert_mac_addr - insert a MAC addr into a memory buffer. * @pkt: packet buffer - * @offset: offset into buffer * @addr: MAC address to convert and insert into pkt at offset */ static void ice_pkt_insert_mac_addr(u8 *pkt, u8 *addr) diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c index 1f7a059691..9703b239b8 100644 --- a/drivers/net/ice/base/ice_flex_pipe.c +++ b/drivers/net/ice/base/ice_flex_pipe.c @@ -648,7 +648,7 @@ static bool ice_bits_max_set(const u8 *mask, u16 size, u16 max) * This function generates a key from a value, a don't care mask and a never * match mask. * upd, dc, and nm are optional parameters, and can be NULL: - * upd == NULL --> udp mask is all 1's (update all bits) + * upd == NULL --> upd mask is all 1's (update all bits) * dc == NULL --> dc mask is all 0's (no don't care bits) * nm == NULL --> nm mask is all 0's (no never match bits) */ @@ -2738,7 +2738,7 @@ ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig) * @blk: HW block * @prof: profile to check * @idx: profile index to check - * @masks: masks to match + * @mask: mask to match */ static bool ice_prof_has_mask_idx(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 idx, @@ -3264,7 +3264,6 @@ static void ice_shutdown_prof_masks(struct ice_hw *hw, enum ice_block blk) /** * ice_shutdown_all_prof_masks - releases all locks for masking * @hw: pointer to the HW struct - * @blk: hardware block * * This should be called before unloading the driver */ @@ -3279,12 +3278,11 @@ void ice_shutdown_all_prof_masks(struct ice_hw *hw) * @hw: pointer to the HW struct * @blk: hardware block * @prof_id: profile ID - * @es: field vector * @masks: masks */ static enum ice_status ice_update_prof_masking(struct ice_hw *hw, enum ice_block blk, u16 prof_id, - struct ice_fv_word *es, u16 *masks) + u16 *masks) { bool err = false; u32 ena_mask = 0; @@ -3986,7 +3984,7 @@ ice_prof_gen_key(struct ice_hw *hw, enum ice_block blk, u8 ptg, u16 vsig, * @prof_id: profile ID * @ptg: packet type group (PTG) portion of key * @vsig: VSIG portion of key - * @cdid: CDID: portion of key + * @cdid: CDID portion of key * @flags: flag portion of key * @vl_msk: valid mask * @dc_msk: don't care mask @@ -4628,7 +4626,7 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[], if (status) goto err_ice_add_prof; } - status = ice_update_prof_masking(hw, blk, prof_id, es, masks); + status = ice_update_prof_masking(hw, blk, prof_id, masks); if (status) goto err_ice_add_prof; diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 90302a6cbe..00f58697f8 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -1489,13 +1489,13 @@ ice_dealloc_flow_entry(struct ice_hw *hw, struct ice_flow_entry *entry) #define ICE_ACL_INVALID_SCEN 0x3f /** - * ice_flow_acl_is_prof_in_use - Verify if the profile is associated to any pf + * ice_flow_acl_is_prof_in_use - Verify if the profile is associated to any PF * @hw: pointer to the hardware structure * @prof: pointer to flow profile - * @buf: destination buffer function writes partial xtrct sequence to + * @buf: destination buffer function writes partial extraction sequence to * - * returns ICE_SUCCESS if no pf is associated to the given profile - * returns ICE_ERR_IN_USE if at least one pf is associated to the given profile + * returns ICE_SUCCESS if no PF is associated to the given profile + * returns ICE_ERR_IN_USE if at least one PF is associated to the given profile * returns other error code for real error */ static enum ice_status @@ -1513,7 +1513,7 @@ ice_flow_acl_is_prof_in_use(struct ice_hw *hw, struct ice_flow_prof *prof, if (status) return status; - /* If all pf's associated scenarios are all 0 or all + /* If all PF's associated scenarios are all 0 or all * ICE_ACL_INVALID_SCEN (63) for the given profile then the latter has * not been configured yet. */ @@ -1537,7 +1537,7 @@ ice_flow_acl_is_prof_in_use(struct ice_hw *hw, struct ice_flow_prof *prof, } /** - * ice_flow_acl_free_act_cntr - Free the acl rule's actions + * ice_flow_acl_free_act_cntr - Free the ACL rule's actions * @hw: pointer to the hardware structure * @acts: array of actions to be performed on a match * @acts_cnt: number of actions @@ -1575,11 +1575,11 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts, } /** - * ice_flow_acl_disassoc_scen - Disassociate the scenario to the Profile + * ice_flow_acl_disassoc_scen - Disassociate the scenario from the profile * @hw: pointer to the hardware structure * @prof: pointer to flow profile * - * Disassociate the scenario to the Profile for the PF of the VSI. + * Disassociate the scenario from the profile for the PF of the VSI. */ static enum ice_status ice_flow_acl_disassoc_scen(struct ice_hw *hw, struct ice_flow_prof *prof) @@ -1598,7 +1598,7 @@ ice_flow_acl_disassoc_scen(struct ice_hw *hw, struct ice_flow_prof *prof) if (status) return status; - /* Clear scenario for this pf */ + /* Clear scenario for this PF */ buf.pf_scenario_num[hw->pf_id] = ICE_ACL_INVALID_SCEN; status = ice_prgm_acl_prof_extrt(hw, prof_id, &buf, NULL); @@ -1773,7 +1773,7 @@ ice_flow_rem_prof_sync(struct ice_hw *hw, enum ice_block blk, struct ice_aqc_acl_prof_generic_frmt buf; u8 prof_id = 0; - /* Deassociate the scenario to the Profile for the PF */ + /* Disassociate the scenario from the profile for the PF */ status = ice_flow_acl_disassoc_scen(hw, prof); if (status) return status; @@ -2140,11 +2140,11 @@ u64 ice_flow_find_entry(struct ice_hw *hw, enum ice_block blk, u64 entry_id) } /** - * ice_flow_acl_check_actions - Checks the acl rule's actions + * ice_flow_acl_check_actions - Checks the ACL rule's actions * @hw: pointer to the hardware structure * @acts: array of actions to be performed on a match * @acts_cnt: number of actions - * @cnt_alloc: indicates if a ACL counter has been allocated. + * @cnt_alloc: indicates if an ACL counter has been allocated. */ static enum ice_status ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts, @@ -2203,7 +2203,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts, } /** - * ice_flow_acl_frmt_entry_range - Format an acl range checker for a given field + * ice_flow_acl_frmt_entry_range - Format an ACL range checker for a given field * @fld: number of the given field * @info: info about field * @range_buf: range checker configuration buffer @@ -2244,7 +2244,7 @@ ice_flow_acl_frmt_entry_range(u16 fld, struct ice_flow_fld_info *info, } /** - * ice_flow_acl_frmt_entry_fld - Partially format acl entry for a given field + * ice_flow_acl_frmt_entry_fld - Partially format ACL entry for a given field * @fld: number of the given field * @info: info about the field * @buf: buffer containing the entry @@ -2316,7 +2316,7 @@ ice_flow_acl_frmt_entry_fld(u16 fld, struct ice_flow_fld_info *info, u8 *buf, } /** - * ice_flow_acl_frmt_entry - Format acl entry + * ice_flow_acl_frmt_entry - Format ACL entry * @hw: pointer to the hardware structure * @prof: pointer to flow profile * @e: pointer to the flow entry @@ -2326,7 +2326,7 @@ ice_flow_acl_frmt_entry_fld(u16 fld, struct ice_flow_fld_info *info, u8 *buf, * * Formats the key (and key_inverse) to be matched from the data passed in, * along with data from the flow profile. This key/key_inverse pair makes up - * the 'entry' for an acl flow entry. + * the 'entry' for an ACL flow entry. */ static enum ice_status ice_flow_acl_frmt_entry(struct ice_hw *hw, struct ice_flow_prof *prof, @@ -3447,7 +3447,7 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds, } /* Check if a flow profile exists with the same protocol headers and - * associated with the input VSI. If so disasscociate the VSI from + * associated with the input VSI. If so disassociate the VSI from * this profile. The VSI will be added to a new profile created with * the protocol header and new hash field configuration. */ diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h index 9fb60a6d2c..93043acc87 100644 --- a/drivers/net/ice/base/ice_flow.h +++ b/drivers/net/ice/base/ice_flow.h @@ -471,8 +471,8 @@ ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id, u64 entry_id, u16 vsi, enum ice_flow_priority prio, void *data, struct ice_flow_action *acts, u8 acts_cnt, u64 *entry_h); -enum ice_status ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk, - u64 entry_h); +enum ice_status +ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk, u64 entry_h); void ice_flow_set_fld(struct ice_flow_seg_info *seg, enum ice_flow_field fld, u16 val_loc, u16 mask_loc, u16 last_loc, bool range); diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index af42fadfe0..0a46dd40b2 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -171,7 +171,7 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer, return ICE_ERR_PARAM; } - /* query the current node information from FW before additing it + /* query the current node information from FW before adding it * to the SW DB */ status = ice_sched_query_elem(hw, LE32_TO_CPU(info->node_teid), &elem); @@ -599,14 +599,14 @@ ice_alloc_lan_q_ctx(struct ice_hw *hw, u16 vsi_handle, u8 tc, u16 new_numqs) /** * ice_aq_rl_profile - performs a rate limiting task * @hw: pointer to the HW struct - * @opcode:opcode for add, query, or remove profile(s) + * @opcode: opcode for add, query, or remove profile(s) * @num_profiles: the number of profiles * @buf: pointer to buffer * @buf_size: buffer size in bytes * @num_processed: number of processed add or remove profile(s) to return * @cd: pointer to command details structure * - * Rl profile function to add, query, or remove profile(s) + * RL profile function to add, query, or remove profile(s) */ static enum ice_status ice_aq_rl_profile(struct ice_hw *hw, enum ice_adminq_opc opcode, @@ -789,7 +789,7 @@ void ice_sched_clear_agg(struct ice_hw *hw) } /** - * ice_sched_clear_tx_topo - clears the schduler tree nodes + * ice_sched_clear_tx_topo - clears the scheduler tree nodes * @pi: port information structure * * This function removes all the nodes from HW as well as from SW DB. @@ -2114,7 +2114,7 @@ ice_aq_query_node_to_root(struct ice_hw *hw, u32 node_teid, * This function validates aggregator ID. The function returns info if * aggregator ID is present in list otherwise it returns null. */ -static struct ice_sched_agg_info* +static struct ice_sched_agg_info * ice_get_agg_info(struct ice_hw *hw, u32 agg_id) { struct ice_sched_agg_info *agg_info; @@ -2697,7 +2697,7 @@ ice_cfg_agg(struct ice_port_info *pi, u32 agg_id, enum ice_agg_type agg_type, * The function returns aggregator VSI info based on VSI handle. This function * needs to be called with scheduler lock held. */ -static struct ice_sched_agg_vsi_info* +static struct ice_sched_agg_vsi_info * ice_get_agg_vsi_info(struct ice_sched_agg_info *agg_info, u16 vsi_handle) { struct ice_sched_agg_vsi_info *agg_vsi_info; @@ -2719,7 +2719,7 @@ ice_get_agg_vsi_info(struct ice_sched_agg_info *agg_info, u16 vsi_handle) * VSI has in this case a different aggregator than the default one. This * function needs to be called with scheduler lock held. */ -static struct ice_sched_agg_info* +static struct ice_sched_agg_info * ice_get_vsi_agg_info(struct ice_hw *hw, u16 vsi_handle) { struct ice_sched_agg_info *agg_info; @@ -3471,7 +3471,6 @@ ice_cfg_agg_bw_no_shared_lmt(struct ice_port_info *pi, u32 agg_id) * @pi: port information structure * @num_qs: number of VSI queues * @q_ids: queue IDs array - * @q_ids: queue IDs array * @q_prio: queue priority array * * This function configures the queue node priority (Sibling Priority) of the @@ -5128,7 +5127,7 @@ enum ice_status ice_cfg_rl_burst_size(struct ice_hw *hw, u32 bytes) return ICE_SUCCESS; } -/* +/** * ice_sched_replay_node_prio - re-configure node priority * @hw: pointer to the HW struct * @node: sched node to configure diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 600e1126c1..b4aab67808 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -2166,15 +2166,13 @@ out: */ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi) { - fi->lb_en = false; - fi->lan_en = false; - if ((fi->flag & ICE_FLTR_RX) && (fi->fltr_act == ICE_FWD_TO_VSI || fi->fltr_act == ICE_FWD_TO_VSI_LIST) && fi->lkup_type == ICE_SW_LKUP_LAST) fi->lan_en = true; - + fi->lb_en = false; + fi->lan_en = false; if ((fi->flag & ICE_FLTR_TX) && (fi->fltr_act == ICE_FWD_TO_VSI || fi->fltr_act == ICE_FWD_TO_VSI_LIST || @@ -5351,7 +5349,7 @@ static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts, u8 pe, qr; /* ar, cr, and qr are related to the recipe words, while - * be, de and pe are related to the lookup words + * be, de, and pe are related to the lookup words */ for (pe = 0; pe < lkup_exts->n_val_words; pe++) { for (qr = 0; qr < recp[i].lkup_exts.n_val_words; diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h index ba7c56f44f..7317d17eff 100644 --- a/drivers/net/ice/base/ice_switch.h +++ b/drivers/net/ice/base/ice_switch.h @@ -261,8 +261,7 @@ struct ice_sw_recipe { /* Profiles this recipe is associated with */ u8 num_profs, *prof_ids; - /* Possible result indexes are 44, 45, 46 and 47 */ -#define ICE_POSSIBLE_RES_IDX 0x0000F00000000000ULL + /* Bit map for possible result indexes */ ice_declare_bitmap(res_idxs, ICE_MAX_FV_WORDS); /* This allows user to specify the recipe priority. diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 3280d48d09..8f01a96b13 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -497,7 +497,7 @@ struct ice_nvm_info { u32 flash_size; /* Size of available flash in bytes */ u8 major_ver; /* major version of dev starter */ u8 minor_ver; /* minor version of dev starter */ - u8 blank_nvm_mode; /* is NVM empty (no FW present)*/ + u8 blank_nvm_mode; /* is NVM empty (no FW present) */ }; struct ice_link_default_override_tlv { @@ -1053,7 +1053,7 @@ enum ice_sw_fwd_act_type { #define ICE_SR_1ST_SCRATCH_PAD_PTR 0x41 #define ICE_SR_1ST_NVM_BANK_PTR 0x42 #define ICE_SR_NVM_BANK_SIZE 0x43 -#define ICE_SR_1ND_OROM_BANK_PTR 0x44 +#define ICE_SR_1ST_OROM_BANK_PTR 0x44 #define ICE_SR_OROM_BANK_SIZE 0x45 #define ICE_SR_NETLIST_BANK_PTR 0x46 #define ICE_SR_NETLIST_BANK_SIZE 0x47