net/ice/base: improve comments

Improve comments to follow naming rules.
Also the patch include some minor cleanup.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This commit is contained in:
Qi Zhang 2019-03-25 13:44:16 +08:00 committed by Ferruh Yigit
parent c88a5ede58
commit 0c451c3198
17 changed files with 804 additions and 802 deletions

View File

@ -71,7 +71,7 @@ struct ice_aqc_req_res {
#define ICE_AQ_RES_NVM_WRITE_DFLT_TIMEOUT_MS 180000
#define ICE_AQ_RES_CHNG_LOCK_DFLT_TIMEOUT_MS 1000
#define ICE_AQ_RES_GLBL_LOCK_DFLT_TIMEOUT_MS 3000
/* For SDP: pin id of the SDP */
/* For SDP: pin ID of the SDP */
__le32 res_number;
/* Status is only used for ICE_AQC_RES_ID_GLBL_LOCK */
__le16 status;
@ -854,7 +854,6 @@ struct ice_aqc_delete_elem {
/* Rate limiting profile for
* Add RL profile (indirect 0x0410)
* Query RL profile (indirect 0x0411)
@ -1154,8 +1153,8 @@ struct ice_aqc_set_phy_cfg_data {
__le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */
__le64 phy_type_high; /* Use values from ICE_PHY_TYPE_HIGH_* */
u8 caps;
#define ICE_AQ_PHY_ENA_TX_PAUSE_ABILITY BIT(0)
#define ICE_AQ_PHY_ENA_RX_PAUSE_ABILITY BIT(1)
#define ICE_AQ_PHY_ENA_TX_PAUSE_ABILITY BIT(0)
#define ICE_AQ_PHY_ENA_RX_PAUSE_ABILITY BIT(1)
#define ICE_AQ_PHY_ENA_LOW_POWER BIT(2)
#define ICE_AQ_PHY_ENA_LINK BIT(3)
#define ICE_AQ_PHY_ENA_AUTO_LINK_UPDT BIT(5)
@ -1228,7 +1227,7 @@ struct ice_aqc_get_link_status_data {
u8 ext_info;
#define ICE_AQ_LINK_PHY_TEMP_ALARM BIT(0)
#define ICE_AQ_LINK_EXCESSIVE_ERRORS BIT(1) /* Excessive Link Errors */
/* Port TX Suspended */
/* Port Tx Suspended */
#define ICE_AQ_LINK_TX_S 2
#define ICE_AQ_LINK_TX_M (0x03 << ICE_AQ_LINK_TX_S)
#define ICE_AQ_LINK_TX_ACTIVE 0
@ -1441,7 +1440,7 @@ struct ice_aqc_get_set_rss_lut {
/* Add TX LAN Queues (indirect 0x0C30) */
/* Add Tx LAN Queues (indirect 0x0C30) */
struct ice_aqc_add_txqs {
u8 num_qgrps;
u8 reserved[3];
@ -1451,7 +1450,7 @@ struct ice_aqc_add_txqs {
};
/* This is the descriptor of each queue entry for the Add TX LAN Queues
/* This is the descriptor of each queue entry for the Add Tx LAN Queues
* command (0x0C30). Only used within struct ice_aqc_add_tx_qgrp.
*/
struct ice_aqc_add_txqs_perq {
@ -1464,7 +1463,7 @@ struct ice_aqc_add_txqs_perq {
};
/* The format of the command buffer for Add TX LAN Queues (0x0C30)
/* The format of the command buffer for Add Tx LAN Queues (0x0C30)
* is an array of the following structs. Please note that the length of
* each struct ice_aqc_add_tx_qgrp is variable due
* to the variable number of queues in each group!
@ -1477,7 +1476,7 @@ struct ice_aqc_add_tx_qgrp {
};
/* Disable TX LAN Queues (indirect 0x0C31) */
/* Disable Tx LAN Queues (indirect 0x0C31) */
struct ice_aqc_dis_txqs {
u8 cmd_type;
#define ICE_AQC_Q_DIS_CMD_S 0
@ -1500,7 +1499,7 @@ struct ice_aqc_dis_txqs {
};
/* The buffer for Disable TX LAN Queues (indirect 0x0C31)
/* The buffer for Disable Tx LAN Queues (indirect 0x0C31)
* contains the following structures, arrayed one after the
* other.
* Note: Since the q_id is 16 bits wide, if the
@ -1528,7 +1527,7 @@ struct ice_aqc_dis_txq {
};
/* TX LAN Queues Cleanup Event (0x0C31) */
/* Tx LAN Queues Cleanup Event (0x0C31) */
struct ice_aqc_txqs_cleanup {
__le16 caller_opc;
__le16 cmd_tag;
@ -1536,7 +1535,7 @@ struct ice_aqc_txqs_cleanup {
};
/* Move / Reconfigure TX Queues (indirect 0x0C32) */
/* Move / Reconfigure Tx Queues (indirect 0x0C32) */
struct ice_aqc_move_txqs {
u8 cmd_type;
#define ICE_AQC_Q_CMD_TYPE_S 0
@ -1557,7 +1556,7 @@ struct ice_aqc_move_txqs {
};
/* This is the descriptor of each queue entry for the move TX LAN Queues
/* This is the descriptor of each queue entry for the move Tx LAN Queues
* command (0x0C32).
*/
struct ice_aqc_move_txqs_elem {
@ -1950,7 +1949,7 @@ enum ice_adminq_opc {
ice_aqc_opc_get_rss_key = 0x0B04,
ice_aqc_opc_get_rss_lut = 0x0B05,
/* TX queue handling commands/events */
/* Tx queue handling commands/events */
ice_aqc_opc_add_txqs = 0x0C30,
ice_aqc_opc_dis_txqs = 0x0C31,
ice_aqc_opc_txqs_cleanup = 0x0C31,

View File

@ -36,7 +36,7 @@
* @hw: pointer to the HW structure
*
* This function sets the MAC type of the adapter based on the
* vendor ID and device ID stored in the hw structure.
* vendor ID and device ID stored in the HW structure.
*/
static enum ice_status ice_set_mac_type(struct ice_hw *hw)
{
@ -79,7 +79,7 @@ enum ice_status ice_clear_pf_cfg(struct ice_hw *hw)
/**
* ice_aq_manage_mac_read - manage MAC address read command
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @buf: a virtual buffer to hold the manage MAC read response
* @buf_size: Size of the virtual buffer
* @cd: pointer to command details structure or NULL
@ -338,7 +338,7 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,
/* flag cleared so calling functions don't call AQ again */
pi->phy.get_link_info = false;
return status;
return ICE_SUCCESS;
}
/**
@ -426,7 +426,7 @@ static void ice_init_flex_flds(struct ice_hw *hw, enum ice_rxdid prof_id)
/**
* ice_init_fltr_mgmt_struct - initializes filter management list and locks
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*/
static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw)
{
@ -446,7 +446,7 @@ static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw)
/**
* ice_cleanup_fltr_mgmt_struct - cleanup filter management list and locks
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*/
static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw)
{
@ -503,7 +503,7 @@ static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw)
/**
* ice_cfg_fw_log - configure FW logging
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @enable: enable certain FW logging events if true, disable all if false
*
* This function enables/disables the FW logging via Rx CQ events and a UART
@ -652,7 +652,7 @@ out:
/**
* ice_output_fw_log
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @desc: pointer to the AQ message descriptor
* @buf: pointer to the buffer accompanying the AQ message
*
@ -668,7 +668,7 @@ void ice_output_fw_log(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf)
/**
* ice_get_itr_intrl_gran - determine int/intrl granularity
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Determines the itr/intrl granularities based on the maximum aggregate
* bandwidth according to the device's configuration during power-on.
@ -763,7 +763,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
goto err_unroll_cqinit;
}
/* set the back pointer to hw */
/* set the back pointer to HW */
hw->port_info->hw = hw;
/* Initialize port_info struct with switch configuration data */
@ -1034,7 +1034,7 @@ enum ice_status ice_reset(struct ice_hw *hw, enum ice_reset_req req)
* @ice_rxq_ctx: pointer to the rxq context
* @rxq_index: the index of the Rx queue
*
* Copies rxq context from dense structure to hw register space
* Copies rxq context from dense structure to HW register space
*/
static enum ice_status
ice_copy_rxq_ctx_to_hw(struct ice_hw *hw, u8 *ice_rxq_ctx, u32 rxq_index)
@ -1047,7 +1047,7 @@ ice_copy_rxq_ctx_to_hw(struct ice_hw *hw, u8 *ice_rxq_ctx, u32 rxq_index)
if (rxq_index > QRX_CTRL_MAX_INDEX)
return ICE_ERR_PARAM;
/* Copy each dword separately to hw */
/* Copy each dword separately to HW */
for (i = 0; i < ICE_RXQ_CTX_SIZE_DWORDS; i++) {
wr32(hw, QRX_CONTEXT(i, rxq_index),
*((u32 *)(ice_rxq_ctx + (i * sizeof(u32)))));
@ -1091,7 +1091,7 @@ static const struct ice_ctx_ele ice_rlan_ctx_info[] = {
* @rxq_index: the index of the Rx queue
*
* Converts rxq context from sparse to dense structure and then writes
* it to hw register space
* it to HW register space
*/
enum ice_status
ice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx,
@ -1109,7 +1109,7 @@ ice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx,
* @hw: pointer to the hardware structure
* @rxq_index: the index of the Rx queue to clear
*
* Clears rxq context in hw register space
* Clears rxq context in HW register space
*/
enum ice_status ice_clear_rxq_ctx(struct ice_hw *hw, u32 rxq_index)
{
@ -1166,7 +1166,7 @@ const struct ice_ctx_ele ice_tlan_ctx_info[] = {
* @ice_tx_cmpltnq_ctx: pointer to the Tx completion queue context
* @tx_cmpltnq_index: the index of the completion queue
*
* Copies Tx completion q context from dense structure to hw register space
* Copies Tx completion queue context from dense structure to HW register space
*/
static enum ice_status
ice_copy_tx_cmpltnq_ctx_to_hw(struct ice_hw *hw, u8 *ice_tx_cmpltnq_ctx,
@ -1180,7 +1180,7 @@ ice_copy_tx_cmpltnq_ctx_to_hw(struct ice_hw *hw, u8 *ice_tx_cmpltnq_ctx,
if (tx_cmpltnq_index > GLTCLAN_CQ_CNTX0_MAX_INDEX)
return ICE_ERR_PARAM;
/* Copy each dword separately to hw */
/* Copy each dword separately to HW */
for (i = 0; i < ICE_TX_CMPLTNQ_CTX_SIZE_DWORDS; i++) {
wr32(hw, GLTCLAN_CQ_CNTX(i, tx_cmpltnq_index),
*((u32 *)(ice_tx_cmpltnq_ctx + (i * sizeof(u32)))));
@ -1215,7 +1215,7 @@ static const struct ice_ctx_ele ice_tx_cmpltnq_ctx_info[] = {
* @tx_cmpltnq_index: the index of the completion queue
*
* Converts completion queue context from sparse to dense structure and then
* writes it to hw register space
* writes it to HW register space
*/
enum ice_status
ice_write_tx_cmpltnq_ctx(struct ice_hw *hw,
@ -1233,7 +1233,7 @@ ice_write_tx_cmpltnq_ctx(struct ice_hw *hw,
* @hw: pointer to the hardware structure
* @tx_cmpltnq_index: the index of the completion queue to clear
*
* Clears Tx completion queue context in hw register space
* Clears Tx completion queue context in HW register space
*/
enum ice_status
ice_clear_tx_cmpltnq_ctx(struct ice_hw *hw, u32 tx_cmpltnq_index)
@ -1256,7 +1256,7 @@ ice_clear_tx_cmpltnq_ctx(struct ice_hw *hw, u32 tx_cmpltnq_index)
* @ice_tx_drbell_q_ctx: pointer to the doorbell queue context
* @tx_drbell_q_index: the index of the doorbell queue
*
* Copies doorbell q context from dense structure to hw register space
* Copies doorbell queue context from dense structure to HW register space
*/
static enum ice_status
ice_copy_tx_drbell_q_ctx_to_hw(struct ice_hw *hw, u8 *ice_tx_drbell_q_ctx,
@ -1270,7 +1270,7 @@ ice_copy_tx_drbell_q_ctx_to_hw(struct ice_hw *hw, u8 *ice_tx_drbell_q_ctx,
if (tx_drbell_q_index > QTX_COMM_DBLQ_DBELL_MAX_INDEX)
return ICE_ERR_PARAM;
/* Copy each dword separately to hw */
/* Copy each dword separately to HW */
for (i = 0; i < ICE_TX_DRBELL_Q_CTX_SIZE_DWORDS; i++) {
wr32(hw, QTX_COMM_DBLQ_CNTX(i, tx_drbell_q_index),
*((u32 *)(ice_tx_drbell_q_ctx + (i * sizeof(u32)))));
@ -1306,7 +1306,7 @@ static const struct ice_ctx_ele ice_tx_drbell_q_ctx_info[] = {
* @tx_drbell_q_index: the index of the doorbell queue
*
* Converts doorbell queue context from sparse to dense structure and then
* writes it to hw register space
* writes it to HW register space
*/
enum ice_status
ice_write_tx_drbell_q_ctx(struct ice_hw *hw,
@ -1324,7 +1324,7 @@ ice_write_tx_drbell_q_ctx(struct ice_hw *hw,
* @hw: pointer to the hardware structure
* @tx_drbell_q_index: the index of the doorbell queue to clear
*
* Clears doorbell queue context in hw register space
* Clears doorbell queue context in HW register space
*/
enum ice_status
ice_clear_tx_drbell_q_ctx(struct ice_hw *hw, u32 tx_drbell_q_index)
@ -1394,7 +1394,7 @@ ice_debug_cq(struct ice_hw *hw, u32 mask, void *desc, void *buf, u16 buf_len)
/**
* ice_aq_send_cmd - send FW Admin Queue command to FW Admin Queue
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @desc: descriptor describing the command
* @buf: buffer to use for indirect commands (NULL for direct commands)
* @buf_size: size of buffer for indirect commands (0 for direct commands)
@ -1411,7 +1411,7 @@ ice_aq_send_cmd(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf,
/**
* ice_aq_get_fw_ver
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @cd: pointer to command details structure or NULL
*
* Get the firmware version (0x0001) from the admin queue commands
@ -1446,7 +1446,7 @@ enum ice_status ice_aq_get_fw_ver(struct ice_hw *hw, struct ice_sq_cd *cd)
/**
* ice_aq_q_shutdown
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @unloading: is the driver unloading itself
*
* Tell the Firmware that we're shutting down the AdminQ and whether
@ -1469,8 +1469,8 @@ enum ice_status ice_aq_q_shutdown(struct ice_hw *hw, bool unloading)
/**
* ice_aq_req_res
* @hw: pointer to the hw struct
* @res: resource id
* @hw: pointer to the HW struct
* @res: resource ID
* @access: access type
* @sdp_number: resource number
* @timeout: the maximum time in ms that the driver may hold the resource
@ -1557,8 +1557,8 @@ ice_aq_req_res(struct ice_hw *hw, enum ice_aq_res_ids res,
/**
* ice_aq_release_res
* @hw: pointer to the hw struct
* @res: resource id
* @hw: pointer to the HW struct
* @res: resource ID
* @sdp_number: resource number
* @cd: pointer to command details structure or NULL
*
@ -1586,7 +1586,7 @@ ice_aq_release_res(struct ice_hw *hw, enum ice_aq_res_ids res, u8 sdp_number,
/**
* ice_acquire_res
* @hw: pointer to the HW structure
* @res: resource id
* @res: resource ID
* @access: access type (read or write)
* @timeout: timeout in milliseconds
*
@ -1650,7 +1650,7 @@ ice_acquire_res_exit:
/**
* ice_release_res
* @hw: pointer to the HW structure
* @res: resource id
* @res: resource ID
*
* This function will release a resource using the proper Admin Command.
*/
@ -1664,7 +1664,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res)
status = ice_aq_release_res(hw, res, 0, NULL);
/* there are some rare cases when trying to release the resource
* results in an admin Q timeout, so handle them correctly
* results in an admin queue timeout, so handle them correctly
*/
while ((status == ICE_ERR_AQ_TIMEOUT) &&
(total_delay < hw->adminq.sq_cmd_timeout)) {
@ -1676,7 +1676,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res)
/**
* ice_aq_alloc_free_res - command to allocate/free resources
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @num_entries: number of resource entries in buffer
* @buf: Indirect buffer to hold data parameters and response
* @buf_size: size of buffer for indirect commands
@ -1714,7 +1714,7 @@ ice_aq_alloc_free_res(struct ice_hw *hw, u16 num_entries,
/**
* ice_alloc_hw_res - allocate resource
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @type: type of resource
* @num: number of resources to allocate
* @sh: shared if true, dedicated if false
@ -1751,8 +1751,8 @@ ice_alloc_res_exit:
}
/**
* ice_free_hw_res - free allocated hw resource
* @hw: pointer to the hw struct
* ice_free_hw_res - free allocated HW resource
* @hw: pointer to the HW struct
* @type: type of resource to free
* @num: number of resources
* @res: pointer to array that contains the resources to free
@ -1786,7 +1786,7 @@ ice_free_hw_res(struct ice_hw *hw, u16 type, u16 num, u16 *res)
/**
* ice_get_num_per_func - determine number of resources per PF
* @hw: pointer to the hw structure
* @hw: pointer to the HW structure
* @max: value to be evenly split between each PF
*
* Determine the number of valid functions by going through the bitmap returned
@ -1809,7 +1809,7 @@ static u32 ice_get_num_per_func(struct ice_hw *hw, u32 max)
/**
* ice_parse_caps - parse function/device capabilities
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @buf: pointer to a buffer containing function/device capability records
* @cap_count: number of capability records in the list
* @opc: type of capabilities list to parse
@ -1929,7 +1929,7 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count,
/**
* ice_aq_discover_caps - query function/device capabilities
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @buf: a virtual buffer to hold the capabilities
* @buf_size: Size of the virtual buffer
* @cap_count: cap count needed if AQ err==ENOMEM
@ -2028,7 +2028,7 @@ enum ice_status ice_get_caps(struct ice_hw *hw)
/**
* ice_aq_manage_mac_write - manage MAC address write command
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @mac_addr: MAC address to be written as LAA/LAA+WoL/Port address
* @flags: flags to control write behavior
* @cd: pointer to command details structure or NULL
@ -2057,7 +2057,7 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags,
/**
* ice_aq_clear_pxe_mode
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Tell the firmware that the driver is taking over from PXE (0x0110).
*/
@ -2073,7 +2073,7 @@ static enum ice_status ice_aq_clear_pxe_mode(struct ice_hw *hw)
/**
* ice_clear_pxe_mode - clear pxe operations mode
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Make sure all PXE mode settings are cleared, including things
* like descriptor fetch/write-back mode.
@ -2090,10 +2090,10 @@ void ice_clear_pxe_mode(struct ice_hw *hw)
* @phy_type_low: lower part of phy_type
* @phy_type_high: higher part of phy_type
*
* This helper function will convert an entry in phy type structure
* This helper function will convert an entry in PHY type structure
* [phy_type_low, phy_type_high] to its corresponding link speed.
* Note: In the structure of [phy_type_low, phy_type_high], there should
* be one bit set, as this function will convert one phy type to its
* be one bit set, as this function will convert one PHY type to its
* speed.
* If no bit gets set, ICE_LINK_SPEED_UNKNOWN will be returned
* If more than one bit gets set, ICE_LINK_SPEED_UNKNOWN will be returned
@ -2263,7 +2263,7 @@ ice_update_phy_type(u64 *phy_type_low, u64 *phy_type_high,
/**
* ice_aq_set_phy_cfg
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @lport: logical port number
* @cfg: structure with PHY configuration data to be set
* @cd: pointer to command details structure or NULL
@ -2372,7 +2372,7 @@ ice_set_fc(struct ice_port_info *pi, u8 *aq_failures, bool ena_auto_link_update)
if (!pcaps)
return ICE_ERR_NO_MEMORY;
/* Get the current phy config */
/* Get the current PHY config */
status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps,
NULL);
if (status) {
@ -2561,7 +2561,7 @@ ice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link,
/**
* ice_aq_set_event_mask
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @port_num: port number of the physical function
* @mask: event mask to be set
* @cd: pointer to command details structure or NULL
@ -2587,7 +2587,7 @@ ice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask,
/**
* ice_aq_set_mac_loopback
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @ena_lpbk: Enable or Disable loopback
* @cd: pointer to command details structure or NULL
*
@ -2775,7 +2775,7 @@ ice_aq_set_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type,
/**
* __ice_aq_get_set_rss_key
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_id: VSI FW index
* @key: pointer to key info struct
* @set: set true to set the key, false to get the key
@ -2810,7 +2810,7 @@ ice_status __ice_aq_get_set_rss_key(struct ice_hw *hw, u16 vsi_id,
/**
* ice_aq_get_rss_key
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: software VSI handle
* @key: pointer to key info struct
*
@ -2829,7 +2829,7 @@ ice_aq_get_rss_key(struct ice_hw *hw, u16 vsi_handle,
/**
* ice_aq_set_rss_key
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: software VSI handle
* @keys: pointer to key info struct
*
@ -2916,8 +2916,8 @@ ice_aq_add_lan_txq(struct ice_hw *hw, u8 num_qgrps,
* @num_qgrps: number of groups in the list
* @qg_list: the list of groups to disable
* @buf_size: the total size of the qg_list buffer in bytes
* @rst_src: if called due to reset, specifies the rst source
* @vmvf_num: the relative vm or vf number that is undergoing the reset
* @rst_src: if called due to reset, specifies the reset source
* @vmvf_num: the relative VM or VF number that is undergoing the reset
* @cd: pointer to command details structure or NULL
*
* Disable LAN Tx queue (0x0C31)
@ -2993,7 +2993,7 @@ do_aq:
ice_debug(hw, ICE_DBG_SCHED, "VM%d disable failed %d\n",
vmvf_num, hw->adminq.sq_last_status);
else
ice_debug(hw, ICE_DBG_SCHED, "disable Q %d failed %d\n",
ice_debug(hw, ICE_DBG_SCHED, "disable queue %d failed %d\n",
LE16_TO_CPU(qg_list[0].q_id[0]),
hw->adminq.sq_last_status);
}
@ -3232,13 +3232,13 @@ ice_set_ctx(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
* ice_ena_vsi_txq
* @pi: port information structure
* @vsi_handle: software VSI handle
* @tc: tc number
* @tc: TC number
* @num_qgrps: Number of added queue groups
* @buf: list of queue groups to be added
* @buf_size: size of buffer for indirect command
* @cd: pointer to command details structure or NULL
*
* This function adds one lan q
* This function adds one LAN queue
*/
enum ice_status
ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps,
@ -3282,14 +3282,14 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps,
* Bit 5-6.
* - Bit 7 is reserved.
* Without setting the generic section as valid in valid_sections, the
* Admin Q command will fail with error code ICE_AQ_RC_EINVAL.
* Admin queue command will fail with error code ICE_AQ_RC_EINVAL.
*/
buf->txqs[0].info.valid_sections = ICE_AQC_ELEM_VALID_GENERIC;
/* add the lan q */
/* add the LAN queue */
status = ice_aq_add_lan_txq(hw, num_qgrps, buf, buf_size, cd);
if (status != ICE_SUCCESS) {
ice_debug(hw, ICE_DBG_SCHED, "enable Q %d failed %d\n",
ice_debug(hw, ICE_DBG_SCHED, "enable queue %d failed %d\n",
LE16_TO_CPU(buf->txqs[0].txq_id),
hw->adminq.sq_last_status);
goto ena_txq_exit;
@ -3298,7 +3298,7 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps,
node.node_teid = buf->txqs[0].q_teid;
node.data.elem_type = ICE_AQC_ELEM_TYPE_LEAF;
/* add a leaf node into schduler tree q layer */
/* add a leaf node into schduler tree queue layer */
status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node);
ena_txq_exit:
@ -3312,8 +3312,8 @@ ena_txq_exit:
* @num_queues: number of queues
* @q_ids: pointer to the q_id array
* @q_teids: pointer to queue node teids
* @rst_src: if called due to reset, specifies the rst source
* @vmvf_num: the relative vm or vf number that is undergoing the reset
* @rst_src: if called due to reset, specifies the reset source
* @vmvf_num: the relative VM or VF number that is undergoing the reset
* @cd: pointer to command details structure or NULL
*
* This function removes queues and their corresponding nodes in SW DB
@ -3363,12 +3363,12 @@ ice_dis_vsi_txq(struct ice_port_info *pi, u8 num_queues, u16 *q_ids,
}
/**
* ice_cfg_vsi_qs - configure the new/exisiting VSI queues
* ice_cfg_vsi_qs - configure the new/existing VSI queues
* @pi: port information structure
* @vsi_handle: software VSI handle
* @tc_bitmap: TC bitmap
* @maxqs: max queues array per TC
* @owner: lan or rdma
* @owner: LAN or RDMA
*
* This function adds/updates the VSI queues per TC.
*/
@ -3403,13 +3403,13 @@ ice_cfg_vsi_qs(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap,
}
/**
* ice_cfg_vsi_lan - configure VSI lan queues
* ice_cfg_vsi_lan - configure VSI LAN queues
* @pi: port information structure
* @vsi_handle: software VSI handle
* @tc_bitmap: TC bitmap
* @max_lanqs: max lan queues array per TC
* @max_lanqs: max LAN queues array per TC
*
* This function adds/updates the VSI lan queues per TC.
* This function adds/updates the VSI LAN queues per TC.
*/
enum ice_status
ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap,
@ -3423,7 +3423,7 @@ ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap,
/**
* ice_replay_pre_init - replay pre initialization
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Initializes required config data for VSI, FD, ACL, and RSS before replay.
*/
@ -3447,9 +3447,9 @@ static enum ice_status ice_replay_pre_init(struct ice_hw *hw)
}
/**
* ice_replay_vsi - replay vsi configuration
* @hw: pointer to the hw struct
* @vsi_handle: driver vsi handle
* ice_replay_vsi - replay VSI configuration
* @hw: pointer to the HW struct
* @vsi_handle: driver VSI handle
*
* Restore all VSI configuration after reset. It is required to call this
* function with main VSI first.
@ -3477,7 +3477,7 @@ enum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle)
/**
* ice_replay_post - post replay configuration cleanup
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Post replay cleanup.
*/
@ -3553,9 +3553,9 @@ ice_stat_update32(struct ice_hw *hw, u32 reg, bool prev_stat_loaded,
/**
* ice_sched_query_elem - query element information from hw
* @hw: pointer to the hw struct
* @node_teid: node teid to be queried
* ice_sched_query_elem - query element information from HW
* @hw: pointer to the HW struct
* @node_teid: node TEID to be queried
* @buf: buffer to element information
*
* This function queries HW element information

View File

@ -61,8 +61,7 @@ enum ice_status ice_get_caps(struct ice_hw *hw);
* ... the value of pointer would equal 0x1008, since 0x1008 is the next
* address after 0x1006 which is divisible by 4.
*/
#define ICE_ALIGN(ptr, align) (((ptr) + ((align) - 1)) & ~((align) - 1))
#define ICE_ALIGN(ptr, align) (((ptr) + ((align) - 1)) & ~((align) - 1))
enum ice_status
ice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx,
@ -149,7 +148,6 @@ ice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode,
enum ice_status
ice_dis_vsi_txq(struct ice_port_info *pi, u8 num_queues, u16 *q_ids,
u32 *q_teids, enum ice_disq_rst_src rst_src, u16 vmvf_num,

View File

@ -54,7 +54,7 @@ static void ice_mailbox_init_regs(struct ice_hw *hw)
/**
* ice_check_sq_alive
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @cq: pointer to the specific Control queue
*
* Returns true if Queue is enabled else false.
@ -729,7 +729,7 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
/**
* ice_sq_done - check if FW has processed the Admin Send Queue (ATQ)
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @cq: pointer to the specific Control queue
*
* Returns true if the firmware has processed all descriptors on the
@ -745,7 +745,7 @@ static bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq)
/**
* ice_sq_send_cmd - send command to Control Queue (ATQ)
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @cq: pointer to the specific Control queue
* @desc: prefilled descriptor describing the command (non DMA mem)
* @buf: buffer to use for indirect commands (or NULL for direct commands)
@ -990,7 +990,7 @@ void ice_fill_dflt_direct_cmd_desc(struct ice_aq_desc *desc, u16 opcode)
/**
* ice_clean_rq_elem
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @cq: pointer to the specific Control queue
* @e: event info from the receive descriptor, includes any buffers
* @pending: number of events that could be left to process

View File

@ -325,11 +325,11 @@ ice_pkg_enum_entry(struct ice_seg *ice_seg, struct ice_pkg_enum *state,
* ice_boost_tcam_handler
* @sect_type: section type
* @section: pointer to section
* @index: index of the boost tcam entry to be returned
* @offset: pointer to receive absolute offset, always 0 for boost tcam sections
* @index: index of the boost TCAM entry to be returned
* @offset: pointer to receive absolute offset, always 0 for boost TCAM sections
*
* This is a callback function that can be passed to ice_pkg_enum_entry.
* Handles enumeration of individual boost tcam entries.
* Handles enumeration of individual boost TCAM entries.
*/
static void *
ice_boost_tcam_handler(u32 sect_type, void *section, u32 index, u32 *offset)
@ -501,7 +501,7 @@ void ice_init_pkg_hints(struct ice_hw *hw, struct ice_seg *ice_seg)
label_name = ice_enum_labels(NULL, 0, &state, &val);
}
/* Cache the appropriate boost tcam entry pointers */
/* Cache the appropriate boost TCAM entry pointers */
for (i = 0; i < hw->tnl.count; i++) {
ice_find_boost_entry(ice_seg, hw->tnl.tbl[i].boost_addr,
&hw->tnl.tbl[i].boost_entry);
@ -1078,7 +1078,7 @@ enum ice_status ice_download_pkg(struct ice_hw *hw, struct ice_seg *ice_seg)
* @hw: pointer to the hardware structure
* @pkg_hdr: pointer to the driver's package hdr
*
* Saves off the package details into the hw structure.
* Saves off the package details into the HW structure.
*/
enum ice_status
ice_init_pkg_info(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr)
@ -1468,14 +1468,14 @@ ice_sw_fv_handler(u32 sect_type, void *section, u32 index, u32 *offset)
/**
* ice_get_sw_fv_list
* @hw: pointer to the HW structure
* @prot_ids: field vector to search for with a given protocol id
* @prot_ids: field vector to search for with a given protocol ID
* @ids_cnt: lookup/protocol count
* @fv_list: Head of a list
*
* Finds all the field vector entries from switch block that contain
* a given protocol id and returns a list of structures of type
* a given protocol ID and returns a list of structures of type
* "ice_sw_fv_list_entry". Every structure in the list has a field vector
* definition and profile id information
* definition and profile ID information
* NOTE: The caller of the function is responsible for freeing the memory
* allocated for every list entry.
*/
@ -1782,11 +1782,11 @@ void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld)
/* PTG Management */
/**
* ice_ptg_update_xlt1 - Updates packet type groups in hw via xlt1 table
* ice_ptg_update_xlt1 - Updates packet type groups in HW via XLT1 table
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
*
* This function will update the xlt1 hardware table to reflect the new
* This function will update the XLT1 hardware table to reflect the new
* packet type group configuration.
*/
enum ice_status ice_ptg_update_xlt1(struct ice_hw *hw, enum ice_block blk)
@ -1817,7 +1817,7 @@ enum ice_status ice_ptg_update_xlt1(struct ice_hw *hw, enum ice_block blk)
/**
* ice_ptg_find_ptype - Search for packet type group using packet type (ptype)
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @ptype: the ptype to search for
* @ptg: pointer to variable that receives the PTG
*
@ -1838,7 +1838,7 @@ ice_ptg_find_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 *ptg)
/**
* ice_ptg_alloc_val - Allocates a new packet type group ID by value
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @ptg: the ptg to allocate
*
* This function allocates a given packet type group ID specified by the ptg
@ -1853,7 +1853,7 @@ void ice_ptg_alloc_val(struct ice_hw *hw, enum ice_block blk, u8 ptg)
/**
* ice_ptg_alloc - Find a free entry and allocates a new packet type group ID
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
*
* This function allocates and returns a new packet type group ID. Note
* that 0 is the default packet type group, so successfully created PTGs will
@ -1877,7 +1877,7 @@ u8 ice_ptg_alloc(struct ice_hw *hw, enum ice_block blk)
/**
* ice_ptg_free - Frees a packet type group
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @ptg: the ptg ID to free
*
* This function frees a packet type group, and returns all the current ptypes
@ -1902,7 +1902,7 @@ void ice_ptg_free(struct ice_hw *hw, enum ice_block blk, u8 ptg)
/**
* ice_ptg_remove_ptype - Removes ptype from a particular packet type group
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @ptype: the ptype to remove
* @ptg: the ptg to remove the ptype from
*
@ -1947,7 +1947,7 @@ ice_ptg_remove_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg)
/**
* ice_ptg_add_mv_ptype - Adds/moves ptype to a particular packet type group
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @ptype: the ptype to add or move
* @ptg: the ptg to add or move the ptype to
*
@ -1998,10 +1998,10 @@ ice_ptg_add_mv_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg)
/* Block / table size info */
struct ice_blk_size_details {
u16 xlt1; /* # xlt1 entries */
u16 xlt2; /* # xlt2 entries */
u16 prof_tcam; /* # profile id tcam entries */
u16 prof_id; /* # profile ids */
u16 xlt1; /* # XLT1 entries */
u16 xlt2; /* # XLT2 entries */
u16 prof_tcam; /* # profile ID TCAM entries */
u16 prof_id; /* # profile IDs */
u8 prof_cdid_bits; /* # cdid one-hot bits used in key */
u16 prof_redir; /* # profile redirection entries */
u16 es; /* # extraction sequence entries */
@ -2079,7 +2079,7 @@ ice_match_prop_lst(struct LIST_HEAD_TYPE *list1, struct LIST_HEAD_TYPE *list2)
/* profile cookies must compare, and in the exact same order to take
* into account priority
*/
while (--count) {
while (count--) {
if (tmp2->profile_cookie != tmp1->profile_cookie)
return false;
@ -2093,13 +2093,13 @@ ice_match_prop_lst(struct LIST_HEAD_TYPE *list1, struct LIST_HEAD_TYPE *list2)
/* VSIG Management */
/**
* ice_vsig_update_xlt2_sect - update one section of xlt2 table
* ice_vsig_update_xlt2_sect - update one section of XLT2 table
* @hw: pointer to the hardware structure
* @blk: hw block
* @vsi: hw vsi number to program
* @vsig: vsig for the vsi
* @blk: HW block
* @vsi: HW VSI number to program
* @vsig: vsig for the VSI
*
* This function will update the xlt2 hardware table with the input vsi
* This function will update the XLT2 hardware table with the input VSI
* group configuration.
*/
static enum ice_status
@ -2128,11 +2128,11 @@ ice_vsig_update_xlt2_sect(struct ice_hw *hw, enum ice_block blk, u16 vsi,
}
/**
* ice_vsig_update_xlt2 - update xlt2 table with VSIG configuration
* ice_vsig_update_xlt2 - update XLT2 table with VSIG configuration
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
*
* This function will update the xlt2 hardware table with the input vsi
* This function will update the XLT2 hardware table with the input VSI
* group configuration of used vsis.
*/
enum ice_status ice_vsig_update_xlt2(struct ice_hw *hw, enum ice_block blk)
@ -2158,14 +2158,14 @@ enum ice_status ice_vsig_update_xlt2(struct ice_hw *hw, enum ice_block blk)
}
/**
* ice_vsig_find_vsi - find a VSIG that contains a specified vsi
* ice_vsig_find_vsi - find a VSIG that contains a specified VSI
* @hw: pointer to the hardware structure
* @blk: hw block
* @vsi: vsi of interest
* @vsig: pointer to receive the vsi group
* @blk: HW block
* @vsi: VSI of interest
* @vsig: pointer to receive the VSI group
*
* This function will lookup the vsi entry in the XLT2 list and return
* the vsi group its associated with.
* This function will lookup the VSI entry in the XLT2 list and return
* the VSI group its associated with.
*/
enum ice_status
ice_vsig_find_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 *vsig)
@ -2174,7 +2174,7 @@ ice_vsig_find_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 *vsig)
return ICE_ERR_PARAM;
/* As long as there's a default or valid VSIG associated with the input
* vsi, the functions returns a success. Any handling of VSIG will be
* VSI, the functions returns a success. Any handling of VSIG will be
* done by the following add, update or remove functions.
*/
*vsig = hw->blk[blk].xlt2.vsis[vsi].vsig;
@ -2185,7 +2185,7 @@ ice_vsig_find_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 *vsig)
/**
* ice_vsig_alloc_val - allocate a new VSIG by value
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @vsig: the vsig to allocate
*
* This function will allocate a given VSIG specified by the vsig parameter.
@ -2205,7 +2205,7 @@ static u16 ice_vsig_alloc_val(struct ice_hw *hw, enum ice_block blk, u16 vsig)
/**
* ice_vsig_alloc - Finds a free entry and allocates a new VSIG
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
*
* This function will iterate through the VSIG list and mark the first
* unused entry for the new VSIG entry as used and return that value.
@ -2222,16 +2222,16 @@ static u16 ice_vsig_alloc(struct ice_hw *hw, enum ice_block blk)
}
/**
* ice_find_dup_props_vsig - find vsi group with a specified set of properties
* ice_find_dup_props_vsig - find VSI group with a specified set of properties
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @chs: characteristic list
* @vsig: returns the VSIG with the matching profiles, if found
*
* Each VSIG is associated with a characteristic set; i.e. all vsis under
* Each VSIG is associated with a characteristic set; i.e. all VSIs under
* a group have the same characteristic set. To check if there exists a VSIG
* which has the same characteristics as the input characteristics; this
* function will iterate through the xlt2 list and return the VSIG that has a
* function will iterate through the XLT2 list and return the VSIG that has a
* matching configuration. In order to make sure that priorities are accounted
* for, the list must match exactly, including the order in which the
* characteristics are listed.
@ -2257,12 +2257,12 @@ ice_find_dup_props_vsig(struct ice_hw *hw, enum ice_block blk,
}
/**
* ice_vsig_free - free vsi group
* ice_vsig_free - free VSI group
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @vsig: VSIG to remove
*
* The function will remove all vsis associated with the input VSIG and move
* The function will remove all VSIs associated with the input VSIG and move
* them to the DEFAULT_VSIG and mark the VSIG available.
*/
enum ice_status
@ -2310,14 +2310,14 @@ ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig)
}
/**
* ice_vsig_add_mv_vsi - add or move a vsi to a vsi group
* ice_vsig_add_mv_vsi - add or move a VSI to a VSI group
* @hw: pointer to the hardware structure
* @blk: hw block
* @vsi: vsi to move
* @vsig: destination vsi group
* @blk: HW block
* @vsi: VSI to move
* @vsig: destination VSI group
*
* This function will move or add the input vsi to the target VSIG.
* The function will find the original VSIG the vsi belongs to and
* This function will move or add the input VSI to the target VSIG.
* The function will find the original VSIG the VSI belongs to and
* move the entry to the DEFAULT_VSIG, update the original VSIG and
* then move entry to the new VSIG.
*/
@ -2358,7 +2358,7 @@ ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)
if (idx == ICE_DEFAULT_VSIG)
return ICE_SUCCESS;
/* Create vsi entry and add VSIG and prop_mask values */
/* Create VSI entry and add VSIG and prop_mask values */
hw->blk[blk].xlt2.vsis[vsi].vsig = vsig;
hw->blk[blk].xlt2.vsis[vsi].changed = 1;
@ -2373,13 +2373,13 @@ ice_vsig_add_mv_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)
}
/**
* ice_vsig_remove_vsi - remove vsi from VSIG
* ice_vsig_remove_vsi - remove VSI from VSIG
* @hw: pointer to the hardware structure
* @blk: hw block
* @vsi: vsi to remove
* @vsig: vsi group to remove from
* @blk: HW block
* @vsi: VSI to remove
* @vsig: VSI group to remove from
*
* The function will remove the input vsi from its vsi group and move it
* The function will remove the input VSI from its VSI group and move it
* to the DEFAULT_VSIG.
*/
enum ice_status
@ -2396,7 +2396,7 @@ ice_vsig_remove_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)
if (!hw->blk[blk].xlt2.vsig_tbl[idx].in_use)
return ICE_ERR_DOES_NOT_EXIST;
/* entry already in default VSIG, dont have to remove */
/* entry already in default VSIG, don't have to remove */
if (idx == ICE_DEFAULT_VSIG)
return ICE_SUCCESS;
@ -2407,7 +2407,7 @@ ice_vsig_remove_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)
vsi_tgt = &hw->blk[blk].xlt2.vsis[vsi];
vsi_cur = (*vsi_head);
/* iterate the vsi list, skip over the entry to be removed */
/* iterate the VSI list, skip over the entry to be removed */
while (vsi_cur) {
if (vsi_tgt == vsi_cur) {
(*vsi_head) = vsi_cur->next_vsi;
@ -2417,7 +2417,7 @@ ice_vsig_remove_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)
vsi_cur = vsi_cur->next_vsi;
}
/* verify if vsi was removed from group list */
/* verify if VSI was removed from group list */
if (!vsi_cur)
return ICE_ERR_DOES_NOT_EXIST;
@ -2429,11 +2429,11 @@ ice_vsig_remove_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig)
}
/**
* ice_find_prof_id - find profile id for a given field vector
* ice_find_prof_id - find profile ID for a given field vector
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @fv: field vector to search for
* @prof_id: receives the profile id
* @prof_id: receives the profile ID
*/
static enum ice_status
ice_find_prof_id(struct ice_hw *hw, enum ice_block blk,
@ -2456,7 +2456,7 @@ ice_find_prof_id(struct ice_hw *hw, enum ice_block blk,
}
/**
* ice_prof_id_rsrc_type - get profile id resource type for a block type
* ice_prof_id_rsrc_type - get profile ID resource type for a block type
* @blk: the block type
* @rsrc_type: pointer to variable to receive the resource type
*/
@ -2485,7 +2485,7 @@ static bool ice_prof_id_rsrc_type(enum ice_block blk, u16 *rsrc_type)
}
/**
* ice_tcam_ent_rsrc_type - get tcam entry resource type for a block type
* ice_tcam_ent_rsrc_type - get TCAM entry resource type for a block type
* @blk: the block type
* @rsrc_type: pointer to variable to receive the resource type
*/
@ -2707,10 +2707,10 @@ ice_free_res_workaround(struct ice_hw *hw, u16 type, u16 num, u16 *res)
}
/**
* ice_alloc_tcam_ent - allocate hardware tcam entry
* @hw: pointer to the hw struct
* @blk: the block to allocate the tcam for
* @tcam_idx: pointer to variable to receive the tcam entry
* ice_alloc_tcam_ent - allocate hardware TCAM entry
* @hw: pointer to the HW struct
* @blk: the block to allocate the TCAM for
* @tcam_idx: pointer to variable to receive the TCAM entry
*
* This function allocates a new entry in a Profile ID TCAM for a specific
* block.
@ -2727,10 +2727,10 @@ ice_alloc_tcam_ent(struct ice_hw *hw, enum ice_block blk, u16 *tcam_idx)
}
/**
* ice_free_tcam_ent - free hardware tcam entry
* @hw: pointer to the hw struct
* @blk: the block from which to free the tcam entry
* @tcam_idx: the tcam entry to free
* ice_free_tcam_ent - free hardware TCAM entry
* @hw: pointer to the HW struct
* @blk: the block from which to free the TCAM entry
* @tcam_idx: the TCAM entry to free
*
* This function frees an entry in a Profile ID TCAM for a specific block.
*/
@ -2746,12 +2746,12 @@ ice_free_tcam_ent(struct ice_hw *hw, enum ice_block blk, u16 tcam_idx)
}
/**
* ice_alloc_prof_id - allocate profile id
* @hw: pointer to the hw struct
* @blk: the block to allocate the profile id for
* @prof_id: pointer to variable to receive the profile id
* ice_alloc_prof_id - allocate profile ID
* @hw: pointer to the HW struct
* @blk: the block to allocate the profile ID for
* @prof_id: pointer to variable to receive the profile ID
*
* This function allocates a new profile id, which also corresponds to a Field
* This function allocates a new profile ID, which also corresponds to a Field
* Vector (Extraction Sequence) entry.
*/
static enum ice_status
@ -2772,12 +2772,12 @@ ice_alloc_prof_id(struct ice_hw *hw, enum ice_block blk, u8 *prof_id)
}
/**
* ice_free_prof_id - free profile id
* @hw: pointer to the hw struct
* @blk: the block from which to free the profile id
* @prof_id: the profile id to free
* ice_free_prof_id - free profile ID
* @hw: pointer to the HW struct
* @blk: the block from which to free the profile ID
* @prof_id: the profile ID to free
*
* This function frees a profile id, which also corresponds to a Field Vector.
* This function frees a profile ID, which also corresponds to a Field Vector.
*/
static enum ice_status
ice_free_prof_id(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
@ -2801,9 +2801,9 @@ ice_free_prof_id(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
/**
* ice_prof_inc_ref - increment reference count for profile
* @hw: pointer to the hw struct
* @blk: the block from which to free the profile id
* @prof_id: the profile id for which to increment the reference count
* @hw: pointer to the HW struct
* @blk: the block from which to free the profile ID
* @prof_id: the profile ID for which to increment the reference count
*/
static enum ice_status
ice_prof_inc_ref(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
@ -2818,9 +2818,9 @@ ice_prof_inc_ref(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
/**
* ice_prof_dec_ref - decrement reference count for profile
* @hw: pointer to the hw struct
* @blk: the block from which to free the profile id
* @prof_id: the profile id for which to decrement the reference count
* @hw: pointer to the HW struct
* @blk: the block from which to free the profile ID
* @prof_id: the profile ID for which to decrement the reference count
*/
static enum ice_status
ice_prof_dec_ref(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
@ -2838,9 +2838,9 @@ ice_prof_dec_ref(struct ice_hw *hw, enum ice_block blk, u8 prof_id)
/**
* ice_write_es - write an extraction sequence to hardware
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: the block in which to write the extraction sequence
* @prof_id: the profile id to write
* @prof_id: the profile ID to write
* @fv: pointer to the extraction sequence to write
*/
static void
@ -2921,7 +2921,7 @@ static void ice_fill_tbl(struct ice_hw *hw, enum ice_block block_id, u32 sid)
u8 *src, *dst;
void *sect;
/* if the hw segment pointer is null then the first iteration of
/* if the HW segment pointer is null then the first iteration of
* ice_pkg_enum_section() will fail. In this case the Hw tables will
* not be filled and return success.
*/
@ -3072,7 +3072,7 @@ static void ice_free_flow_profs(struct ice_hw *hw)
/**
* ice_free_prof_map - frees the profile map
* @hw: pointer to the hardware structure
* @blk: the hw block which contains the profile map to be freed
* @blk: the HW block which contains the profile map to be freed
*/
static void ice_free_prof_map(struct ice_hw *hw, enum ice_block blk)
{
@ -3091,7 +3091,7 @@ static void ice_free_prof_map(struct ice_hw *hw, enum ice_block blk)
/**
* ice_free_vsig_tbl - free complete VSIG table entries
* @hw: pointer to the hardware structure
* @blk: the hw block on which to free the VSIG table entries
* @blk: the HW block on which to free the VSIG table entries
*/
static void ice_free_vsig_tbl(struct ice_hw *hw, enum ice_block blk)
{
@ -3151,9 +3151,9 @@ static void ice_init_flow_profs(struct ice_hw *hw)
}
/**
* ice_init_sw_xlt1_db - init software xlt1 database from hw tables
* ice_init_sw_xlt1_db - init software XLT1 database from HW tables
* @hw: pointer to the hardware structure
* @blk: the hw block to initialize
* @blk: the HW block to initialize
*/
static
void ice_init_sw_xlt1_db(struct ice_hw *hw, enum ice_block blk)
@ -3172,9 +3172,9 @@ void ice_init_sw_xlt1_db(struct ice_hw *hw, enum ice_block blk)
}
/**
* ice_init_sw_xlt2_db - init software xlt2 database from hw tables
* ice_init_sw_xlt2_db - init software XLT2 database from HW tables
* @hw: pointer to the hardware structure
* @blk: the hw block to initialize
* @blk: the HW block to initialize
*/
static
void ice_init_sw_xlt2_db(struct ice_hw *hw, enum ice_block blk)
@ -3197,7 +3197,7 @@ void ice_init_sw_xlt2_db(struct ice_hw *hw, enum ice_block blk)
}
/**
* ice_init_sw_db - init software database from hw tables
* ice_init_sw_db - init software database from HW tables
* @hw: pointer to the hardware structure
*/
static
@ -3329,9 +3329,9 @@ err:
}
/**
* ice_prof_gen_key - generate profile id key
* @hw: pointer to the hw struct
* @blk: the block in which to write profile id to
* ice_prof_gen_key - generate profile ID key
* @hw: pointer to the HW struct
* @blk: the block in which to write profile ID to
* @ptg: packet type group (PTG) portion of key
* @vsig: VSIG portion of key
* @cdid: cdid portion of key
@ -3339,7 +3339,7 @@ err:
* @vl_msk: valid mask
* @dc_msk: don't care mask
* @nm_msk: never match mask
* @key: output of profile id key
* @key: output of profile ID key
*/
static enum ice_status
ice_prof_gen_key(struct ice_hw *hw, enum ice_block blk, u8 ptg, u16 vsig,
@ -3384,11 +3384,11 @@ ice_prof_gen_key(struct ice_hw *hw, enum ice_block blk, u8 ptg, u16 vsig,
}
/**
* ice_tcam_write_entry - write tcam entry
* @hw: pointer to the hw struct
* @blk: the block in which to write profile id to
* ice_tcam_write_entry - write TCAM entry
* @hw: pointer to the HW struct
* @blk: the block in which to write profile ID to
* @idx: the entry index to write to
* @prof_id: profile id
* @prof_id: profile ID
* @ptg: packet type group (PTG) portion of key
* @vsig: VSIG portion of key
* @cdid: cdid portion of key
@ -3418,9 +3418,9 @@ ice_tcam_write_entry(struct ice_hw *hw, enum ice_block blk, u16 idx,
}
/**
* ice_vsig_get_ref - returns number of vsis belong to a VSIG
* ice_vsig_get_ref - returns number of VSIs belong to a VSIG
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @vsig: VSIG to query
* @refs: pointer to variable to receive the reference count
*/
@ -3446,7 +3446,7 @@ ice_vsig_get_ref(struct ice_hw *hw, enum ice_block blk, u16 vsig, u16 *refs)
/**
* ice_get_ptg - get or allocate a ptg for a ptype
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @ptype: the ptype to retrieve the PTG for
* @ptg: receives the PTG of the ptype
* @add: receive boolean indicating whether PTG was added or not
@ -3483,7 +3483,7 @@ ice_get_ptg(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 *ptg,
/**
* ice_has_prof_vsig - check to see if VSIG has a specific profile
* @hw: pointer to the hardware structure
* @blk: hw block
* @blk: HW block
* @vsig: VSIG to check against
* @hdl: profile handle
*/
@ -3500,14 +3500,14 @@ ice_has_prof_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl)
}
ice_debug(hw, ICE_DBG_INIT,
"Characteristic list for vsi group %d not found.\n",
"Characteristic list for VSI group %d not found.\n",
vsig);
return false;
}
/**
* ice_prof_bld_es - build profile id extraction sequence changes
* @hw: pointer to the hw struct
* ice_prof_bld_es - build profile ID extraction sequence changes
* @hw: pointer to the HW struct
* @blk: hardware block
* @bld: the update package buffer build to add to
* @chgs: the list of changes to make in hardware
@ -3546,8 +3546,8 @@ ice_prof_bld_es(struct ice_hw *hw, enum ice_block blk,
}
/**
* ice_prof_bld_tcam - build profile id tcam changes
* @hw: pointer to the hw struct
* ice_prof_bld_tcam - build profile ID TCAM changes
* @hw: pointer to the HW struct
* @blk: hardware block
* @bld: the update package buffer build to add to
* @chgs: the list of changes to make in hardware
@ -3586,7 +3586,7 @@ ice_prof_bld_tcam(struct ice_hw *hw, enum ice_block blk,
}
/**
* ice_prof_bld_xlt1 - build xlt1 changes
* ice_prof_bld_xlt1 - build XLT1 changes
* @blk: hardware block
* @bld: the update package buffer build to add to
* @chgs: the list of changes to make in hardware
@ -3619,7 +3619,7 @@ ice_prof_bld_xlt1(enum ice_block blk, struct ice_buf_build *bld,
}
/**
* ice_prof_bld_xlt2 - build xlt2 changes
* ice_prof_bld_xlt2 - build XLT2 changes
* @blk: hardware block
* @bld: the update package buffer build to add to
* @chgs: the list of changes to make in hardware
@ -3662,7 +3662,7 @@ ice_prof_bld_xlt2(enum ice_block blk, struct ice_buf_build *bld,
/**
* ice_upd_prof_hw - update hardware using the change list
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @chgs: the list of changes to make in hardware
*/
@ -3763,16 +3763,16 @@ error_tmp:
/**
* ice_add_prof - add profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @id: profile tracking id
* @id: profile tracking ID
* @ptypes: array of bitmaps indicating ptypes (ICE_FLOW_PTYPE_MAX bits)
* @es: extraction sequence (length of array is determined by the block)
*
* This function registers a profile, which matches a set of PTYPES with a
* particular extraction sequence. While the hardware profile is allocated
* it will not be written until the first call to ice_add_flow that specifies
* the id value used here.
* the ID value used here.
*/
enum ice_status
ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
@ -3787,7 +3787,7 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
/* search for existing profile */
status = ice_find_prof_id(hw, blk, es, &prof_id);
if (status) {
/* allocate profile id */
/* allocate profile ID */
status = ice_alloc_prof_id(hw, blk, &prof_id);
if (status)
goto err_ice_add_prof;
@ -3851,7 +3851,7 @@ err_ice_add_prof:
/**
* ice_search_prof_id - Search for a profile tracking ID
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @id: profile tracking ID
*
@ -3876,7 +3876,7 @@ ice_search_prof_id(struct ice_hw *hw, enum ice_block blk, u64 id)
/**
* ice_set_prof_context - Set context for a given profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @id: profile tracking ID
* @cntxt: context
@ -3895,7 +3895,7 @@ ice_set_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 cntxt)
/**
* ice_get_prof_context - Get context for a given profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @id: profile tracking ID
* @cntxt: pointer to variable to receive the context
@ -3914,7 +3914,7 @@ ice_get_prof_context(struct ice_hw *hw, enum ice_block blk, u64 id, u64 *cntxt)
/**
* ice_vsig_prof_id_count - count profiles in a VSIG
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsig: VSIG to remove the profile from
*/
@ -3933,8 +3933,8 @@ ice_vsig_prof_id_count(struct ice_hw *hw, enum ice_block blk, u16 vsig)
}
/**
* ice_rel_tcam_idx - release a tcam index
* @hw: pointer to the hw struct
* ice_rel_tcam_idx - release a TCAM index
* @hw: pointer to the HW struct
* @blk: hardware block
* @idx: the index to release
*/
@ -3947,13 +3947,13 @@ ice_rel_tcam_idx(struct ice_hw *hw, enum ice_block blk, u16 idx)
u8 nm_msk[ICE_TCAM_KEY_VAL_SZ] = { 0x01, 0x00, 0x00, 0x00, 0x00 };
enum ice_status status;
/* write the tcam entry */
/* write the TCAM entry */
status = ice_tcam_write_entry(hw, blk, idx, 0, 0, 0, 0, 0, vl_msk,
dc_msk, nm_msk);
if (status)
return status;
/* release the tcam entry */
/* release the TCAM entry */
status = ice_free_tcam_ent(hw, blk, idx);
return status;
@ -3961,7 +3961,7 @@ ice_rel_tcam_idx(struct ice_hw *hw, enum ice_block blk, u16 idx)
/**
* ice_rem_prof_id - remove one profile from a VSIG
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsig: VSIG to remove the profile from
* @prof: pointer to profile structure to remove
@ -4007,7 +4007,7 @@ err_ice_rem_prof_id:
/**
* ice_rem_vsig - remove VSIG
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsig: the VSIG to remove
* @chg: the change list
@ -4069,7 +4069,7 @@ err_ice_rem_vsig:
/**
* ice_rem_prof_id_vsig - remove a specific profile from a VSIG
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsig: VSIG to remove the profile from
* @hdl: profile handle indicating which profile to remove
@ -4105,7 +4105,7 @@ ice_rem_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
/**
* ice_rem_flow_all - remove all flows with a particular profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @id: profile tracking ID
*/
@ -4143,11 +4143,11 @@ err_ice_rem_flow_all:
/**
* ice_rem_prof - remove profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @id: profile tracking ID
*
* This will remove the profile specified by the id parameter, which was
* This will remove the profile specified by the ID parameter, which was
* previously created through ice_add_prof. If any existing entries
* are associated with this profile, they will be removed as well.
*/
@ -4177,7 +4177,7 @@ enum ice_status ice_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 id)
/**
* ice_get_prof_ptgs - get ptgs for profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @hdl: profile handle
* @chg: change list
@ -4190,7 +4190,7 @@ ice_get_prof_ptgs(struct ice_hw *hw, enum ice_block blk, u64 hdl,
struct ice_chs_chg *p;
u16 i;
/* Get the details on the profile specified by the handle id */
/* Get the details on the profile specified by the handle ID */
map = ice_search_prof_id(hw, blk, hdl);
if (!map)
return ICE_ERR_DOES_NOT_EXIST;
@ -4231,7 +4231,7 @@ err_ice_get_prof_ptgs:
/**
* ice_get_profs_vsig - get a copy of the list of profiles from a VSIG
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsig: VSIG from which to copy the list
* @lst: output list
@ -4272,7 +4272,7 @@ err_ice_get_profs_vsig:
/**
* ice_add_prof_to_lst - add profile entry to a list
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @lst: the list to be added to
* @hdl: profile handle of entry to add
@ -4320,7 +4320,7 @@ ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk,
/**
* ice_move_vsi - move VSI to another VSIG
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsi: the VSI to move
* @vsig: the VSIG to move the VSI to
@ -4357,15 +4357,15 @@ ice_move_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 vsig,
}
/**
* ice_prof_tcam_ena_dis - add enable or disable tcam change
* @hw: pointer to the hw struct
* ice_prof_tcam_ena_dis - add enable or disable TCAM change
* @hw: pointer to the HW struct
* @blk: hardware block
* @enable: true to enable, false to disable
* @vsig: the vsig of the tcam entry
* @tcam: pointer the tcam info structure of the tcam to disable
* @vsig: the vsig of the TCAM entry
* @tcam: pointer the TCAM info structure of the TCAM to disable
* @chg: the change list
*
* This function appends an enable or disable tcam entry in the change log
* This function appends an enable or disable TCAM entry in the change log
*/
static enum ice_status
ice_prof_tcam_ena_dis(struct ice_hw *hw, enum ice_block blk, bool enable,
@ -4418,7 +4418,7 @@ err_ice_prof_tcam_ena_dis:
/**
* ice_adj_prof_priorities - adjust profile based on priorities
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsig: the VSIG for which to adjust profile priorities
* @chg: the change list
@ -4487,7 +4487,7 @@ ice_adj_prof_priorities(struct ice_hw *hw, enum ice_block blk, u16 vsig,
/**
* ice_add_prof_id_vsig - add profile to VSIG
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsig: the VSIG to which this profile is to be added
* @hdl: the profile handle indicating the profile to add
@ -4506,7 +4506,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
struct ice_chs_chg *p;
u16 i;
/* Get the details on the profile specified by the handle id */
/* Get the details on the profile specified by the handle ID */
map = ice_search_prof_id(hw, blk, hdl);
if (!map)
return ICE_ERR_DOES_NOT_EXIST;
@ -4524,7 +4524,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
t->prof_id = map->prof_id;
t->tcam_count = map->ptype_count;
/* create tcam entries */
/* create TCAM entries */
for (i = 0; i < map->ptype_count; i++) {
enum ice_status status;
u16 tcam_idx;
@ -4543,7 +4543,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
if (!p)
goto err_ice_add_prof_id_vsig;
/* allocate the tcam entry index */
/* allocate the TCAM entry index */
status = ice_alloc_tcam_ent(hw, blk, &tcam_idx);
if (status)
goto err_ice_add_prof_id_vsig;
@ -4560,7 +4560,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
p->vsig = vsig;
p->tcam_idx = t->tcam[i].tcam_idx;
/* write the tcam entry */
/* write the TCAM entry */
status = ice_tcam_write_entry(hw, blk, t->tcam[i].tcam_idx,
t->tcam[i].prof_id,
t->tcam[i].ptg, vsig, 0, 0,
@ -4568,8 +4568,8 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
if (status)
goto err_ice_add_prof_id_vsig;
/* this increments the reference count of how many tcam entries
* are using this hw profile id
/* this increments the reference count of how many TCAM entries
* are using this HW profile ID
*/
status = ice_prof_inc_ref(hw, blk, t->tcam[i].prof_id);
@ -4590,7 +4590,7 @@ err_ice_add_prof_id_vsig:
/**
* ice_create_prof_id_vsig - add a new VSIG with a single profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsi: the initial VSI that will be in VSIG
* @hdl: the profile handle of the profile that will be added to the VSIG
@ -4632,7 +4632,7 @@ ice_create_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl,
/**
* ice_create_vsig_from_list - create a new VSIG with a list of profiles
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsi: the initial VSI that will be in VSIG
* @lst: the list of profile that will be added to the VSIG
@ -4666,7 +4666,7 @@ ice_create_vsig_from_lst(struct ice_hw *hw, enum ice_block blk, u16 vsi,
/**
* ice_find_prof_vsig - find a VSIG with a specific profile handle
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @hdl: the profile handle of the profile to search for
* @vsig: returns the VSIG with the matching profile
@ -4697,13 +4697,13 @@ ice_find_prof_vsig(struct ice_hw *hw, enum ice_block blk, u64 hdl, u16 *vsig)
/**
* ice_add_prof_id_flow - add profile flow
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsi: the vsi to enable with the profile specified by id
* @vsi: the VSI to enable with the profile specified by ID
* @hdl: profile handle
*
* Calling this function will update the hardware tables to enable the
* profile indicated by the id parameter for the VSIs specified in the vsi
* profile indicated by the ID parameter for the VSIs specified in the VSI
* array. Once successfully called, the flow will be enabled.
*/
enum ice_status
@ -4725,7 +4725,7 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
if (status)
return status;
/* determine if vsi is already part of a VSIG */
/* determine if VSI is already part of a VSIG */
status = ice_vsig_find_vsi(hw, blk, vsi, &vsig);
if (!status && vsig) {
bool only_vsi;
@ -4805,10 +4805,10 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
}
} else {
/* need to find or add a VSIG */
/* search for an exising VSIG with an exact charc match */
/* search for an existing VSIG with an exact charc match */
if (ice_find_prof_vsig(hw, blk, hdl, &vsig)) {
/* found an exact match */
/* add or move vsi to the VSIG that matches */
/* add or move VSI to the VSIG that matches */
status = ice_move_vsi(hw, blk, vsi, vsig, &chg);
if (status)
goto err_ice_add_prof_id_flow;
@ -4847,14 +4847,14 @@ err_ice_add_prof_id_flow:
/**
* ice_add_flow - add flow
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsi: array of VSIs to enable with the profile specified by id
* @count: number of elements in the vsi array
* @id: profile tracking id
* @vsi: array of VSIs to enable with the profile specified by ID
* @count: number of elements in the VSI array
* @id: profile tracking ID
*
* Calling this function will update the hardware tables to enable the
* profile indicated by the id parameter for the VSIs specified in the vsi
* profile indicated by the ID parameter for the VSIs specified in the VSI
* array. Once successfully called, the flow will be enabled.
*/
enum ice_status
@ -4875,7 +4875,7 @@ ice_add_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi[], u8 count,
/**
* ice_rem_prof_from_list - remove a profile from list
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @lst: list to remove the profile from
* @hdl: the profile handle indicating the profile to remove
*/
@ -4897,13 +4897,13 @@ ice_rem_prof_from_list(struct ice_hw *hw, struct LIST_HEAD_TYPE *lst, u64 hdl)
/**
* ice_rem_prof_id_flow - remove flow
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsi: the vsi from which to remove the profile specified by id
* @vsi: the VSI from which to remove the profile specified by ID
* @hdl: profile tracking handle
*
* Calling this function will update the hardware tables to remove the
* profile indicated by the id parameter for the VSIs specified in the vsi
* profile indicated by the ID parameter for the VSIs specified in the VSI
* array. Once successfully called, the flow will be disabled.
*/
enum ice_status
@ -4918,7 +4918,7 @@ ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
INIT_LIST_HEAD(&copy);
INIT_LIST_HEAD(&chg);
/* determine if vsi is already part of a VSIG */
/* determine if VSI is already part of a VSIG */
status = ice_vsig_find_vsi(hw, blk, vsi, &vsig);
if (!status && vsig) {
bool last_profile;
@ -4979,7 +4979,7 @@ ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
} else if (ice_find_dup_props_vsig(hw, blk, &copy,
&vsig)) {
/* found an exact match */
/* add or move vsi to the VSIG that matches */
/* add or move VSI to the VSIG that matches */
/* Search for a VSIG with a matching profile
* list
*/
@ -4991,7 +4991,7 @@ ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
} else {
/* since no existing VSIG supports this
* characteristic pattern, we need to create a
* new VSIG and tcam entries
* new VSIG and TCAM entries
*/
status = ice_create_vsig_from_lst(hw, blk, vsi,
&copy, &chg);
@ -5029,14 +5029,14 @@ err_ice_rem_prof_id_flow:
/**
* ice_rem_flow - remove flow
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: hardware block
* @vsi: array of VSIs from which to remove the profile specified by id
* @count: number of elements in the vsi array
* @id: profile tracking id
* @vsi: array of VSIs from which to remove the profile specified by ID
* @count: number of elements in the VSI array
* @id: profile tracking ID
*
* The function will remove flows from the specified VSIs that were enabled
* using ice_add_flow. The id value will indicated which profile will be
* using ice_add_flow. The ID value will indicated which profile will be
* removed. Once successfully called, the flow will be disabled.
*/
enum ice_status

View File

@ -59,7 +59,7 @@ void ice_ptg_free(struct ice_hw *hw, enum ice_block blk, u8 ptg);
enum ice_status
ice_ptg_add_mv_ptype(struct ice_hw *hw, enum ice_block blk, u16 ptype, u8 ptg);
/* XLT2/Vsi group functions */
/* XLT2/VSI group functions */
enum ice_status ice_vsig_update_xlt2(struct ice_hw *hw, enum ice_block blk);
enum ice_status
ice_vsig_find_vsi(struct ice_hw *hw, enum ice_block blk, u16 vsi, u16 *vsig);

View File

@ -350,7 +350,7 @@ struct ice_sw_fv_list_entry {
};
#pragma pack(1)
/* The BOOST tcam stores the match packet header in reverse order, meaning
/* The BOOST TCAM stores the match packet header in reverse order, meaning
* the fields are reversed; in addition, this means that the normally big endian
* fields of the packet are now little endian.
*/
@ -602,7 +602,7 @@ struct ice_xlt2 {
};
/* Extraction sequence - list of match fields:
* protocol id, offset, profile length
* protocol ID, offset, profile length
*/
union ice_match_fld {
struct {

View File

@ -292,6 +292,9 @@ struct ice_flow_prof_params {
u16 entry_length; /* # of bytes formatted entry will require */
u8 es_cnt;
/* For ACL, the es[0] will have the data of ICE_RX_MDID_PKT_FLAGS_15_0
* This will give us the direction flags.
*/
struct ice_fv_word es[ICE_MAX_FV_WORDS];
ice_declare_bitmap(ptypes, ICE_FLOW_PTYPE_MAX);
@ -494,7 +497,7 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
/**
* ice_flow_xtract_fld - Create an extraction sequence entry for the given field
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @params: information about the flow to be processed
* @seg: packet segment index of the field to be extracted
* @fld: ID of field to be extracted
@ -656,7 +659,7 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
/**
* ice_flow_xtract_raws - Create extract sequence entries for raw bytes
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @params: information about the flow to be processed
* @seg: index of packet segment whose raw fields are to be be extracted
*/
@ -728,7 +731,7 @@ ice_flow_xtract_raws(struct ice_hw *hw, struct ice_flow_prof_params *params,
/**
* ice_flow_create_xtrct_seq - Create an extraction sequence for given segments
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @params: information about the flow to be processed
*
* This function iterates through all matched fields in the given segments, and
@ -768,7 +771,7 @@ ice_flow_create_xtrct_seq(struct ice_hw *hw,
/**
* ice_flow_proc_segs - process all packet segments associated with a profile
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @params: information about the flow to be processed
*/
static enum ice_status
@ -807,7 +810,7 @@ ice_flow_proc_segs(struct ice_hw *hw, struct ice_flow_prof_params *params)
/**
* ice_flow_find_prof_conds - Find a profile matching headers and conditions
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: classification stage
* @dir: flow direction
* @segs: array of one or more packet segments that describe the flow
@ -852,7 +855,7 @@ ice_flow_find_prof_conds(struct ice_hw *hw, enum ice_block blk,
/**
* ice_flow_find_prof - Look up a profile matching headers and matched fields
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: classification stage
* @dir: flow direction
* @segs: array of one or more packet segments that describe the flow
@ -874,7 +877,7 @@ ice_flow_find_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir,
/**
* ice_flow_find_prof_id - Look up a profile with given profile ID
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: classification stage
* @prof_id: unique ID to identify this flow profile
*/
@ -893,7 +896,7 @@ ice_flow_find_prof_id(struct ice_hw *hw, enum ice_block blk, u64 prof_id)
/**
* ice_flow_rem_entry_sync - Remove a flow entry
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @entry: flow entry to be removed
*/
static enum ice_status
@ -917,7 +920,7 @@ ice_flow_rem_entry_sync(struct ice_hw *hw, struct ice_flow_entry *entry)
/**
* ice_flow_add_prof_sync - Add a flow profile for packet segments and fields
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: classification stage
* @dir: flow direction
* @prof_id: unique ID to identify this flow profile
@ -1057,7 +1060,7 @@ ice_flow_rem_prof_sync(struct ice_hw *hw, enum ice_block blk,
* @vsi_handle: software VSI handle
*
* Assumption: the caller has acquired the lock to the profile list
* and the software vsi handle has been validated
* and the software VSI handle has been validated
*/
static enum ice_status
ice_flow_assoc_prof(struct ice_hw *hw, enum ice_block blk,
@ -1089,7 +1092,7 @@ ice_flow_assoc_prof(struct ice_hw *hw, enum ice_block blk,
* @vsi_handle: software VSI handle
*
* Assumption: the caller has acquired the lock to the profile list
* and the software vsi handle has been validated
* and the software VSI handle has been validated
*/
static enum ice_status
ice_flow_disassoc_prof(struct ice_hw *hw, enum ice_block blk,
@ -1115,7 +1118,7 @@ ice_flow_disassoc_prof(struct ice_hw *hw, enum ice_block blk,
/**
* ice_flow_add_prof - Add a flow profile for packet segments and matched fields
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: classification stage
* @dir: flow direction
* @prof_id: unique ID to identify this flow profile
@ -1160,7 +1163,7 @@ ice_flow_add_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir,
/**
* ice_flow_rem_prof - Remove a flow profile and all entries associated with it
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: the block for which the flow profile is to be removed
* @prof_id: unique ID of the flow profile to be removed
*/
@ -1188,11 +1191,11 @@ out:
}
/**
* ice_flow_get_hw_prof - return the hw profile for a specific profile id handle
* @hw: pointer to the hw struct
* ice_flow_get_hw_prof - return the HW profile for a specific profile ID handle
* @hw: pointer to the HW struct
* @blk: classification stage
* @prof_id: the profile id handle
* @hw_prof_id: pointer to variable to receive the hw profile id
* @prof_id: the profile ID handle
* @hw_prof_id: pointer to variable to receive the HW profile ID
*/
enum ice_status
ice_flow_get_hw_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
@ -1211,7 +1214,7 @@ ice_flow_get_hw_prof(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
/**
* ice_flow_find_entry - look for a flow entry using its unique ID
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: classification stage
* @entry_id: unique ID to identify this flow entry
*
@ -1249,7 +1252,7 @@ u64 ice_flow_find_entry(struct ice_hw *hw, enum ice_block blk, u64 entry_id)
/**
* ice_flow_add_entry - Add a flow entry
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @blk: classification stage
* @prof_id: ID of the profile to add a new flow entry to
* @entry_id: unique ID to identify this flow entry
@ -1335,7 +1338,7 @@ out:
/**
* ice_flow_rem_entry - Remove a flow entry
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @entry_h: handle to the flow entry to be removed
*/
enum ice_status ice_flow_rem_entry(struct ice_hw *hw, u64 entry_h)
@ -1712,12 +1715,12 @@ void ice_rem_all_rss_vsi_ctx(struct ice_hw *hw, u16 vsi_handle)
}
/**
* ice_rem_vsi_rss_cfg - remove RSS configurations associated with vsi
* ice_rem_vsi_rss_cfg - remove RSS configurations associated with VSI
* @hw: pointer to the hardware structure
* @vsi_handle: software VSI handle
*
* This function will iterate through all flow profiles and disassociate
* the vsi from that profile. If the flow profile has no vsis it will
* the VSI from that profile. If the flow profile has no VSIs it will
* be removed.
*/
enum ice_status ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle)
@ -1847,7 +1850,7 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
goto exit;
/* Search for a flow profile that has matching headers, hash fields
* and has the input vsi associated to it. If found, no further
* and has the input VSI associated to it. If found, no further
* operations required and exit.
*/
prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, 1,
@ -1858,8 +1861,8 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
goto exit;
/* Check if a flow profile exists with the same protocol headers and
* associated with the input vsi. If so disasscociate the vsi from
* this profile. The vsi will be added to a new profile created with
* associated with the input VSI. If so disasscociate the VSI from
* this profile. The VSI will be added to a new profile created with
* the protocol header and new hash field configuration.
*/
prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, 1,
@ -1871,7 +1874,7 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
else
goto exit;
/* Remove profile if it has no vsis associated */
/* Remove profile if it has no VSIs associated */
if (!ice_is_any_bit_set(prof->vsis, ICE_MAX_VSI)) {
status = ice_flow_rem_prof_sync(hw, blk, prof);
if (status)
@ -1880,7 +1883,7 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
}
/* Search for a profile that has same match fields only. If this
* exists then associate the vsi to this profile.
* exists then associate the VSI to this profile.
*/
prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, 1,
vsi_handle,
@ -2003,7 +2006,7 @@ out:
*
* This function will lookup the flow profile based on the input
* hash field bitmap, iterate through the profile entry list of
* that profile and find entry associated with input vsi to be
* that profile and find entry associated with input VSI to be
* removed. Calls are made to underlying flow apis which will in
* turn build or update buffers for RSS XLT1 section.
*/
@ -2025,7 +2028,7 @@ ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
}
/**
* ice_replay_rss_cfg - remove RSS configurations associated with vsi
* ice_replay_rss_cfg - remove RSS configurations associated with VSI
* @hw: pointer to the hardware structure
* @vsi_handle: software VSI handle
*/
@ -2057,13 +2060,13 @@ enum ice_status ice_replay_rss_cfg(struct ice_hw *hw, u16 vsi_handle)
* @hdrs: protocol header type
*
* This function will return the match fields of the first instance of flow
* profile having the given header types and containing input vsi
* profile having the given header types and containing input VSI
*/
u64 ice_get_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u32 hdrs)
{
struct ice_rss_cfg *r, *rss_cfg = NULL;
/* verify if the protocol header is non zero and vsi is valid */
/* verify if the protocol header is non zero and VSI is valid */
if (hdrs == ICE_FLOW_SEG_HDR_NONE || !ice_is_vsi_valid(hw, vsi_handle))
return ICE_HASH_INVALID;

View File

@ -227,7 +227,6 @@ struct ice_flow_entry {
u64 id;
u16 vsi_handle;
enum ice_flow_priority priority;
struct ice_flow_prof *prof;
/* Flow entry's content */

View File

@ -6,7 +6,7 @@
#define _ICE_LAN_TX_RX_H_
#include "ice_osdep.h"
/* RX Descriptors */
/* Rx Descriptors */
union ice_16byte_rx_desc {
struct {
__le64 pkt_addr; /* Packet buffer address */
@ -20,7 +20,7 @@ union ice_16byte_rx_desc {
} lo_dword;
union {
__le32 rss; /* RSS Hash */
__le32 fd_id; /* Flow Director filter id */
__le32 fd_id; /* Flow Director filter ID */
} hi_dword;
} qword0;
struct {
@ -46,7 +46,7 @@ union ice_32byte_rx_desc {
} lo_dword;
union {
__le32 rss; /* RSS Hash */
__le32 fd_id; /* Flow Director filter id */
__le32 fd_id; /* Flow Director filter ID */
} hi_dword;
} qword0;
struct {
@ -181,15 +181,15 @@ enum ice_rx_desc_status_bits {
ICE_RX_DESC_STATUS_L2TAG1P_S = 2,
ICE_RX_DESC_STATUS_L3L4P_S = 3,
ICE_RX_DESC_STATUS_CRCP_S = 4,
ICE_RX_DESC_STATUS_TSYNINDX_S = 5, /* 2 BITS */
ICE_RX_DESC_STATUS_TSYNINDX_S = 5,
ICE_RX_DESC_STATUS_TSYNVALID_S = 7,
ICE_RX_DESC_STATUS_EXT_UDP_0_S = 8,
ICE_RX_DESC_STATUS_UMBCAST_S = 9, /* 2 BITS */
ICE_RX_DESC_STATUS_UMBCAST_S = 9,
ICE_RX_DESC_STATUS_FLM_S = 11,
ICE_RX_DESC_STATUS_FLTSTAT_S = 12, /* 2 BITS */
ICE_RX_DESC_STATUS_FLTSTAT_S = 12,
ICE_RX_DESC_STATUS_LPBK_S = 14,
ICE_RX_DESC_STATUS_IPV6EXADD_S = 15,
ICE_RX_DESC_STATUS_RESERVED2_S = 16, /* 2 BITS */
ICE_RX_DESC_STATUS_RESERVED2_S = 16,
ICE_RX_DESC_STATUS_INT_UDP_0_S = 18,
ICE_RX_DESC_STATUS_LAST /* this entry must be last!!! */
};
@ -325,8 +325,8 @@ enum ice_rx_desc_ext_status_bits {
/* Note: These are predefined bit offsets */
ICE_RX_DESC_EXT_STATUS_L2TAG2P_S = 0,
ICE_RX_DESC_EXT_STATUS_L2TAG3P_S = 1,
ICE_RX_DESC_EXT_STATUS_FLEXBL_S = 2, /* 2 BITS */
ICE_RX_DESC_EXT_STATUS_FLEXBH_S = 4, /* 2 BITS */
ICE_RX_DESC_EXT_STATUS_FLEXBL_S = 2,
ICE_RX_DESC_EXT_STATUS_FLEXBH_S = 4,
ICE_RX_DESC_EXT_STATUS_FDLONGB_S = 9,
ICE_RX_DESC_EXT_STATUS_PELONGB_S = 11,
};
@ -373,7 +373,7 @@ enum ice_rx_prog_status_desc_error_bits {
ICE_RX_PROG_STATUS_DESC_NO_FD_ENTRY_S = 1,
};
/* RX Flex Descriptor
/* Rx Flex Descriptor
* This descriptor is used instead of the legacy version descriptor when
* ice_rlan_ctx.adv_desc is set
*/
@ -387,7 +387,7 @@ union ice_32b_rx_flex_desc {
} read;
struct {
/* Qword 0 */
u8 rxdid; /* descriptor builder profile id */
u8 rxdid; /* descriptor builder profile ID */
u8 mir_id_umb_cast; /* mirror=[5:0], umb=[7:6] */
__le16 ptype_flex_flags0; /* ptype=[9:0], ff0=[15:10] */
__le16 pkt_len; /* [15:14] are reserved */
@ -422,12 +422,12 @@ union ice_32b_rx_flex_desc {
};
/* Rx Flex Descriptor NIC Profile
* RxDID Profile Id 2
* RxDID Profile ID 2
* Flex-field 0: RSS hash lower 16-bits
* Flex-field 1: RSS hash upper 16-bits
* Flex-field 2: Flow Id lower 16-bits
* Flex-field 3: Flow Id higher 16-bits
* Flex-field 4: reserved, Vlan id taken from L2Tag
* Flex-field 2: Flow ID lower 16-bits
* Flex-field 3: Flow ID higher 16-bits
* Flex-field 4: reserved, VLAN ID taken from L2Tag
*/
struct ice_32b_rx_flex_desc_nic {
/* Qword 0 */
@ -461,8 +461,8 @@ struct ice_32b_rx_flex_desc_nic {
};
/* Rx Flex Descriptor Switch Profile
* RxDID Profile Id 3
* Flex-field 0: Source Vsi
* RxDID Profile ID 3
* Flex-field 0: Source VSI
*/
struct ice_32b_rx_flex_desc_sw {
/* Qword 0 */
@ -491,8 +491,8 @@ struct ice_32b_rx_flex_desc_sw {
};
/* Rx Flex Descriptor NIC VEB Profile
* RxDID Profile Id 4
* Flex-field 0: Destination Vsi
* RxDID Profile ID 4
* Flex-field 0: Destination VSI
*/
struct ice_32b_rx_flex_desc_nic_veb_dbg {
/* Qword 0 */
@ -505,8 +505,8 @@ struct ice_32b_rx_flex_desc_nic_veb_dbg {
/* Qword 1 */
__le16 status_error0;
__le16 l2tag1;
__le16 dst_vsi; /* [0:12]: destination vsi */
/* 13: vsi valid bit */
__le16 dst_vsi; /* [0:12]: destination VSI */
/* 13: VSI valid bit */
/* [14:15] are reserved */
__le16 flex_field_1;
@ -523,7 +523,7 @@ struct ice_32b_rx_flex_desc_nic_veb_dbg {
};
/* Rx Flex Descriptor NIC ACL Profile
* RxDID Profile Id 5
* RxDID Profile ID 5
* Flex-field 0: ACL Counter 0
* Flex-field 1: ACL Counter 1
* Flex-field 2: ACL Counter 2
@ -556,12 +556,12 @@ struct ice_32b_rx_flex_desc_nic_acl_dbg {
};
/* Rx Flex Descriptor NIC Profile
* RxDID Profile Id 6
* RxDID Profile ID 6
* Flex-field 0: RSS hash lower 16-bits
* Flex-field 1: RSS hash upper 16-bits
* Flex-field 2: Flow Id lower 16-bits
* Flex-field 3: Source Vsi
* Flex-field 4: reserved, Vlan id taken from L2Tag
* Flex-field 2: Flow ID lower 16-bits
* Flex-field 3: Source VSI
* Flex-field 4: reserved, VLAN ID taken from L2Tag
*/
struct ice_32b_rx_flex_desc_nic_2 {
/* Qword 0 */
@ -818,7 +818,7 @@ enum ice_rlan_ctx_rx_hsplit_1 {
ICE_RLAN_RX_HSPLIT_1_SPLIT_ALWAYS = 2,
};
/* TX Descriptor */
/* Tx Descriptor */
struct ice_tx_desc {
__le64 buf_addr; /* Address of descriptor's data buf */
__le64 cmd_type_offset_bsz;
@ -846,15 +846,15 @@ enum ice_tx_desc_cmd_bits {
ICE_TX_DESC_CMD_RSVD = 0x0004,
ICE_TX_DESC_CMD_IL2TAG1 = 0x0008,
ICE_TX_DESC_CMD_DUMMY = 0x0010,
ICE_TX_DESC_CMD_IIPT_NONIP = 0x0000, /* 2 BITS */
ICE_TX_DESC_CMD_IIPT_IPV6 = 0x0020, /* 2 BITS */
ICE_TX_DESC_CMD_IIPT_IPV4 = 0x0040, /* 2 BITS */
ICE_TX_DESC_CMD_IIPT_IPV4_CSUM = 0x0060, /* 2 BITS */
ICE_TX_DESC_CMD_IIPT_NONIP = 0x0000,
ICE_TX_DESC_CMD_IIPT_IPV6 = 0x0020,
ICE_TX_DESC_CMD_IIPT_IPV4 = 0x0040,
ICE_TX_DESC_CMD_IIPT_IPV4_CSUM = 0x0060,
ICE_TX_DESC_CMD_RSVD2 = 0x0080,
ICE_TX_DESC_CMD_L4T_EOFT_UNK = 0x0000, /* 2 BITS */
ICE_TX_DESC_CMD_L4T_EOFT_TCP = 0x0100, /* 2 BITS */
ICE_TX_DESC_CMD_L4T_EOFT_SCTP = 0x0200, /* 2 BITS */
ICE_TX_DESC_CMD_L4T_EOFT_UDP = 0x0300, /* 2 BITS */
ICE_TX_DESC_CMD_L4T_EOFT_UNK = 0x0000,
ICE_TX_DESC_CMD_L4T_EOFT_TCP = 0x0100,
ICE_TX_DESC_CMD_L4T_EOFT_SCTP = 0x0200,
ICE_TX_DESC_CMD_L4T_EOFT_UDP = 0x0300,
ICE_TX_DESC_CMD_RE = 0x0400,
ICE_TX_DESC_CMD_RSVD3 = 0x0800,
};

View File

@ -7,7 +7,7 @@
/**
* ice_aq_read_nvm
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @module_typeid: module pointer location in words from the NVM beginning
* @offset: byte offset from the module beginning
* @length: length of the section to be read (in bytes from the offset)
@ -248,7 +248,7 @@ enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data)
/**
* ice_init_nvm - initializes NVM setting
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* This function reads and populates NVM settings such as Shadow RAM size,
* max_timeout, and blank_nvm_mode
@ -264,7 +264,7 @@ enum ice_status ice_init_nvm(struct ice_hw *hw)
ice_debug(hw, ICE_DBG_TRACE, "ice_init_nvm");
/* The SR size is stored regardless of the nvm programming mode
/* The SR size is stored regardless of the NVM programming mode
* as the blank mode may be used in the factory line.
*/
gens_stat = rd32(hw, GLNVM_GENS);
@ -357,7 +357,7 @@ ice_read_sr_buf(struct ice_hw *hw, u16 offset, u16 *words, u16 *data)
/**
* ice_nvm_validate_checksum
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Verify NVM PFA checksum validity (0x0706)
*/

View File

@ -18,7 +18,7 @@
/* Max recipes that can be chained */
#define ICE_MAX_CHAIN_RECIPE 5
/* 1 word reserved for switch id from allowed 5 words.
/* 1 word reserved for switch ID from allowed 5 words.
* So a recipe can have max 4 words. And you can chain 5 such recipes
* together. So maximum words that can be programmed for look up is 5 * 4.
*/
@ -128,7 +128,7 @@ enum ice_prot_id {
#define ICE_PROTOCOL_MAX_ENTRIES 16
/* Mapping of software defined protocol id to hardware defined protocol id */
/* Mapping of software defined protocol ID to hardware defined protocol ID */
struct ice_protocol_entry {
enum ice_protocol_type type;
u8 protocol_id;

File diff suppressed because it is too large Load Diff

View File

@ -43,14 +43,14 @@ struct ice_aqc_rl_profile_info {
struct ice_aqc_rl_profile_elem profile;
struct LIST_ENTRY_TYPE list_entry;
u32 bw; /* requested */
u16 prof_id_ref; /* profile id to node association ref count */
u16 prof_id_ref; /* profile ID to node association ref count */
};
struct ice_sched_agg_vsi_info {
struct LIST_ENTRY_TYPE list_entry;
ice_declare_bitmap(tc_bitmap, ICE_MAX_TRAFFIC_CLASS);
u16 vsi_handle;
/* save agg vsi TC bitmap */
/* save aggregator VSI TC bitmap */
ice_declare_bitmap(replay_tc_bitmap, ICE_MAX_TRAFFIC_CLASS);
};
@ -60,9 +60,9 @@ struct ice_sched_agg_info {
ice_declare_bitmap(tc_bitmap, ICE_MAX_TRAFFIC_CLASS);
u32 agg_id;
enum ice_agg_type agg_type;
/* bw_t_info saves agg bw information */
/* bw_t_info saves aggregator BW information */
struct ice_bw_type_info bw_t_info[ICE_MAX_TRAFFIC_CLASS];
/* save agg TC bitmap */
/* save aggregator TC bitmap */
ice_declare_bitmap(replay_tc_bitmap, ICE_MAX_TRAFFIC_CLASS);
};

View File

@ -21,7 +21,7 @@
* byte 6 = 0x2: to identify it as locally administered SA MAC
* byte 12 = 0x81 & byte 13 = 0x00:
* In case of VLAN filter first two bytes defines ether type (0x8100)
* and remaining two bytes are placeholder for programming a given VLAN id
* and remaining two bytes are placeholder for programming a given VLAN ID
* In case of Ether type filter it is treated as header without VLAN tag
* and byte 12 and 13 is used to program a given Ether type instead
*/
@ -54,7 +54,7 @@ static const u8 dummy_eth_header[DUMMY_ETH_HDR_LEN] = { 0x2, 0, 0, 0, 0, 0,
/**
* ice_init_def_sw_recp - initialize the recipe book keeping tables
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Allocate memory for the entire recipe table and initialize the structures/
* entries corresponding to basic recipes.
@ -282,7 +282,7 @@ enum ice_status ice_free_sw(struct ice_hw *hw, u16 sw_id, u16 counter_id)
/**
* ice_aq_add_vsi
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_ctx: pointer to a VSI context struct
* @cd: pointer to command details structure or NULL
*
@ -324,7 +324,7 @@ ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
/**
* ice_aq_free_vsi
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_ctx: pointer to a VSI context struct
* @keep_vsi_alloc: keep VSI allocation as part of this PF's resources
* @cd: pointer to command details structure or NULL
@ -360,7 +360,7 @@ ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
/**
* ice_aq_update_vsi
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_ctx: pointer to a VSI context struct
* @cd: pointer to command details structure or NULL
*
@ -397,7 +397,7 @@ ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx,
/**
* ice_is_vsi_valid - check whether the VSI is valid or not
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: VSI handle
*
* check whether the VSI is valid or not
@ -408,11 +408,11 @@ bool ice_is_vsi_valid(struct ice_hw *hw, u16 vsi_handle)
}
/**
* ice_get_hw_vsi_num - return the hw VSI number
* @hw: pointer to the hw struct
* ice_get_hw_vsi_num - return the HW VSI number
* @hw: pointer to the HW struct
* @vsi_handle: VSI handle
*
* return the hw VSI number
* return the HW VSI number
* Caution: call this function only if VSI is valid (ice_is_vsi_valid)
*/
u16 ice_get_hw_vsi_num(struct ice_hw *hw, u16 vsi_handle)
@ -422,7 +422,7 @@ u16 ice_get_hw_vsi_num(struct ice_hw *hw, u16 vsi_handle)
/**
* ice_get_vsi_ctx - return the VSI context entry for a given VSI handle
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: VSI handle
*
* return the VSI context entry for a given VSI handle
@ -434,7 +434,7 @@ struct ice_vsi_ctx *ice_get_vsi_ctx(struct ice_hw *hw, u16 vsi_handle)
/**
* ice_save_vsi_ctx - save the VSI context for a given VSI handle
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: VSI handle
* @vsi: VSI context pointer
*
@ -448,7 +448,7 @@ ice_save_vsi_ctx(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi)
/**
* ice_clear_vsi_ctx - clear the VSI context entry
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: VSI handle
*
* clear the VSI context entry
@ -467,7 +467,7 @@ static void ice_clear_vsi_ctx(struct ice_hw *hw, u16 vsi_handle)
/**
* ice_clear_all_vsi_ctx - clear all the VSI context entries
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*/
void ice_clear_all_vsi_ctx(struct ice_hw *hw)
{
@ -479,13 +479,13 @@ void ice_clear_all_vsi_ctx(struct ice_hw *hw)
/**
* ice_add_vsi - add VSI context to the hardware and VSI handle list
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: unique VSI handle provided by drivers
* @vsi_ctx: pointer to a VSI context struct
* @cd: pointer to command details structure or NULL
*
* Add a VSI context to the hardware also add it into the VSI handle list.
* If this function gets called after reset for exisiting VSIs then update
* If this function gets called after reset for existing VSIs then update
* with the new HW VSI number in the corresponding VSI handle list entry.
*/
enum ice_status
@ -502,7 +502,7 @@ ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
return status;
tmp_vsi_ctx = ice_get_vsi_ctx(hw, vsi_handle);
if (!tmp_vsi_ctx) {
/* Create a new vsi context */
/* Create a new VSI context */
tmp_vsi_ctx = (struct ice_vsi_ctx *)
ice_malloc(hw, sizeof(*tmp_vsi_ctx));
if (!tmp_vsi_ctx) {
@ -519,12 +519,12 @@ ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
tmp_vsi_ctx->vsi_num = vsi_ctx->vsi_num;
}
return status;
return ICE_SUCCESS;
}
/**
* ice_free_vsi- free VSI context from hardware and VSI handle list
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: unique VSI handle
* @vsi_ctx: pointer to a VSI context struct
* @keep_vsi_alloc: keep VSI allocation as part of this PF's resources
@ -549,7 +549,7 @@ ice_free_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
/**
* ice_update_vsi
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle: unique VSI handle
* @vsi_ctx: pointer to a VSI context struct
* @cd: pointer to command details structure or NULL
@ -570,8 +570,8 @@ ice_update_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
/**
* ice_aq_alloc_free_vsi_list
* @hw: pointer to the hw struct
* @vsi_list_id: VSI list id returned or used for lookup
* @hw: pointer to the HW struct
* @vsi_list_id: VSI list ID returned or used for lookup
* @lkup_type: switch rule filter lookup type
* @opc: switch rules population command type - pass in the command opcode
*
@ -629,7 +629,7 @@ ice_aq_alloc_free_vsi_list_exit:
/**
* ice_aq_sw_rules - add/update/remove switch rules
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @rule_list: pointer to switch rule population list
* @rule_list_sz: total size of the rule list in bytes
* @num_rules: number of switch rules in the rule_list
@ -798,7 +798,7 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
* 1. The switch is a VEB AND
* 2
* 2.1 The lookup is a directional lookup like ethertype,
* promiscuous, ethertype-mac, promiscuous-vlan
* promiscuous, ethertype-MAC, promiscuous-VLAN
* and default-port OR
* 2.2 The lookup is VLAN, OR
* 2.3 The lookup is MAC with mcast or bcast addr for MAC, OR
@ -829,7 +829,7 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
}
/**
* ice_ilog2 - Caculates integer log base 2 of a number
* ice_ilog2 - Calculates integer log base 2 of a number
* @n: number on which to perform operation
*/
static int ice_ilog2(u64 n)
@ -984,7 +984,7 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,
* @hw: pointer to the hardware structure
* @m_ent: the management entry for which sw marker needs to be added
* @sw_marker: sw marker to tag the Rx descriptor with
* @l_id: large action resource id
* @l_id: large action resource ID
*
* Create a large action to hold software marker and update the switch rule
* entry pointed by m_ent with newly created large action
@ -996,8 +996,8 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent,
struct ice_aqc_sw_rules_elem *lg_act, *rx_tx;
/* For software marker we need 3 large actions
* 1. FWD action: FWD TO VSI or VSI LIST
* 2. GENERIC VALUE action to hold the profile id
* 3. GENERIC VALUE action to hold the software marker id
* 2. GENERIC VALUE action to hold the profile ID
* 3. GENERIC VALUE action to hold the software marker ID
*/
const u16 num_lg_acts = 3;
enum ice_status status;
@ -1060,13 +1060,13 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent,
ice_fill_sw_rule(hw, &m_ent->fltr_info, rx_tx,
ice_aqc_opc_update_sw_rules);
/* Update the action to point to the large action id */
/* Update the action to point to the large action ID */
rx_tx->pdata.lkup_tx_rx.act =
CPU_TO_LE32(ICE_SINGLE_ACT_PTR |
((l_id << ICE_SINGLE_ACT_PTR_VAL_S) &
ICE_SINGLE_ACT_PTR_VAL_M));
/* Use the filter rule id of the previously created rule with single
/* Use the filter rule ID of the previously created rule with single
* act. Once the update happens, hardware will treat this as large
* action
*/
@ -1090,10 +1090,10 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent,
* @hw: pointer to the hardware structure
* @vsi_handle_arr: array of VSI handles to set in the VSI mapping
* @num_vsi: number of VSI handles in the array
* @vsi_list_id: VSI list id generated as part of allocate resource
* @vsi_list_id: VSI list ID generated as part of allocate resource
*
* Helper function to create a new entry of VSI list id to VSI mapping
* using the given VSI list id
* Helper function to create a new entry of VSI list ID to VSI mapping
* using the given VSI list ID
*/
static struct ice_vsi_list_map_info *
ice_create_vsi_list_map(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi,
@ -1122,13 +1122,13 @@ ice_create_vsi_list_map(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi,
* @hw: pointer to the hardware structure
* @vsi_handle_arr: array of VSI handles to form a VSI list
* @num_vsi: number of VSI handles in the array
* @vsi_list_id: VSI list id generated as part of allocate resource
* @vsi_list_id: VSI list ID generated as part of allocate resource
* @remove: Boolean value to indicate if this is a remove action
* @opc: switch rules population command type - pass in the command opcode
* @lkup_type: lookup type of the filter
*
* Call AQ command to add a new switch rule or update existing switch rule
* using the given VSI list id
* using the given VSI list ID
*/
static enum ice_status
ice_update_vsi_list_rule(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi,
@ -1185,7 +1185,7 @@ exit:
/**
* ice_create_vsi_list_rule - Creates and populates a VSI list rule
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
* @vsi_handle_arr: array of VSI handles to form a VSI list
* @num_vsi: number of VSI handles in the array
* @vsi_list_id: stores the ID of the VSI list to be created
@ -1279,7 +1279,7 @@ ice_create_pkt_fwd_rule_exit:
* @f_info: filter information for switch rule
*
* Call AQ command to update a previously created switch rule with a
* VSI list id
* VSI list ID
*/
static enum ice_status
ice_update_pkt_fwd_rule(struct ice_hw *hw, struct ice_fltr_info *f_info)
@ -1306,7 +1306,7 @@ ice_update_pkt_fwd_rule(struct ice_hw *hw, struct ice_fltr_info *f_info)
/**
* ice_update_sw_rule_bridge_mode
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Updates unicast switch filter rules based on VEB/VEPA mode
*/
@ -1362,7 +1362,7 @@ enum ice_status ice_update_sw_rule_bridge_mode(struct ice_hw *hw)
* Allocate a new VSI list and add two VSIs
* to this list using switch rule command
* Update the previously created switch rule with the
* newly created VSI list id
* newly created VSI list ID
* if a VSI list was previously created
* Add the new VSI to the previously created VSI list set
* using the update switch rule command
@ -1443,7 +1443,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
return ICE_SUCCESS;
/* Update the previously created VSI list set with
* the new VSI id passed in
* the new VSI ID passed in
*/
vsi_list_id = cur_fltr->fwd_id.vsi_list_id;
opcode = ice_aqc_opc_update_sw_rules;
@ -1451,7 +1451,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
status = ice_update_vsi_list_rule(hw, &vsi_handle, 1,
vsi_list_id, false, opcode,
new_fltr->lkup_type);
/* update VSI list mapping info with new VSI id */
/* update VSI list mapping info with new VSI ID */
if (!status)
ice_set_bit(vsi_handle,
m_entry->vsi_list_info->vsi_map);
@ -1495,7 +1495,7 @@ ice_find_rule_entry(struct ice_hw *hw, u8 recp_id, struct ice_fltr_info *f_info)
* @hw: pointer to the hardware structure
* @recp_id: lookup type for which VSI lists needs to be searched
* @vsi_handle: VSI handle to be found in VSI list
* @vsi_list_id: VSI list id found contaning vsi_handle
* @vsi_list_id: VSI list ID found containing vsi_handle
*
* Helper function to search a VSI list with single entry containing given VSI
* handle element. This can be extended further to search VSI list with more
@ -1527,7 +1527,7 @@ ice_find_vsi_list_entry(struct ice_hw *hw, u8 recp_id, u16 vsi_handle,
/**
* ice_add_rule_internal - add rule for a given lookup type
* @hw: pointer to the hardware structure
* @recp_id: lookup type (recipe id) for which rule has to be added
* @recp_id: lookup type (recipe ID) for which rule has to be added
* @f_entry: structure containing MAC forwarding information
*
* Adds or updates the rule lists for a given recipe
@ -1576,7 +1576,7 @@ ice_add_rule_internal(struct ice_hw *hw, u8 recp_id,
/**
* ice_remove_vsi_list_rule
* @hw: pointer to the hardware structure
* @vsi_list_id: VSI list id generated as part of allocate resource
* @vsi_list_id: VSI list ID generated as part of allocate resource
* @lkup_type: switch rule filter lookup type
*
* The VSI list should be emptied before this function is called to remove the
@ -1702,7 +1702,7 @@ ice_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
* ice_remove_rule_internal - Remove a filter rule of a given type
*
* @hw: pointer to the hardware structure
* @recp_id: recipe id for which the rule needs to removed
* @recp_id: recipe ID for which the rule needs to removed
* @f_entry: rule entry containing filter information
*/
static enum ice_status
@ -1752,7 +1752,7 @@ ice_remove_rule_internal(struct ice_hw *hw, u8 recp_id,
status = ice_rem_update_vsi_list(hw, vsi_handle, list_elem);
if (status)
goto exit;
/* if vsi count goes to zero after updating the vsi list */
/* if VSI count goes to zero after updating the VSI list */
if (list_elem->vsi_count == 0)
remove_rule = true;
}
@ -1830,7 +1830,7 @@ ice_add_mac(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list)
return ICE_ERR_PARAM;
hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id;
/* update the src in case it is vsi num */
/* update the src in case it is VSI num */
if (m_list_itr->fltr_info.src_id != ICE_SRC_ID_VSI)
return ICE_ERR_PARAM;
m_list_itr->fltr_info.src = hw_vsi_id;
@ -1907,7 +1907,7 @@ ice_add_mac(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list)
((u8 *)r_iter + (elem_sent * s_rule_size));
}
/* Fill up rule id based on the value returned from FW */
/* Fill up rule ID based on the value returned from FW */
r_iter = s_rule;
LIST_FOR_EACH_ENTRY(m_list_itr, m_list, ice_fltr_list_entry,
list_entry) {
@ -1968,7 +1968,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry)
ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
new_fltr = &f_entry->fltr_info;
/* VLAN id should only be 12 bits */
/* VLAN ID should only be 12 bits */
if (new_fltr->l_data.vlan.vlan_id > ICE_MAX_VLAN_ID)
return ICE_ERR_PARAM;
@ -2026,7 +2026,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry)
}
}
} else if (v_list_itr->vsi_list_info->ref_cnt == 1) {
/* Update existing VSI list to add new VSI id only if it used
/* Update existing VSI list to add new VSI ID only if it used
* by one VLAN rule.
*/
cur_fltr = &v_list_itr->fltr_info;
@ -2036,7 +2036,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry)
/* If VLAN rule exists and VSI list being used by this rule is
* referenced by more than 1 VLAN rule. Then create a new VSI
* list appending previous VSI with new VSI and update existing
* VLAN rule to point to new VSI list id
* VLAN rule to point to new VSI list ID
*/
struct ice_fltr_info tmp_fltr;
u16 vsi_handle_arr[2];
@ -2130,9 +2130,9 @@ ice_add_vlan(struct ice_hw *hw, struct LIST_HEAD_TYPE *v_list)
* @hw: pointer to the hardware structure
* @mv_list: list of MAC and VLAN filters
*
* If the VSI on which the mac-vlan pair has to be added has RX and Tx VLAN
* If the VSI on which the MAC-VLAN pair has to be added has Rx and Tx VLAN
* pruning bits enabled, then it is the responsibility of the caller to make
* sure to add a vlan only filter on the same VSI. Packets belonging to that
* sure to add a VLAN only filter on the same VSI. Packets belonging to that
* VLAN won't be received on that VSI otherwise.
*/
enum ice_status
@ -2446,7 +2446,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
struct ice_fltr_mgmt_list_entry *fm_entry;
enum ice_status status = ICE_SUCCESS;
/* check to make sure VSI id is valid and within boundary */
/* check to make sure VSI ID is valid and within boundary */
if (!ice_is_vsi_valid(hw, vsi_handle))
return ICE_ERR_PARAM;
@ -2504,7 +2504,7 @@ static u8 ice_determine_promisc_mask(struct ice_fltr_info *fi)
/**
* ice_remove_promisc - Remove promisc based filter rules
* @hw: pointer to the hardware structure
* @recp_id: recipe id for which the rule needs to removed
* @recp_id: recipe ID for which the rule needs to removed
* @v_list: list of promisc entries
*/
static enum ice_status
@ -2851,8 +2851,8 @@ void ice_remove_vsi_fltr(struct ice_hw *hw, u16 vsi_handle)
/**
* ice_replay_vsi_fltr - Replay filters for requested VSI
* @hw: pointer to the hardware structure
* @vsi_handle: driver vsi handle
* @recp_id: Recipe id for which rules need to be replayed
* @vsi_handle: driver VSI handle
* @recp_id: Recipe ID for which rules need to be replayed
* @list_head: list for which filters need to be replayed
*
* Replays the filter of recipe recp_id for a VSI represented via vsi_handle.
@ -2877,7 +2877,7 @@ ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id,
f_entry.fltr_info = itr->fltr_info;
if (itr->vsi_count < 2 && recp_id != ICE_SW_LKUP_VLAN &&
itr->fltr_info.vsi_handle == vsi_handle) {
/* update the src in case it is vsi num */
/* update the src in case it is VSI num */
if (f_entry.fltr_info.src_id == ICE_SRC_ID_VSI)
f_entry.fltr_info.src = hw_vsi_id;
status = ice_add_rule_internal(hw, recp_id, &f_entry);
@ -2892,7 +2892,7 @@ ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id,
ice_clear_bit(vsi_handle, itr->vsi_list_info->vsi_map);
f_entry.fltr_info.vsi_handle = vsi_handle;
f_entry.fltr_info.fltr_act = ICE_FWD_TO_VSI;
/* update the src in case it is vsi num */
/* update the src in case it is VSI num */
if (f_entry.fltr_info.src_id == ICE_SRC_ID_VSI)
f_entry.fltr_info.src = hw_vsi_id;
if (recp_id == ICE_SW_LKUP_VLAN)
@ -2910,7 +2910,7 @@ end:
/**
* ice_replay_vsi_all_fltr - replay all filters stored in bookkeeping lists
* @hw: pointer to the hardware structure
* @vsi_handle: driver vsi handle
* @vsi_handle: driver VSI handle
*
* Replays filters for requested VSI via vsi_handle.
*/
@ -2938,7 +2938,7 @@ enum ice_status ice_replay_vsi_all_fltr(struct ice_hw *hw, u16 vsi_handle)
/**
* ice_rm_all_sw_replay_rule_info - deletes filter replay rules
* @hw: pointer to the hw struct
* @hw: pointer to the HW struct
*
* Deletes the filter replay rules.
*/

View File

@ -40,10 +40,10 @@ enum ice_sw_lkup_type {
ICE_SW_LKUP_DFLT = 5,
ICE_SW_LKUP_ETHERTYPE_MAC = 8,
ICE_SW_LKUP_PROMISC_VLAN = 9,
ICE_SW_LKUP_LAST,
ICE_SW_LKUP_LAST
};
/* type of filter src id */
/* type of filter src ID */
enum ice_src_id {
ICE_SRC_ID_UNKNOWN = 0,
ICE_SRC_ID_VSI,
@ -94,8 +94,8 @@ struct ice_fltr_info {
/* Depending on filter action */
union {
/* queue id in case of ICE_FWD_TO_Q and starting
* queue id in case of ICE_FWD_TO_QGRP.
/* queue ID in case of ICE_FWD_TO_Q and starting
* queue ID in case of ICE_FWD_TO_QGRP.
*/
u16 q_id:11;
u16 hw_vsi_id:10;
@ -134,8 +134,8 @@ struct ice_sw_act_ctrl {
enum ice_sw_fwd_act_type fltr_act;
/* Depending on filter action */
union {
/* This is a queue id in case of ICE_FWD_TO_Q and starting
* queue id in case of ICE_FWD_TO_QGRP.
/* This is a queue ID in case of ICE_FWD_TO_Q and starting
* queue ID in case of ICE_FWD_TO_QGRP.
*/
u16 q_id:11;
u16 vsi_id:10;
@ -178,7 +178,7 @@ struct ice_sw_recipe {
u8 chain_idx;
/* if this recipe is a collection of other recipe then count of other
* recipes and recipe ids of those recipes
* recipes and recipe IDs of those recipes
*/
u8 n_grp_count;
@ -211,9 +211,11 @@ struct ice_sw_recipe {
/* AQ buffer associated with this recipe */
struct ice_aqc_recipe_data_elem *root_buf;
/* This struct saves the fv_words for a given lookup */
struct ice_prot_lkup_ext lkup_exts;
};
/* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list id */
/* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list ID */
struct ice_vsi_list_map_info {
struct LIST_ENTRY_TYPE list_entry;
ice_declare_bitmap(vsi_map, ICE_MAX_VSI);
@ -235,7 +237,7 @@ struct ice_fltr_list_entry {
* used for VLAN membership.
*/
struct ice_fltr_mgmt_list_entry {
/* back pointer to VSI list id to VSI list mapping */
/* back pointer to VSI list ID to VSI list mapping */
struct ice_vsi_list_map_info *vsi_list_info;
u16 vsi_count;
#define ICE_INVAL_LG_ACT_INDEX 0xffff

View File

@ -196,7 +196,7 @@ enum ice_q {
};
/* Different reset sources for which a disable queue AQ call has to be made in
* order to clean the TX scheduler as a part of the reset
* order to clean the Tx scheduler as a part of the reset
*/
enum ice_disq_rst_src {
ICE_NO_RESET = 0,
@ -242,11 +242,11 @@ struct ice_hw_common_caps {
u32 rss_table_size; /* 512 for PFs and 64 for VFs */
u32 rss_table_entry_width; /* RSS Entry width in bits */
/* TX/RX queues */
u32 num_rxq; /* Number/Total RX queues */
u32 rxq_first_id; /* First queue ID for RX queues */
u32 num_txq; /* Number/Total TX queues */
u32 txq_first_id; /* First queue ID for TX queues */
/* Tx/Rx queues */
u32 num_rxq; /* Number/Total Rx queues */
u32 rxq_first_id; /* First queue ID for Rx queues */
u32 num_txq; /* Number/Total Tx queues */
u32 txq_first_id; /* First queue ID for Tx queues */
/* MSI-X vectors */
u32 num_msix_vectors;
@ -390,7 +390,7 @@ struct ice_sched_node {
struct ice_sched_node *sibling; /* next sibling in the same layer */
struct ice_sched_node **children;
struct ice_aqc_txsched_elem_data info;
u32 agg_id; /* aggregator group id */
u32 agg_id; /* aggregator group ID */
u16 vsi_handle;
u8 in_use; /* suspended or in use */
u8 tx_sched_layer; /* Logical Layer (1-9) */
@ -435,8 +435,8 @@ enum ice_agg_type {
/* Rate limit types */
enum ice_rl_type {
ICE_UNKNOWN_BW = 0,
ICE_MIN_BW, /* for cir profile */
ICE_MAX_BW, /* for eir profile */
ICE_MIN_BW, /* for CIR profile */
ICE_MAX_BW, /* for EIR profile */
ICE_SHARED_BW /* for shared profile */
};
@ -475,7 +475,7 @@ enum ice_rl_type {
*
* (a) is the last_node_teid(not of type Leaf). A leaf node is created under
* (a) as child node where queues get added, add Tx/Rx queue admin commands;
* need teid of (a) to add queues.
* need TEID of (a) to add queues.
*
* This tree
* -> has 8 branches (one for each TC)
@ -487,7 +487,7 @@ enum ice_rl_type {
* Refer to the documentation for more info.
*/
/* Data structure for saving bw information */
/* Data structure for saving BW information */
enum ice_bw_type {
ICE_BW_TYPE_PRIO,
ICE_BW_TYPE_CIR,
@ -511,12 +511,12 @@ struct ice_bw_type_info {
u32 shared_bw;
};
/* vsi type list entry to locate corresponding vsi/ag nodes */
/* VSI type list entry to locate corresponding VSI/aggregator nodes */
struct ice_sched_vsi_info {
struct ice_sched_node *vsi_node[ICE_MAX_TRAFFIC_CLASS];
struct ice_sched_node *ag_node[ICE_MAX_TRAFFIC_CLASS];
u16 max_lanq[ICE_MAX_TRAFFIC_CLASS];
/* bw_t_info saves VSI bw information */
/* bw_t_info saves VSI BW information */
struct ice_bw_type_info bw_t_info[ICE_MAX_TRAFFIC_CLASS];
};
@ -577,7 +577,7 @@ struct ice_dcbx_cfg {
struct ice_port_info {
struct ice_sched_node *root; /* Root Node per Port */
struct ice_hw *hw; /* back pointer to hw instance */
struct ice_hw *hw; /* back pointer to HW instance */
u32 last_node_teid; /* scheduler last node info */
u16 sw_id; /* Initial switch ID belongs to port */
u16 pf_vf_num;
@ -592,7 +592,7 @@ struct ice_port_info {
struct ice_mac_info mac;
struct ice_phy_info phy;
struct ice_lock sched_lock; /* protect access to TXSched tree */
/* List contain profile id(s) and other params per layer */
/* List contain profile ID(s) and other params per layer */
struct LIST_HEAD_TYPE rl_prof_list[ICE_AQC_TOPO_MAX_LEVEL_NUM];
#if !defined(NO_DCB_SUPPORT) || defined(ADQ_SUPPORT)
struct ice_dcbx_cfg local_dcbx_cfg; /* Oper/Local Cfg */
@ -648,7 +648,7 @@ struct ice_hw {
u8 pf_id; /* device profile info */
u16 max_burst_size; /* driver sets this value */
/* TX Scheduler values */
/* Tx Scheduler values */
u16 num_tx_sched_layers;
u16 num_tx_sched_phys_layers;
u8 flattened_layers;
@ -659,7 +659,7 @@ struct ice_hw {
struct ice_bw_type_info tc_node_bw_t_info[ICE_MAX_TRAFFIC_CLASS];
struct ice_vsi_ctx *vsi_ctx[ICE_MAX_VSI];
u8 evb_veb; /* true for VEB, false for VEPA */
u8 reset_ongoing; /* true if hw is in reset, false otherwise */
u8 reset_ongoing; /* true if HW is in reset, false otherwise */
struct ice_bus_info bus;
struct ice_nvm_info nvm;
struct ice_hw_dev_caps dev_caps; /* device capabilities */