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>
#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;
-
/* Rate limiting profile for
* Add RL profile (indirect 0x0410)
* Query RL profile (indirect 0x0411)
__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)
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
-/* Add TX LAN Queues (indirect 0x0C30) */
+/* Add Tx LAN Queues (indirect 0x0C30) */
struct ice_aqc_add_txqs {
u8 num_qgrps;
u8 reserved[3];
};
-/* 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 {
};
-/* 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!
};
-/* 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
};
-/* 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
};
-/* TX LAN Queues Cleanup Event (0x0C31) */
+/* Tx LAN Queues Cleanup Event (0x0C31) */
struct ice_aqc_txqs_cleanup {
__le16 caller_opc;
__le16 cmd_tag;
};
-/* 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
};
-/* 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 {
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,
* @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)
{
/**
* 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
/* flag cleared so calling functions don't call AQ again */
pi->phy.get_link_info = false;
- return status;
+ return ICE_SUCCESS;
}
/**
/**
* 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)
{
/**
* 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)
{
/**
* 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
/**
* 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
*
/**
* 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.
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 */
* @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)
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)))));
* @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,
* @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)
{
* @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,
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)))));
* @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,
* @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)
* @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,
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)))));
* @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,
* @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)
/**
* 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)
/**
* 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
/**
* 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
/**
* 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
/**
* 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
*
/**
* 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
*
/**
* 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.
*/
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)) {
/**
* 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
/**
* 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
}
/**
- * 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
/**
* 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
/**
* 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
/**
* 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
/**
* 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
/**
* 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).
*/
/**
* 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.
* @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
/**
* 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
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) {
/**
* 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
/**
* 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
*
/**
* __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
/**
* 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
*
/**
* 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
*
* @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)
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);
}
* 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,
* 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;
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:
* @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
}
/**
- * 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.
*/
}
/**
- * 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,
/**
* 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.
*/
}
/**
- * 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.
/**
* ice_replay_post - post replay configuration cleanup
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* Post replay cleanup.
*/
/**
- * 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
* ... 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,
-
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,
/**
* 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.
/**
* 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
/**
* 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)
/**
* 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
* 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)
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);
* @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)
/**
* 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.
*/
/* 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)
/**
* 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
*
/**
* 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
/**
* 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
/**
* 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
/**
* 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
*
/**
* 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
*
/* 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 */
/* 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;
/* 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
}
/**
- * 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)
}
/**
- * 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)
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;
/**
* 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.
/**
* 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.
}
/**
- * 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.
}
/**
- * 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
}
/**
- * 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.
*/
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;
}
/**
- * 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
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;
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;
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;
}
/**
- * 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,
}
/**
- * 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
*/
}
/**
- * 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
*/
}
/**
- * 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.
}
/**
- * 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.
*/
}
/**
- * 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
}
/**
- * 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)
/**
* 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)
/**
* 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)
/**
* 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
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.
*/
/**
* 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)
{
/**
* 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)
{
}
/**
- * 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)
}
/**
- * 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)
}
/**
- * 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
}
/**
- * 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
* @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,
}
/**
- * 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
}
/**
- * 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
*/
/**
* 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
/**
* 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
*/
}
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
}
/**
- * 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
}
/**
- * 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
}
/**
- * 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
/**
* 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
*/
/**
* 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[],
/* 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;
/**
* 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
*
/**
* 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
/**
* 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
/**
* 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
*/
}
/**
- * 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
*/
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;
/**
* 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
/**
* 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
/**
* 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
/**
* 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
*/
/**
* 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.
*/
/**
* 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
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;
/**
* 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
/**
* 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
/**
* 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
}
/**
- * 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,
/**
* 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
/**
* 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
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;
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;
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;
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,
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);
/**
* 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
/**
* 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
/**
* 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
/**
* 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
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;
}
} 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;
/**
* 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
/**
* 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
*/
/**
* 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
INIT_LIST_HEAD(©);
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;
} else if (ice_find_dup_props_vsig(hw, blk, ©,
&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
*/
} 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,
©, &chg);
/**
* 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
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);
};
#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.
*/
};
/* Extraction sequence - list of match fields:
- * protocol id, offset, profile length
+ * protocol ID, offset, profile length
*/
union ice_match_fld {
struct {
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);
/**
* 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
/**
* 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
*/
/**
* 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
/**
* 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
/**
* 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
/**
* 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
/**
* 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
*/
/**
* 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
/**
* 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
* @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,
* @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,
/**
* 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
/**
* 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
*/
}
/**
- * 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,
/**
* 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
*
/**
* 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
/**
* 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)
}
/**
- * 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)
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,
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,
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)
}
/* 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,
*
* 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.
*/
}
/**
- * 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
*/
* @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;
u64 id;
u16 vsi_handle;
enum ice_flow_priority priority;
-
struct ice_flow_prof *prof;
/* Flow entry's content */
#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 */
} 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 {
} 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 {
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!!! */
};
/* 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,
};
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
*/
} 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 */
};
/* 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 */
};
/* 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 */
};
/* 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 */
/* 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;
};
/* 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
};
/* 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 */
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;
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,
};
/**
* 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)
/**
* 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
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);
/**
* ice_nvm_validate_checksum
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* Verify NVM PFA checksum validity (0x0706)
*/
/* 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.
*/
#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;
/**
* ice_sched_find_node_by_teid - Find the Tx scheduler node in SW DB
* @start_node: pointer to the starting ice_sched_node struct in a sub-tree
- * @teid: node teid to search
+ * @teid: node TEID to search
*
- * This function searches for a node matching the teid in the scheduling tree
+ * This function searches for a node matching the TEID in the scheduling tree
* from the SW DB. The search is recursive and is restricted by the number of
* layers it has searched through; stopping at the max supported layer.
*
start_node->info.data.elem_type == ICE_AQC_ELEM_TYPE_LEAF)
return NULL;
- /* Check if teid matches to any of the children nodes */
+ /* Check if TEID matches to any of the children nodes */
for (i = 0; i < start_node->num_children; i++)
if (ICE_TXSCHED_GET_NODE_TEID(start_node->children[i]) == teid)
return start_node->children[i];
/**
* ice_aqc_send_sched_elem_cmd - send scheduling elements cmd
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @cmd_opc: cmd opcode
* @elems_req: number of elements to request
* @buf: pointer to buffer
/**
* ice_aq_query_sched_elems - query scheduler elements
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @elems_req: number of elements to query
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
* ice_aq_delete_sched_elems - delete scheduler elements
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @grps_req: number of groups to delete
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
}
/**
- * ice_sched_remove_elems - remove nodes from hw
- * @hw: pointer to the hw struct
+ * ice_sched_remove_elems - remove nodes from HW
+ * @hw: pointer to the HW struct
* @parent: pointer to the parent node
* @num_nodes: number of nodes
* @node_teids: array of node teids to be deleted
*
- * This function remove nodes from hw
+ * This function remove nodes from HW
*/
static enum ice_status
ice_sched_remove_elems(struct ice_hw *hw, struct ice_sched_node *parent,
/**
* ice_sched_get_first_node - get the first node of the given layer
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @parent: pointer the base node of the subtree
* @layer: layer number
*
/**
* ice_aq_get_dflt_topo - gets default scheduler topology
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @lport: logical port number
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
* ice_aq_add_sched_elems - adds scheduling element
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @grps_req: the number of groups that are requested to be added
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
* ice_aq_cfg_sched_elems - configures scheduler elements
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @elems_req: number of elements to configure
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
* ice_aq_move_sched_elems - move scheduler elements
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @grps_req: number of groups to move
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
* ice_aq_suspend_sched_elems - suspend scheduler elements
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @elems_req: number of elements to suspend
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
* ice_aq_resume_sched_elems - resume scheduler elements
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @elems_req: number of elements to resume
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
* ice_aq_query_sched_res - query scheduler resource
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @buf_size: buffer size in bytes
* @buf: pointer to buffer
* @cd: pointer to command details structure or NULL
}
/**
- * ice_sched_suspend_resume_elems - suspend or resume hw nodes
- * @hw: pointer to the hw struct
+ * ice_sched_suspend_resume_elems - suspend or resume HW nodes
+ * @hw: pointer to the HW struct
* @num_nodes: number of nodes
* @node_teids: array of node teids to be suspended or resumed
* @suspend: true means suspend / false means resume
*
- * This function suspends or resumes hw nodes
+ * This function suspends or resumes HW nodes
*/
static enum ice_status
ice_sched_suspend_resume_elems(struct ice_hw *hw, u8 num_nodes, u32 *node_teids,
/**
* ice_aq_rl_profile - performs a rate limiting task
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @opcode:opcode for add, query, or remove profile(s)
* @num_profiles: the number of profiles
* @buf: pointer to buffer
/**
* ice_aq_add_rl_profile - adds rate limiting profile(s)
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @num_profiles: the number of profile(s) to be add
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
* @num_profiles_added: total number of profiles added to return
* @cd: pointer to command details structure
*
- * Add rl profile (0x0410)
+ * Add RL profile (0x0410)
*/
static enum ice_status
ice_aq_add_rl_profile(struct ice_hw *hw, u16 num_profiles,
/**
* ice_aq_query_rl_profile - query rate limiting profile(s)
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @num_profiles: the number of profile(s) to query
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
* @cd: pointer to command details structure
*
- * Query rl profile (0x0411)
+ * Query RL profile (0x0411)
*/
enum ice_status
ice_aq_query_rl_profile(struct ice_hw *hw, u16 num_profiles,
}
/**
- * ice_aq_remove_rl_profile - removes rl profile(s)
- * @hw: pointer to the hw struct
+ * ice_aq_remove_rl_profile - removes RL profile(s)
+ * @hw: pointer to the HW struct
* @num_profiles: the number of profile(s) to remove
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
* @num_profiles_removed: total number of profiles removed to return
* @cd: pointer to command details structure or NULL
*
- * Remove rl profile (0x0415)
+ * Remove RL profile (0x0415)
*/
static enum ice_status
ice_aq_remove_rl_profile(struct ice_hw *hw, u16 num_profiles,
}
/**
- * ice_sched_clear_rl_prof - clears rl prof entries
+ * ice_sched_clear_rl_prof - clears RL prof entries
* @pi: port information structure
*
- * This function removes all rl profile from hw as well as from SW DB.
+ * This function removes all RL profile from HW as well as from SW DB.
*/
static void ice_sched_clear_rl_prof(struct ice_port_info *pi)
{
}
/**
- * ice_sched_clear_agg - clears the agg related information
+ * ice_sched_clear_agg - clears the aggregator related information
* @hw: pointer to the hardware structure
*
- * This function removes agg list and free up agg related memory
+ * This function removes aggregator list and free up aggregator related memory
* previously allocated.
*/
void ice_sched_clear_agg(struct ice_hw *hw)
{
if (!pi)
return;
- /* remove rl profiles related lists */
+ /* remove RL profiles related lists */
ice_sched_clear_rl_prof(pi);
if (pi->root) {
ice_free_sched_node(pi, pi->root);
/**
* ice_sched_cleanup_all - cleanup scheduler elements from SW DB for all ports
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* Cleanup scheduling elements from SW DB for all the ports
*/
/**
* ice_aq_cfg_l2_node_cgd - configures L2 node to CGD mapping
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @num_l2_nodes: the number of L2 nodes whose CGDs to configure
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
/**
- * ice_sched_add_elems - add nodes to hw and SW DB
+ * ice_sched_add_elems - add nodes to HW and SW DB
* @pi: port information structure
* @tc_node: pointer to the branch node
* @parent: pointer to the parent node
* @layer: layer number to add nodes
* @num_nodes: number of nodes
* @num_nodes_added: pointer to num nodes added
- * @first_node_teid: if new nodes are added then return the teid of first node
+ * @first_node_teid: if new nodes are added then return the TEID of first node
*
- * This function add nodes to hw as well as to SW DB for a given layer
+ * This function add nodes to HW as well as to SW DB for a given layer
*/
static enum ice_status
ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node,
* @parent: pointer to parent node
* @layer: layer number to add nodes
* @num_nodes: number of nodes to be added
- * @first_node_teid: pointer to the first node teid
+ * @first_node_teid: pointer to the first node TEID
* @num_nodes_added: pointer to number of nodes added
*
* This function add nodes to a given layer.
*num_nodes_added += num_added;
}
- /* Don't modify the first node teid memory if the first node was
+ /* Don't modify the first node TEID memory if the first node was
* added already in the above call. Instead send some temp
* memory for all other recursive calls.
*/
/**
* ice_sched_get_qgrp_layer - get the current queue group layer number
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* This function returns the current queue group layer number
*/
/**
* ice_sched_get_vsi_layer - get the current VSI layer number
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* This function returns the current VSI layer number
*/
* 7 4
* 5 or less sw_entry_point_layer
*/
- /* calculate the vsi layer based on number of layers. */
+ /* calculate the VSI layer based on number of layers. */
if (hw->num_tx_sched_layers > ICE_VSI_LAYER_OFFSET + 1) {
u8 layer = hw->num_tx_sched_layers - ICE_VSI_LAYER_OFFSET;
/**
* ice_sched_get_agg_layer - get the current aggregator layer number
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* This function returns the current aggregator layer number
*/
static u8 ice_sched_get_agg_layer(struct ice_hw *hw)
{
- /* Num Layers agg layer
+ /* Num Layers aggregator layer
* 9 4
* 7 or less sw_entry_point_layer
*/
- /* calculate the agg layer based on number of layers. */
+ /* calculate the aggregator layer based on number of layers. */
if (hw->num_tx_sched_layers > ICE_AGG_LAYER_OFFSET + 1) {
u8 layer = hw->num_tx_sched_layers - ICE_AGG_LAYER_OFFSET;
}
/**
- * ice_sched_get_node - Get the struct ice_sched_node for given teid
+ * ice_sched_get_node - Get the struct ice_sched_node for given TEID
* @pi: port information structure
* @teid: Scheduler node TEID
*
- * This function retrieves the ice_sched_node struct for given teid from
+ * This function retrieves the ice_sched_node struct for given TEID from
* the SW DB and returns it to the caller.
*/
struct ice_sched_node *ice_sched_get_node(struct ice_port_info *pi, u32 teid)
/**
* ice_sched_find_node_in_subtree - Find node in part of base node subtree
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @base: pointer to the base node
* @node: pointer to the node to search
*
}
/**
- * ice_sched_get_free_qparent - Get a free lan or rdma q group node
+ * ice_sched_get_free_qparent - Get a free LAN or RDMA queue group node
* @pi: port information structure
* @vsi_handle: software VSI handle
* @tc: branch number
- * @owner: lan or rdma
+ * @owner: LAN or RDMA
*
- * This function retrieves a free lan or rdma q group node
+ * This function retrieves a free LAN or RDMA queue group node
*/
struct ice_sched_node *
ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
if (!vsi_ctx)
return NULL;
vsi_node = vsi_ctx->sched.vsi_node[tc];
- /* validate invalid VSI id */
+ /* validate invalid VSI ID */
if (!vsi_node)
goto lan_q_exit;
- /* get the first q group node from VSI sub-tree */
+ /* get the first queue group node from VSI sub-tree */
qgrp_node = ice_sched_get_first_node(pi->hw, vsi_node, qgrp_layer);
while (qgrp_node) {
/* make sure the qgroup node is part of the VSI subtree */
}
/**
- * ice_sched_get_vsi_node - Get a VSI node based on VSI id
- * @hw: pointer to the hw struct
+ * ice_sched_get_vsi_node - Get a VSI node based on VSI ID
+ * @hw: pointer to the HW struct
* @tc_node: pointer to the TC node
* @vsi_handle: software VSI handle
*
- * This function retrieves a VSI node for a given VSI id from a given
+ * This function retrieves a VSI node for a given VSI ID from a given
* TC branch
*/
struct ice_sched_node *
}
/**
- * ice_sched_get_agg_node - Get an aggregator node based on agg id
- * @hw: pointer to the hw struct
+ * ice_sched_get_agg_node - Get an aggregator node based on aggregator ID
+ * @hw: pointer to the HW struct
* @tc_node: pointer to the TC node
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
*
- * This function retrieves an aggregator node for a given agg id from a given
- * TC branch
+ * This function retrieves an aggregator node for a given aggregator ID from
+ * a given TC branch
*/
struct ice_sched_node *
ice_sched_get_agg_node(struct ice_hw *hw, struct ice_sched_node *tc_node,
/**
* ice_sched_check_node - Compare node parameters between SW DB and HW DB
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @node: pointer to the ice_sched_node struct
*
* This function queries and compares the HW element with SW DB node parameters
/**
* ice_sched_calc_vsi_child_nodes - calculate number of VSI child nodes
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @num_qs: number of queues
* @num_nodes: num nodes array
*
qgl = ice_sched_get_qgrp_layer(hw);
vsil = ice_sched_get_vsi_layer(hw);
- /* calculate num nodes from q group to VSI layer */
+ /* calculate num nodes from queue group to VSI layer */
for (i = qgl; i > vsil; i--) {
/* round to the next integer if there is a remainder */
num = DIVIDE_AND_ROUND_UP(num, hw->max_children[i]);
* @vsi_handle: software VSI handle
* @tc_node: pointer to the TC node
* @num_nodes: pointer to the num nodes that needs to be added per layer
- * @owner: node owner (lan or rdma)
+ * @owner: node owner (LAN or RDMA)
*
* This function adds the VSI child nodes to tree. It gets called for
- * lan and rdma separately.
+ * LAN and RDMA separately.
*/
static enum ice_status
ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle,
/**
* ice_sched_calc_vsi_support_nodes - calculate number of VSI support nodes
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @tc_node: pointer to TC node
* @num_nodes: pointer to num nodes array
*
/* calculate number of supported nodes needed for this VSI */
ice_sched_calc_vsi_support_nodes(hw, tc_node, num_nodes);
- /* add vsi supported nodes to tc subtree */
+ /* add VSI supported nodes to TC subtree */
return ice_sched_add_vsi_support_nodes(pi, vsi_handle, tc_node,
num_nodes);
}
return status;
vsi_ctx->sched.max_lanq[tc] = new_numqs;
- return status;
+ return ICE_SUCCESS;
}
/**
* @vsi_handle: software VSI handle
* @tc: TC number
* @maxqs: max number of queues
- * @owner: lan or rdma
+ * @owner: LAN or RDMA
* @enable: TC enabled or disabled
*
* This function adds/updates VSI nodes based on the number of queues. If TC is
return ICE_ERR_PARAM;
vsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle);
- /* suspend the VSI if tc is not enabled */
+ /* suspend the VSI if TC is not enabled */
if (!enable) {
if (vsi_node && vsi_node->in_use) {
u32 teid = LE32_TO_CPU(vsi_node->info.node_teid);
}
/**
- * ice_sched_rm_agg_vsi_entry - remove agg related vsi info entry
+ * ice_sched_rm_agg_vsi_entry - remove aggregator related VSI info entry
* @pi: port information structure
* @vsi_handle: software VSI handle
*
- * This function removes single aggregator vsi info entry from
+ * This function removes single aggregator VSI info entry from
* aggregator list.
*/
static void
* ice_sched_rm_vsi_cfg - remove the VSI and its children nodes
* @pi: port information structure
* @vsi_handle: software VSI handle
- * @owner: lan or rdma
+ * @owner: LAN or RDMA
*
- * This function removes the VSI and its lan or rdma children nodes from the
+ * This function removes the VSI and its LAN or RDMA children nodes from the
* scheduler tree.
*/
static enum ice_status
ice_free_sched_node(pi, vsi_node);
vsi_ctx->sched.vsi_node[i] = NULL;
- /* clean up agg related vsi info if any */
+ /* clean up aggregator related VSI info if any */
ice_sched_rm_agg_vsi_info(pi, vsi_handle);
}
if (owner == ICE_SCHED_NODE_OWNER_LAN)
}
/**
- * ice_rm_vsi_lan_cfg - remove VSI and its lan children nodes
+ * ice_rm_vsi_lan_cfg - remove VSI and its LAN children nodes
* @pi: port information structure
* @vsi_handle: software VSI handle
*
- * This function clears the VSI and its lan children nodes from scheduler tree
+ * This function clears the VSI and its LAN children nodes from scheduler tree
* for all TCs.
*/
enum ice_status ice_rm_vsi_lan_cfg(struct ice_port_info *pi, u16 vsi_handle)
/**
* ice_sched_is_tree_balanced - Check tree nodes are identical or not
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @node: pointer to the ice_sched_node struct
*
* This function compares all the nodes for a given tree against HW DB nodes
}
/**
- * ice_aq_query_node_to_root - retrieve the tree topology for a given node teid
- * @hw: pointer to the hw struct
- * @node_teid: node teid
+ * ice_aq_query_node_to_root - retrieve the tree topology for a given node TEID
+ * @hw: pointer to the HW struct
+ * @node_teid: node TEID
* @buf: pointer to buffer
* @buf_size: buffer size in bytes
* @cd: pointer to command details structure or NULL
*
* This function retrieves the tree topology from the firmware for a given
- * node teid to the root node.
+ * node TEID to the root node.
*/
enum ice_status
ice_aq_query_node_to_root(struct ice_hw *hw, u32 node_teid,
}
/**
- * ice_get_agg_info - get the agg id
+ * ice_get_agg_info - get the aggregator ID
* @hw: pointer to the hardware structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
*
- * This function validates agg id. The function returns info if agg id is
- * prsent in list otherwise it returns null.
+ * This function validates aggregator ID. The function returns info if
+ * aggregator ID is present in list otherwise it returns null.
*/
static struct ice_sched_agg_info*
ice_get_agg_info(struct ice_hw *hw, u32 agg_id)
}
/**
- * ice_move_all_vsi_to_dflt_agg - move all VSI(s) to default agg
+ * ice_move_all_vsi_to_dflt_agg - move all VSI(s) to default aggregator
* @pi: port information structure
* @agg_info: aggregator info
* @tc: traffic class number
* @rm_vsi_info: true or false
*
* This function move all the VSI(s) to the default aggregator and delete
- * agg vsi info based on passed in boolean parameter rm_vsi_info. The
+ * aggregator VSI info based on passed in boolean parameter rm_vsi_info. The
* caller holds the scheduler lock.
*/
static enum ice_status
ice_sched_agg_vsi_info, list_entry) {
u16 vsi_handle = agg_vsi_info->vsi_handle;
- /* Move VSI to default agg */
+ /* Move VSI to default aggregator */
if (!ice_is_tc_ena(agg_vsi_info->tc_bitmap[0], tc))
continue;
}
/**
- * ice_rm_agg_cfg_tc - remove agg configuration for tc
+ * ice_rm_agg_cfg_tc - remove aggregator configuration for TC
* @pi: port information structure
- * @agg_info: aggregator id
- * @tc: tc number
+ * @agg_info: aggregator ID
+ * @tc: TC number
* @rm_vsi_info: bool value true or false
*
- * This function removes agg reference to vsi of given tc. It removes the agg
- * configuration completely for requested tc. The caller needs to hold the
- * scheduler lock.
+ * This function removes aggregator reference to VSI of given TC. It removes
+ * the aggregator configuration completely for requested TC. The caller needs
+ * to hold the scheduler lock.
*/
static enum ice_status
ice_rm_agg_cfg_tc(struct ice_port_info *pi, struct ice_sched_agg_info *agg_info,
}
/**
- * ice_save_agg_tc_bitmap - save agg TC bitmap
+ * ice_save_agg_tc_bitmap - save aggregator TC bitmap
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
* @tc_bitmap: 8 bits TC bitmap
*
- * Save agg TC bitmap. This function needs to be called with scheduler
+ * Save aggregator TC bitmap. This function needs to be called with scheduler
* lock held.
*/
static enum ice_status
}
/**
- * ice_sched_cfg_agg - configure agg node
+ * ice_sched_cfg_agg - configure aggregator node
* @pi: port information structure
- * @agg_id: aggregator id
- * @agg_type: aggregator type queue, VSI, or agg group
+ * @agg_id: aggregator ID
+ * @agg_type: aggregator type queue, VSI, or aggregator group
* @tc_bitmap: bits TC bitmap
*
* It registers a unique aggregator node into scheduler services. It
* allows a user to register with a unique ID to track it's resources.
* The aggregator type determines if this is a queue group, VSI group
- * or aggregator group. It then creates the agg node(s) for requested
- * tc(s) or removes an existing agg node including its configuration
- * if indicated via tc_bitmap. Call ice_rm_agg_cfg to release agg
- * resources and remove agg id.
+ * or aggregator group. It then creates the aggregator node(s) for requested
+ * TC(s) or removes an existing aggregator node including its configuration
+ * if indicated via tc_bitmap. Call ice_rm_agg_cfg to release aggregator
+ * resources and remove aggregator ID.
* This function needs to be called with scheduler lock held.
*/
static enum ice_status
agg_info = ice_get_agg_info(hw, agg_id);
if (!agg_info) {
- /* Creat new entry for new agg id */
+ /* Create new entry for new aggregator ID */
agg_info = (struct ice_sched_agg_info *)
ice_malloc(hw, sizeof(*agg_info));
if (!agg_info) {
agg_info->agg_type = agg_type;
agg_info->tc_bitmap[0] = 0;
- /* Initialize the aggregator vsi list head */
+ /* Initialize the aggregator VSI list head */
INIT_LIST_HEAD(&agg_info->agg_vsi_list);
- /* Add new entry in agg list */
+ /* Add new entry in aggregator list */
LIST_ADD(&agg_info->list_entry, &hw->agg_list);
}
- /* Create agg node(s) for requested tc(s) */
+ /* Create aggregator node(s) for requested TC(s) */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
if (!ice_is_tc_ena(*tc_bitmap, tc)) {
- /* Delete agg cfg tc if it exists previously */
+ /* Delete aggregator cfg TC if it exists previously */
status = ice_rm_agg_cfg_tc(pi, agg_info, tc, false);
if (status)
break;
continue;
}
- /* Check if agg node for tc already exists */
+ /* Check if aggregator node for TC already exists */
if (ice_is_tc_ena(agg_info->tc_bitmap[0], tc))
continue;
- /* Create new agg node for tc */
+ /* Create new aggregator node for TC */
status = ice_sched_add_agg_cfg(pi, agg_id, tc);
if (status)
break;
- /* Save agg node's tc information */
+ /* Save aggregator node's TC information */
ice_set_bit(tc, agg_info->tc_bitmap);
}
exit_reg_agg:
}
/**
- * ice_cfg_agg - config agg node
+ * ice_cfg_agg - config aggregator node
* @pi: port information structure
- * @agg_id: aggregator id
- * @agg_type: aggregator type queue, VSI, or agg group
+ * @agg_id: aggregator ID
+ * @agg_type: aggregator type queue, VSI, or aggregator group
* @tc_bitmap: bits TC bitmap
*
* This function configures aggregator node(s).
}
/**
- * ice_get_agg_vsi_info - get the agg id
+ * ice_get_agg_vsi_info - get the aggregator ID
* @agg_info: aggregator info
* @vsi_handle: software VSI handle
*
- * The function returns agg VSI info based on VSI handle. This function needs
- * to be called with scheduler lock held.
+ * The function returns aggregator VSI info based on VSI handle. This function
+ * needs to be called with scheduler lock held.
*/
static struct ice_sched_agg_vsi_info*
ice_get_agg_vsi_info(struct ice_sched_agg_info *agg_info, u16 vsi_handle)
}
/**
- * ice_get_vsi_agg_info - get the agg info of VSI
+ * ice_get_vsi_agg_info - get the aggregator info of VSI
* @hw: pointer to the hardware structure
* @vsi_handle: Sw VSI handle
*
- * The function returns agg info of VSI represented via vsi_handle. The VSI has
- * in this case a different aggregator than the default one. This function
- * needs to be called with scheduler lock held.
+ * The function returns aggregator info of VSI represented via vsi_handle. The
+ * VSI has in this case a different aggregator than the default one. This
+ * function needs to be called with scheduler lock held.
*/
static struct ice_sched_agg_info*
ice_get_vsi_agg_info(struct ice_hw *hw, u16 vsi_handle)
/**
* ice_save_agg_vsi_tc_bitmap - save aggregator VSI TC bitmap
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
* @vsi_handle: software VSI handle
- * @tc_bitmap: TC bitmap of enabled tc(s)
+ * @tc_bitmap: TC bitmap of enabled TC(s)
*
* Save VSI to aggregator TC bitmap. This function needs to call with scheduler
* lock held.
}
/**
- * ice_sched_assoc_vsi_to_agg - associate or move VSI to new or default agg
+ * ice_sched_assoc_vsi_to_agg - associate/move VSI to new/default aggregator
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
* @vsi_handle: software VSI handle
- * @tc_bitmap: TC bitmap of enabled tc(s)
+ * @tc_bitmap: TC bitmap of enabled TC(s)
*
* This function moves VSI to a new or default aggregator node. If VSI is
- * already associated to the agg node then no operation is performed on the
- * tree. This function needs to be called with scheduler lock held.
+ * already associated to the aggregator node then no operation is performed on
+ * the tree. This function needs to be called with scheduler lock held.
*/
static enum ice_status
ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
/* check if entry already exist */
agg_vsi_info = ice_get_agg_vsi_info(agg_info, vsi_handle);
if (!agg_vsi_info) {
- /* Create new entry for vsi under agg list */
+ /* Create new entry for VSI under aggregator list */
agg_vsi_info = (struct ice_sched_agg_vsi_info *)
ice_malloc(hw, sizeof(*agg_vsi_info));
if (!agg_vsi_info)
return ICE_ERR_PARAM;
- /* add vsi id into the agg list */
+ /* add VSI ID into the aggregator list */
agg_vsi_info->vsi_handle = vsi_handle;
LIST_ADD(&agg_vsi_info->list_entry, &agg_info->agg_vsi_list);
}
- /* Move vsi node to new agg node for requested tc(s) */
+ /* Move VSI node to new aggregator node for requested TC(s) */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
if (!ice_is_tc_ena(*tc_bitmap, tc))
continue;
- /* Move VSI to new agg */
+ /* Move VSI to new aggregator */
status = ice_sched_move_vsi_to_agg(pi, vsi_handle, agg_id, tc);
if (status)
break;
else
ice_clear_bit(tc, agg_vsi_info->tc_bitmap);
}
- /* If vsi moved back to default agg then delete entry agg_vsi_info. */
+ /* If VSI moved back to default aggregator, delete agg_vsi_info. */
if (!ice_is_any_bit_set(agg_vsi_info->tc_bitmap,
ICE_MAX_TRAFFIC_CLASS)) {
LIST_DEL(&agg_vsi_info->list_entry);
}
/**
- * ice_move_vsi_to_agg - moves VSI to new or default agg
+ * ice_move_vsi_to_agg - moves VSI to new or default aggregator
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
* @vsi_handle: software VSI handle
- * @tc_bitmap: tc bitmap of enabled tc(s)
+ * @tc_bitmap: TC bitmap of enabled TC(s)
*
* Move or associate VSI to a new or default aggregator node.
*/
}
/**
- * ice_rm_agg_cfg - remove agg configuration
+ * ice_rm_agg_cfg - remove aggregator configuration
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
*
- * This function removes agg reference to vsi and delete agg id info.
- * It removes the agg configuration completely.
+ * This function removes aggregator reference to VSI and delete aggregator ID
+ * info. It removes the aggregator configuration completely.
*/
enum ice_status ice_rm_agg_cfg(struct ice_port_info *pi, u32 agg_id)
{
LIST_DEL(&agg_info->list_entry);
ice_free(pi->hw, agg_info);
- /* Remove unused rl profile ids from HW and SW DB */
+ /* Remove unused RL profile IDs from HW and SW DB */
ice_sched_rm_unused_rl_prof(pi);
exit_ice_rm_agg_cfg:
}
/**
- * ice_set_clear_cir_bw_alloc - set or clear CIR bw alloc information
+ * ice_set_clear_cir_bw_alloc - set or clear CIR BW alloc information
* @bw_t_info: bandwidth type information structure
* @bw_alloc: Bandwidth allocation information
*
- * Save or clear CIR bw alloc information (bw_alloc) in the passed param
+ * Save or clear CIR BW alloc information (bw_alloc) in the passed param
* bw_t_info.
*/
static void
}
/**
- * ice_set_clear_eir_bw_alloc - set or clear EIR bw alloc information
+ * ice_set_clear_eir_bw_alloc - set or clear EIR BW alloc information
* @bw_t_info: bandwidth type information structure
* @bw_alloc: Bandwidth allocation information
*
- * Save or clear EIR bw alloc information (bw_alloc) in the passed param
+ * Save or clear EIR BW alloc information (bw_alloc) in the passed param
* bw_t_info.
*/
static void
}
/**
- * ice_sched_save_vsi_bw_alloc - save VSI node's bw alloc information
+ * ice_sched_save_vsi_bw_alloc - save VSI node's BW alloc information
* @pi: port information structure
* @vsi_handle: sw VSI handle
* @tc: traffic class
* @rl_type: rate limit type min or max
* @bw_alloc: Bandwidth allocation information
*
- * Save bw alloc information of VSI type node for post replay use.
+ * Save BW alloc information of VSI type node for post replay use.
*/
static enum ice_status
ice_sched_save_vsi_bw_alloc(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
}
/**
- * ice_set_clear_cir_bw - set or clear CIR bw
+ * ice_set_clear_cir_bw - set or clear CIR BW
* @bw_t_info: bandwidth type information structure
* @bw: bandwidth in Kbps - Kilo bits per sec
*
- * Save or clear CIR bandwidth (bw) in the passed param bw_t_info.
+ * Save or clear CIR bandwidth (BW) in the passed param bw_t_info.
*/
static void
ice_set_clear_cir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
ice_clear_bit(ICE_BW_TYPE_CIR, bw_t_info->bw_t_bitmap);
bw_t_info->cir_bw.bw = 0;
} else {
- /* Save type of bw information */
+ /* Save type of BW information */
ice_set_bit(ICE_BW_TYPE_CIR, bw_t_info->bw_t_bitmap);
bw_t_info->cir_bw.bw = bw;
}
}
/**
- * ice_set_clear_eir_bw - set or clear EIR bw
+ * ice_set_clear_eir_bw - set or clear EIR BW
* @bw_t_info: bandwidth type information structure
* @bw: bandwidth in Kbps - Kilo bits per sec
*
- * Save or clear EIR bandwidth (bw) in the passed param bw_t_info.
+ * Save or clear EIR bandwidth (BW) in the passed param bw_t_info.
*/
static void
ice_set_clear_eir_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
ice_clear_bit(ICE_BW_TYPE_EIR, bw_t_info->bw_t_bitmap);
bw_t_info->eir_bw.bw = 0;
} else {
- /* EIR bw and Shared bw profiles are mutually exclusive and
+ /* EIR BW and Shared BW profiles are mutually exclusive and
* hence only one of them may be set for any given element.
- * First clear earlier saved shared bw information.
+ * First clear earlier saved shared BW information.
*/
ice_clear_bit(ICE_BW_TYPE_SHARED, bw_t_info->bw_t_bitmap);
bw_t_info->shared_bw = 0;
- /* save EIR bw information */
+ /* save EIR BW information */
ice_set_bit(ICE_BW_TYPE_EIR, bw_t_info->bw_t_bitmap);
bw_t_info->eir_bw.bw = bw;
}
}
/**
- * ice_set_clear_shared_bw - set or clear shared bw
+ * ice_set_clear_shared_bw - set or clear shared BW
* @bw_t_info: bandwidth type information structure
* @bw: bandwidth in Kbps - Kilo bits per sec
*
- * Save or clear shared bandwidth (bw) in the passed param bw_t_info.
+ * Save or clear shared bandwidth (BW) in the passed param bw_t_info.
*/
static void
ice_set_clear_shared_bw(struct ice_bw_type_info *bw_t_info, u32 bw)
ice_clear_bit(ICE_BW_TYPE_SHARED, bw_t_info->bw_t_bitmap);
bw_t_info->shared_bw = 0;
} else {
- /* EIR bw and Shared bw profiles are mutually exclusive and
+ /* EIR BW and Shared BW profiles are mutually exclusive and
* hence only one of them may be set for any given element.
- * First clear earlier saved EIR bw information.
+ * First clear earlier saved EIR BW information.
*/
ice_clear_bit(ICE_BW_TYPE_EIR, bw_t_info->bw_t_bitmap);
bw_t_info->eir_bw.bw = 0;
- /* save shared bw information */
+ /* save shared BW information */
ice_set_bit(ICE_BW_TYPE_SHARED, bw_t_info->bw_t_bitmap);
bw_t_info->shared_bw = bw;
}
}
/**
- * ice_sched_save_vsi_bw - save VSI node's bw information
+ * ice_sched_save_vsi_bw - save VSI node's BW information
* @pi: port information structure
* @vsi_handle: sw VSI handle
* @tc: traffic class
* @rl_type: rate limit type min, max, or shared
* @bw: bandwidth in Kbps - Kilo bits per sec
*
- * Save bw information of VSI type node for post replay use.
+ * Save BW information of VSI type node for post replay use.
*/
static enum ice_status
ice_sched_save_vsi_bw(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
}
/**
- * ice_sched_save_agg_bw_alloc - save agg node's bw alloc information
+ * ice_sched_save_agg_bw_alloc - save aggregator node's BW alloc information
* @pi: port information structure
- * @agg_id: node aggregator id
+ * @agg_id: node aggregator ID
* @tc: traffic class
* @rl_type: rate limit type min or max
* @bw_alloc: bandwidth alloc information
*
- * Save bw alloc information of AGG type node for post replay use.
+ * Save BW alloc information of AGG type node for post replay use.
*/
static enum ice_status
ice_sched_save_agg_bw_alloc(struct ice_port_info *pi, u32 agg_id, u8 tc,
}
/**
- * ice_sched_save_agg_bw - save agg node's bw information
+ * ice_sched_save_agg_bw - save aggregator node's BW information
* @pi: port information structure
- * @agg_id: node aggregator id
+ * @agg_id: node aggregator ID
* @tc: traffic class
* @rl_type: rate limit type min, max, or shared
* @bw: bandwidth in Kbps - Kilo bits per sec
*
- * Save bw information of AGG type node for post replay use.
+ * Save BW information of AGG type node for post replay use.
*/
static enum ice_status
ice_sched_save_agg_bw(struct ice_port_info *pi, u32 agg_id, u8 tc,
}
/**
- * ice_cfg_vsi_bw_lmt_per_tc - configure VSI bw limit per tc
+ * ice_cfg_vsi_bw_lmt_per_tc - configure VSI BW limit per TC
* @pi: port information structure
* @vsi_handle: software VSI handle
* @tc: traffic class
* @rl_type: min or max
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
- * This function configures bw limit of VSI scheduling node based on tc
+ * This function configures BW limit of VSI scheduling node based on TC
* information.
*/
enum ice_status
}
/**
- * ice_cfg_dflt_vsi_bw_lmt_per_tc - configure default VSI bw limit per tc
+ * ice_cfg_dflt_vsi_bw_lmt_per_tc - configure default VSI BW limit per TC
* @pi: port information structure
* @vsi_handle: software VSI handle
* @tc: traffic class
* @rl_type: min or max
*
- * This function configures default bw limit of VSI scheduling node based on tc
+ * This function configures default BW limit of VSI scheduling node based on TC
* information.
*/
enum ice_status
}
/**
- * ice_cfg_agg_bw_lmt_per_tc - configure aggregator bw limit per tc
+ * ice_cfg_agg_bw_lmt_per_tc - configure aggregator BW limit per TC
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
* @tc: traffic class
* @rl_type: min or max
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
- * This function applies bw limit to aggregator scheduling node based on tc
+ * This function applies BW limit to aggregator scheduling node based on TC
* information.
*/
enum ice_status
}
/**
- * ice_cfg_agg_bw_dflt_lmt_per_tc - configure aggregator bw default limit per tc
+ * ice_cfg_agg_bw_dflt_lmt_per_tc - configure aggregator BW default limit per TC
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
* @tc: traffic class
* @rl_type: min or max
*
- * This function applies default bw limit to aggregator scheduling node based
- * on tc information.
+ * This function applies default BW limit to aggregator scheduling node based
+ * on TC information.
*/
enum ice_status
ice_cfg_agg_bw_dflt_lmt_per_tc(struct ice_port_info *pi, u32 agg_id, u8 tc,
}
/**
- * ice_cfg_vsi_bw_shared_lmt - configure VSI bw shared limit
+ * ice_cfg_vsi_bw_shared_lmt - configure VSI BW shared limit
* @pi: port information structure
* @vsi_handle: software VSI handle
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
* This function Configures shared rate limiter(SRL) of all VSI type nodes
* across all traffic classes for VSI matching handle.
}
/**
- * ice_cfg_vsi_bw_no_shared_lmt - configure VSI bw for no shared limiter
+ * ice_cfg_vsi_bw_no_shared_lmt - configure VSI BW for no shared limiter
* @pi: port information structure
* @vsi_handle: software VSI handle
*
}
/**
- * ice_cfg_agg_bw_shared_lmt - configure aggregator bw shared limit
+ * ice_cfg_agg_bw_shared_lmt - configure aggregator BW shared limit
* @pi: port information structure
- * @agg_id: aggregator id
- * @bw: bandwidth in kbps
+ * @agg_id: aggregator ID
+ * @bw: bandwidth in Kbps
*
- * This function configures the shared rate limiter(SRL) of all agg type nodes
- * across all traffic classes for aggregator matching agg_id.
+ * This function configures the shared rate limiter(SRL) of all aggregator type
+ * nodes across all traffic classes for aggregator matching agg_id.
*/
enum ice_status
ice_cfg_agg_bw_shared_lmt(struct ice_port_info *pi, u32 agg_id, u32 bw)
}
/**
- * ice_cfg_agg_bw_no_shared_lmt - configure aggregator bw for no shared limiter
+ * ice_cfg_agg_bw_no_shared_lmt - configure aggregator BW for no shared limiter
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
*
- * This function removes the shared rate limiter(SRL) of all agg type nodes
- * across all traffic classes for aggregator matching agg_id.
+ * This function removes the shared rate limiter(SRL) of all aggregator type
+ * nodes across all traffic classes for aggregator matching agg_id.
*/
enum ice_status
ice_cfg_agg_bw_no_shared_lmt(struct ice_port_info *pi, u32 agg_id)
* ice_config_vsi_queue_priority - config VSI queue priority of node
* @pi: port information structure
* @num_qs: number of VSI queues
- * @q_ids: queue ids array
- * @q_ids: queue ids array
+ * @q_ids: queue IDs array
+ * @q_ids: queue IDs array
* @q_prio: queue priority array
*
* This function configures the queue node priority (Sibling Priority) of the
- * passed in VSI's queue(s) for a given traffic class (tc).
+ * passed in VSI's queue(s) for a given traffic class (TC).
*/
enum ice_status
ice_cfg_vsi_q_priority(struct ice_port_info *pi, u16 num_qs, u32 *q_ids,
}
/**
- * ice_cfg_agg_vsi_priority_per_tc - config agg's VSI priority per tc
+ * ice_cfg_agg_vsi_priority_per_tc - config aggregator's VSI priority per TC
* @pi: port information structure
- * @agg_id: Aggregator id
+ * @agg_id: Aggregator ID
* @num_vsis: number of VSI(s)
* @vsi_handle_arr: array of software VSI handles
* @node_prio: pointer to node priority
* @tc: traffic class
*
* This function configures the node priority (Sibling Priority) of the
- * passed in VSI's for a given traffic class (tc) of an Aggregator id.
+ * passed in VSI's for a given traffic class (TC) of an Aggregator ID.
*/
enum ice_status
ice_cfg_agg_vsi_priority_per_tc(struct ice_port_info *pi, u32 agg_id,
}
/**
- * ice_cfg_vsi_bw_alloc - config VSI bw alloc per tc
+ * ice_cfg_vsi_bw_alloc - config VSI BW alloc per TC
* @pi: port information structure
* @vsi_handle: software VSI handle
- * @ena_tcmap: enabled tc map
+ * @ena_tcmap: enabled TC map
* @rl_type: Rate limit type CIR/EIR
- * @bw_alloc: Array of bw alloc
+ * @bw_alloc: Array of BW alloc
*
- * This function configures the bw allocation of the passed in VSI's
+ * This function configures the BW allocation of the passed in VSI's
* node(s) for enabled traffic class.
*/
enum ice_status
ice_acquire_lock(&pi->sched_lock);
- /* Return success if no nodes are present across tc */
+ /* Return success if no nodes are present across TC */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
struct ice_sched_node *tc_node, *vsi_node;
}
/**
- * ice_cfg_agg_bw_alloc - config agg bw alloc
+ * ice_cfg_agg_bw_alloc - config aggregator BW alloc
* @pi: port information structure
- * @agg_id: aggregator id
- * @ena_tcmap: enabled tc map
+ * @agg_id: aggregator ID
+ * @ena_tcmap: enabled TC map
* @rl_type: rate limit type CIR/EIR
- * @bw_alloc: array of bw alloc
+ * @bw_alloc: array of BW alloc
*
- * This function configures the bw allocation of passed in aggregator for
+ * This function configures the BW allocation of passed in aggregator for
* enabled traffic class(s).
*/
enum ice_status
goto exit_cfg_agg_bw_alloc;
}
- /* Return success if no nodes are present across tc */
+ /* Return success if no nodes are present across TC */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
struct ice_sched_node *tc_node, *agg_node;
}
/**
- * ice_sched_calc_wakeup - calculate rl profile wakeup parameter
- * @bw: bandwidth in kbps
+ * ice_sched_calc_wakeup - calculate RL profile wakeup parameter
+ * @bw: bandwidth in Kbps
*
- * This function calculates the wakeup parameter of rl profile.
+ * This function calculates the wakeup parameter of RL profile.
*/
static u16 ice_sched_calc_wakeup(s32 bw)
{
}
/**
- * ice_sched_bw_to_rl_profile - convert bw to profile parameters
- * @bw: bandwidth in kbps
+ * ice_sched_bw_to_rl_profile - convert BW to profile parameters
+ * @bw: bandwidth in Kbps
* @profile: profile parameters to return
*
- * This function converts the bw to profile structure format.
+ * This function converts the BW to profile structure format.
*/
static enum ice_status
ice_sched_bw_to_rl_profile(u32 bw, struct ice_aqc_rl_profile_elem *profile)
if (bw < ICE_SCHED_MIN_BW || bw > ICE_SCHED_MAX_BW)
return status;
- /* Bytes per second from kbps */
+ /* Bytes per second from Kbps */
bytes_per_sec = DIV_64BIT(((s64)bw * 1000), BITS_PER_BYTE);
/* encode is 6 bits but really useful are 5 bits */
}
/**
- * ice_sched_add_rl_profile - add rl profile
+ * ice_sched_add_rl_profile - add RL profile
* @pi: port information structure
- * @rl_type: type of rate limit bw - min, max, or shared
+ * @rl_type: type of rate limit BW - min, max, or shared
* @bw: bandwidth in Kbps - Kilo bits per sec
* @layer_num: specifies in which layer to create profile
*
- * This function first checks the existing list for corresponding bw
+ * This function first checks the existing list for corresponding BW
* parameter. If it exists, it returns the associated profile otherwise
- * it creates a new rate limit profile for requested bw, and adds it to
- * the hw db and local list. It returns the new profile or null on error.
+ * it creates a new rate limit profile for requested BW, and adds it to
+ * the HW DB and local list. It returns the new profile or null on error.
* The caller needs to hold the scheduler lock.
*/
static struct ice_aqc_rl_profile_info *
ice_aqc_rl_profile_info, list_entry)
if (rl_prof_elem->profile.flags == profile_type &&
rl_prof_elem->bw == bw)
- /* Return existing profile id info */
+ /* Return existing profile ID info */
return rl_prof_elem;
- /* Create new profile id */
+ /* Create new profile ID */
rl_prof_elem = (struct ice_aqc_rl_profile_info *)
ice_malloc(hw, sizeof(*rl_prof_elem));
rl_prof_elem->profile.flags = profile_type;
rl_prof_elem->profile.max_burst_size = CPU_TO_LE16(hw->max_burst_size);
- /* Create new entry in hw db */
+ /* Create new entry in HW DB */
buf = (struct ice_aqc_rl_profile_generic_elem *)
&rl_prof_elem->profile;
status = ice_aq_add_rl_profile(hw, num_profiles, buf, sizeof(*buf),
/**
* ice_sched_cfg_node_bw_lmt - configure node sched params
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @node: sched node to configure
- * @rl_type: rate limit type cir, eir, or shared
- * @rl_prof_id: rate limit profile id
+ * @rl_type: rate limit type CIR, EIR, or shared
+ * @rl_prof_id: rate limit profile ID
*
- * This function configures node element's bw limit.
+ * This function configures node element's BW limit.
*/
static enum ice_status
ice_sched_cfg_node_bw_lmt(struct ice_hw *hw, struct ice_sched_node *node,
data->cir_bw.bw_profile_idx = CPU_TO_LE16(rl_prof_id);
break;
case ICE_MAX_BW:
- /* EIR bw and Shared bw profiles are mutually exclusive and
+ /* EIR BW and Shared BW profiles are mutually exclusive and
* hence only one of them may be set for any given element
*/
if (data->valid_sections & ICE_AQC_ELEM_VALID_SHARED)
data->eir_bw.bw_profile_idx = CPU_TO_LE16(rl_prof_id);
break;
case ICE_SHARED_BW:
- /* Check for removing shared bw */
+ /* Check for removing shared BW */
if (rl_prof_id == ICE_SCHED_NO_SHARED_RL_PROF_ID) {
/* remove shared profile */
data->valid_sections &= ~ICE_AQC_ELEM_VALID_SHARED;
- data->srl_id = 0; /* clear srl field */
+ data->srl_id = 0; /* clear SRL field */
/* enable back EIR to default profile */
data->valid_sections |= ICE_AQC_ELEM_VALID_EIR;
CPU_TO_LE16(ICE_SCHED_DFLT_RL_PROF_ID);
break;
}
- /* EIR bw and Shared bw profiles are mutually exclusive and
+ /* EIR BW and Shared BW profiles are mutually exclusive and
* hence only one of them may be set for any given element
*/
if ((data->valid_sections & ICE_AQC_ELEM_VALID_EIR) &&
(LE16_TO_CPU(data->eir_bw.bw_profile_idx) !=
ICE_SCHED_DFLT_RL_PROF_ID))
return ICE_ERR_CFG;
- /* EIR bw is set to default, disable it */
+ /* EIR BW is set to default, disable it */
data->valid_sections &= ~ICE_AQC_ELEM_VALID_EIR;
- /* Okay to enable shared bw now */
+ /* Okay to enable shared BW now */
data->valid_sections |= ICE_AQC_ELEM_VALID_SHARED;
data->srl_id = CPU_TO_LE16(rl_prof_id);
break;
}
/**
- * ice_sched_get_node_rl_prof_id - get node's rate limit profile id
+ * ice_sched_get_node_rl_prof_id - get node's rate limit profile ID
* @node: sched node
* @rl_type: rate limit type
*
* If existing profile matches, it returns the corresponding rate
- * limit profile id, otherwise it returns an invalid id as error.
+ * limit profile ID, otherwise it returns an invalid ID as error.
*/
static u16
ice_sched_get_node_rl_prof_id(struct ice_sched_node *node,
/**
* ice_sched_get_rl_prof_layer - selects rate limit profile creation layer
* @pi: port information structure
- * @rl_type: type of rate limit bw - min, max, or shared
+ * @rl_type: type of rate limit BW - min, max, or shared
* @layer_index: layer index
*
* This function returns requested profile creation layer.
}
/**
- * ice_sched_rm_rl_profile - remove rl profile id
+ * ice_sched_rm_rl_profile - remove RL profile ID
* @pi: port information structure
* @layer_num: layer number where profiles are saved
* @profile_type: profile type like EIR, CIR, or SRL
- * @profile_id: profile id to remove
+ * @profile_id: profile ID to remove
*
* This function removes rate limit profile from layer 'layer_num' of type
- * 'profile_type' and profile id as 'profile_id'. The caller needs to hold
+ * 'profile_type' and profile ID as 'profile_id'. The caller needs to hold
* scheduler lock.
*/
static enum ice_status
struct ice_aqc_rl_profile_info *rl_prof_elem;
enum ice_status status = ICE_SUCCESS;
- /* Check the existing list for rl profile */
+ /* Check the existing list for RL profile */
LIST_FOR_EACH_ENTRY(rl_prof_elem, &pi->rl_prof_list[layer_num],
ice_aqc_rl_profile_info, list_entry)
if (rl_prof_elem->profile.flags == profile_type &&
if (rl_prof_elem->prof_id_ref)
rl_prof_elem->prof_id_ref--;
- /* Remove old profile id from database */
+ /* Remove old profile ID from database */
status = ice_sched_del_rl_profile(pi->hw, rl_prof_elem);
if (status && status != ICE_ERR_IN_USE)
ice_debug(pi->hw, ICE_DBG_SCHED,
* @pi: port information structure
* @node: pointer to node structure
* @rl_type: rate limit type min, max, or shared
- * @layer_num: layer number where rl profiles are saved
+ * @layer_num: layer number where RL profiles are saved
*
- * This function configures node element's bw rate limit profile id of
- * type cir, eir, or srl to default. This function needs to be called
+ * This function configures node element's BW rate limit profile ID of
+ * type CIR, EIR, or SRL to default. This function needs to be called
* with the scheduler lock held.
*/
static enum ice_status
default:
return ICE_ERR_PARAM;
}
- /* Save existing rl prof id for later clean up */
+ /* Save existing RL prof ID for later clean up */
old_id = ice_sched_get_node_rl_prof_id(node, rl_type);
- /* Configure bw scheduling parameters */
+ /* Configure BW scheduling parameters */
status = ice_sched_cfg_node_bw_lmt(hw, node, rl_type, rl_prof_id);
if (status)
return status;
- /* Remove stale rl profile id */
+ /* Remove stale RL profile ID */
if (old_id == ICE_SCHED_DFLT_RL_PROF_ID ||
old_id == ICE_SCHED_INVAL_PROF_ID)
- return status;
+ return ICE_SUCCESS;
+
return ice_sched_rm_rl_profile(pi, layer_num, profile_type, old_id);
}
* @bw: bandwidth value
*
* This function prepares node element's bandwidth to SRL or EIR exclusively.
- * EIR bw and Shared bw profiles are mutually exclusive and hence only one of
+ * EIR BW and Shared BW profiles are mutually exclusive and hence only one of
* them may be set for any given element. This function needs to be called
* with the scheduler lock held.
*/
layer_num);
} else if (rl_type == ICE_MAX_BW &&
node->info.data.valid_sections & ICE_AQC_ELEM_VALID_SHARED) {
- /* Remove Shared profile. Set default shared bw call
+ /* Remove Shared profile. Set default shared BW call
* removes shared profile for a node.
*/
return ice_sched_set_node_bw_dflt(pi, node,
* @bw: bandwidth in Kbps - Kilo bits per sec
* @layer_num: layer number
*
- * This function adds new profile corresponding to requested bw, configures
- * node's rl profile id of type cir, eir, or srl, and removes old profile
- * id from local database. The caller needs to hold scheduler lock.
+ * This function adds new profile corresponding to requested BW, configures
+ * node's RL profile ID of type CIR, EIR, or SRL, and removes old profile
+ * ID from local database. The caller needs to hold scheduler lock.
*/
static enum ice_status
ice_sched_set_node_bw(struct ice_port_info *pi, struct ice_sched_node *node,
rl_prof_id = LE16_TO_CPU(rl_prof_info->profile.profile_id);
- /* Save existing rl prof id for later clean up */
+ /* Save existing RL prof ID for later clean up */
old_id = ice_sched_get_node_rl_prof_id(node, rl_type);
- /* Configure bw scheduling parameters */
+ /* Configure BW scheduling parameters */
status = ice_sched_cfg_node_bw_lmt(hw, node, rl_type, rl_prof_id);
if (status)
return status;
/* New changes has been applied */
- /* Increment the profile id reference count */
+ /* Increment the profile ID reference count */
rl_prof_info->prof_id_ref++;
- /* Check for old id removal */
+ /* Check for old ID removal */
if ((old_id == ICE_SCHED_DFLT_RL_PROF_ID && rl_type != ICE_SHARED_BW) ||
old_id == ICE_SCHED_INVAL_PROF_ID || old_id == rl_prof_id)
- return status;
+ return ICE_SUCCESS;
return ice_sched_rm_rl_profile(pi, layer_num,
rl_prof_info->profile.flags,
}
/**
- * ice_sched_set_node_bw_lmt - set node's bw limit
+ * ice_sched_set_node_bw_lmt - set node's BW limit
* @pi: port information structure
* @node: tree node
* @rl_type: rate limit type min, max, or shared
* @bw: bandwidth in Kbps - Kilo bits per sec
*
- * It updates node's bw limit parameters like bw rl profile id of type cir,
- * eir, or srl. The caller needs to hold scheduler lock.
+ * It updates node's BW limit parameters like BW RL profile ID of type CIR,
+ * EIR, or SRL. The caller needs to hold scheduler lock.
*/
enum ice_status
ice_sched_set_node_bw_lmt(struct ice_port_info *pi, struct ice_sched_node *node,
if (!pi)
return ICE_ERR_PARAM;
hw = pi->hw;
- /* Remove unused rl profile ids from HW and SW DB */
+ /* Remove unused RL profile IDs from HW and SW DB */
ice_sched_rm_unused_rl_prof(pi);
layer_num = ice_sched_get_rl_prof_layer(pi, rl_type,
node->tx_sched_layer);
if (!cfg_node)
return ICE_ERR_CFG;
}
- /* EIR bw and Shared bw profiles are mutually exclusive and
+ /* EIR BW and Shared BW profiles are mutually exclusive and
* hence only one of them may be set for any given element
*/
status = ice_sched_set_eir_srl_excl(pi, cfg_node, layer_num, rl_type,
}
/**
- * ice_sched_set_node_bw_dflt_lmt - set node's bw limit to default
+ * ice_sched_set_node_bw_dflt_lmt - set node's BW limit to default
* @pi: port information structure
* @node: pointer to node structure
* @rl_type: rate limit type min, max, or shared
*
- * This function configures node element's bw rate limit profile id of
- * type cir, eir, or srl to default. This function needs to be called
+ * This function configures node element's BW rate limit profile ID of
+ * type CIR, EIR, or SRL to default. This function needs to be called
* with the scheduler lock held.
*/
static enum ice_status
}
/**
- * ice_sched_set_q_bw_lmt - sets queue bw limit
+ * ice_sched_set_q_bw_lmt - sets queue BW limit
* @pi: port information structure
- * @q_id: queue id (leaf node teid)
+ * @q_id: queue ID (leaf node TEID)
* @rl_type: min, max, or shared
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
- * This function sets bw limit of queue scheduling node.
+ * This function sets BW limit of queue scheduling node.
*/
static enum ice_status
ice_sched_set_q_bw_lmt(struct ice_port_info *pi, u32 q_id,
}
/**
- * ice_cfg_q_bw_lmt - configure queue bw limit
+ * ice_cfg_q_bw_lmt - configure queue BW limit
* @pi: port information structure
- * @q_id: queue id (leaf node teid)
+ * @q_id: queue ID (leaf node TEID)
* @rl_type: min, max, or shared
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
- * This function configures bw limit of queue scheduling node.
+ * This function configures BW limit of queue scheduling node.
*/
enum ice_status
ice_cfg_q_bw_lmt(struct ice_port_info *pi, u32 q_id, enum ice_rl_type rl_type,
}
/**
- * ice_cfg_q_bw_dflt_lmt - configure queue bw default limit
+ * ice_cfg_q_bw_dflt_lmt - configure queue BW default limit
* @pi: port information structure
- * @q_id: queue id (leaf node teid)
+ * @q_id: queue ID (leaf node TEID)
* @rl_type: min, max, or shared
*
- * This function configures bw default limit of queue scheduling node.
+ * This function configures BW default limit of queue scheduling node.
*/
enum ice_status
ice_cfg_q_bw_dflt_lmt(struct ice_port_info *pi, u32 q_id,
}
/**
- * ice_sched_save_tc_node_bw - save tc node bw limit
+ * ice_sched_save_tc_node_bw - save TC node BW limit
* @pi: port information structure
- * @tc: tc number
+ * @tc: TC number
* @rl_type: min or max
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
* This function saves the modified values of bandwidth settings for later
* replay purpose (restore) after reset.
}
/**
- * ice_sched_set_tc_node_bw_lmt - sets tc node bw limit
+ * ice_sched_set_tc_node_bw_lmt - sets TC node BW limit
* @pi: port information structure
- * @tc: tc number
+ * @tc: TC number
* @rl_type: min or max
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
- * This function configures bandwidth limit of tc node.
+ * This function configures bandwidth limit of TC node.
*/
static enum ice_status
ice_sched_set_tc_node_bw_lmt(struct ice_port_info *pi, u8 tc,
}
/**
- * ice_cfg_tc_node_bw_lmt - configure tc node bw limit
+ * ice_cfg_tc_node_bw_lmt - configure TC node BW limit
* @pi: port information structure
- * @tc: tc number
+ * @tc: TC number
* @rl_type: min or max
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
- * This function configures bw limit of tc node.
+ * This function configures BW limit of TC node.
* Note: The minimum guaranteed reservation is done via DCBX.
*/
enum ice_status
}
/**
- * ice_cfg_tc_node_bw_dflt_lmt - configure tc node bw default limit
+ * ice_cfg_tc_node_bw_dflt_lmt - configure TC node BW default limit
* @pi: port information structure
- * @tc: tc number
+ * @tc: TC number
* @rl_type: min or max
*
- * This function configures bw default limit of tc node.
+ * This function configures BW default limit of TC node.
*/
enum ice_status
ice_cfg_tc_node_bw_dflt_lmt(struct ice_port_info *pi, u8 tc,
}
/**
- * ice_sched_save_tc_node_bw_alloc - save tc node's bw alloc information
+ * ice_sched_save_tc_node_bw_alloc - save TC node's BW alloc information
* @pi: port information structure
* @tc: traffic class
* @rl_type: rate limit type min or max
* @bw_alloc: Bandwidth allocation information
*
- * Save bw alloc information of VSI type node for post replay use.
+ * Save BW alloc information of VSI type node for post replay use.
*/
static enum ice_status
ice_sched_save_tc_node_bw_alloc(struct ice_port_info *pi, u8 tc,
}
/**
- * ice_sched_set_tc_node_bw_alloc - set tc node bw alloc
+ * ice_sched_set_tc_node_bw_alloc - set TC node BW alloc
* @pi: port information structure
- * @tc: tc number
+ * @tc: TC number
* @rl_type: min or max
* @bw_alloc: bandwidth alloc
*
- * This function configures bandwidth alloc of tc node, also saves the
+ * This function configures bandwidth alloc of TC node, also saves the
* changed settings for replay purpose, and return success if it succeeds
* in modifying bandwidth alloc setting.
*/
}
/**
- * ice_cfg_tc_node_bw_alloc - configure tc node bw alloc
+ * ice_cfg_tc_node_bw_alloc - configure TC node BW alloc
* @pi: port information structure
- * @tc: tc number
+ * @tc: TC number
* @rl_type: min or max
* @bw_alloc: bandwidth alloc
*
- * This function configures bw limit of tc node.
+ * This function configures BW limit of TC node.
* Note: The minimum guaranteed reservation is done via DCBX.
*/
enum ice_status
}
/**
- * ice_sched_set_agg_bw_dflt_lmt - set agg node's bw limit to default
+ * ice_sched_set_agg_bw_dflt_lmt - set aggregator node's BW limit to default
* @pi: port information structure
* @vsi_handle: software VSI handle
*
- * This function retrieves the aggregator id based on VSI id and tc,
- * and sets node's bw limit to default. This function needs to be
+ * This function retrieves the aggregator ID based on VSI ID and TC,
+ * and sets node's BW limit to default. This function needs to be
* called with the scheduler lock held.
*/
enum ice_status
}
/**
- * ice_sched_get_node_by_id_type - get node from id type
+ * ice_sched_get_node_by_id_type - get node from ID type
* @pi: port information structure
* @id: identifier
* @agg_type: type of aggregator
* @tc: traffic class
*
- * This function returns node identified by id of type aggregator, and
- * based on traffic class (tc). This function needs to be called with
+ * This function returns node identified by ID of type aggregator, and
+ * based on traffic class (TC). This function needs to be called with
* the scheduler lock held.
*/
static struct ice_sched_node *
}
/**
- * ice_sched_set_node_bw_lmt_per_tc - set node bw limit per tc
+ * ice_sched_set_node_bw_lmt_per_tc - set node BW limit per TC
* @pi: port information structure
- * @id: id (software VSI handle or AGG id)
+ * @id: ID (software VSI handle or AGG ID)
* @agg_type: aggregator type (VSI or AGG type node)
* @tc: traffic class
* @rl_type: min or max
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
- * This function sets bw limit of VSI or Aggregator scheduling node
- * based on tc information from passed in argument bw.
+ * This function sets BW limit of VSI or Aggregator scheduling node
+ * based on TC information from passed in argument BW.
*/
enum ice_status
ice_sched_set_node_bw_lmt_per_tc(struct ice_port_info *pi, u32 id,
* @vsi_handle: software VSI handle
*
* This function validates SRL node of the VSI node if available SRL layer is
- * different than the VSI node layer on all tc(s).This function needs to be
+ * different than the VSI node layer on all TC(s).This function needs to be
* called with scheduler lock held.
*/
static enum ice_status
if (!ice_is_vsi_valid(pi->hw, vsi_handle))
return ICE_ERR_PARAM;
- /* Return success if no nodes are present across tc */
+ /* Return success if no nodes are present across TC */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
struct ice_sched_node *tc_node, *vsi_node;
enum ice_rl_type rl_type = ICE_SHARED_BW;
}
/**
- * ice_sched_set_vsi_bw_shared_lmt - set VSI bw shared limit
+ * ice_sched_set_vsi_bw_shared_lmt - set VSI BW shared limit
* @pi: port information structure
* @vsi_handle: software VSI handle
- * @bw: bandwidth in kbps
+ * @bw: bandwidth in Kbps
*
* This function Configures shared rate limiter(SRL) of all VSI type nodes
- * across all traffic classes for VSI matching handle. When bw value of
+ * across all traffic classes for VSI matching handle. When BW value of
* ICE_SCHED_DFLT_BW is passed, it removes the SRL from the node.
*/
enum ice_status
status = ice_sched_validate_vsi_srl_node(pi, vsi_handle);
if (status)
goto exit_set_vsi_bw_shared_lmt;
- /* Return success if no nodes are present across tc */
+ /* Return success if no nodes are present across TC */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
struct ice_sched_node *tc_node, *vsi_node;
enum ice_rl_type rl_type = ICE_SHARED_BW;
/**
* ice_sched_validate_agg_srl_node - validate AGG SRL node
* @pi: port information structure
- * @agg_id: aggregator id
+ * @agg_id: aggregator ID
*
* This function validates SRL node of the AGG node if available SRL layer is
- * different than the AGG node layer on all tc(s).This function needs to be
+ * different than the AGG node layer on all TC(s).This function needs to be
* called with scheduler lock held.
*/
static enum ice_status
}
if (!agg_id_present)
return ICE_ERR_PARAM;
- /* Return success if no nodes are present across tc */
+ /* Return success if no nodes are present across TC */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
struct ice_sched_node *tc_node, *agg_node;
enum ice_rl_type rl_type = ICE_SHARED_BW;
}
/**
- * ice_sched_set_agg_bw_shared_lmt - set aggregator bw shared limit
+ * ice_sched_set_agg_bw_shared_lmt - set aggregator BW shared limit
* @pi: port information structure
- * @agg_id: aggregator id
- * @bw: bandwidth in kbps
+ * @agg_id: aggregator ID
+ * @bw: bandwidth in Kbps
*
- * This function configures the shared rate limiter(SRL) of all agg type
+ * This function configures the shared rate limiter(SRL) of all aggregator type
* nodes across all traffic classes for aggregator matching agg_id. When
- * bw value of ICE_SCHED_DFLT_BW is passed, it removes SRL from the
+ * BW value of ICE_SCHED_DFLT_BW is passed, it removes SRL from the
* node(s).
*/
enum ice_status
goto exit_agg_bw_shared_lmt;
}
- /* Return success if no nodes are present across tc */
+ /* Return success if no nodes are present across TC */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++) {
enum ice_rl_type rl_type = ICE_SHARED_BW;
struct ice_sched_node *tc_node, *agg_node;
/**
* ice_cfg_rl_burst_size - Set burst size value
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @bytes: burst size in bytes
*
* This function configures/set the burst size to requested new value. The new
burst_size_to_prog = ICE_BYTE_GRANULARITY;
/* round number to nearest 256 granularity */
bytes = ice_round_to_num(bytes, 256);
- /* check rounding doesn't go beyound allowed */
+ /* check rounding doesn't go beyond allowed */
if (bytes > ICE_MAX_BURST_SIZE_BYTE_GRANULARITY)
bytes = ICE_MAX_BURST_SIZE_BYTE_GRANULARITY;
burst_size_to_prog |= (u16)bytes;
burst_size_to_prog = ICE_KBYTE_GRANULARITY;
/* round number to nearest 1024 granularity */
bytes = ice_round_to_num(bytes, 1024);
- /* check rounding doesn't go beyound allowed */
+ /* check rounding doesn't go beyond allowed */
if (bytes > ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY)
bytes = ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY;
/* The value is in k bytes */
/*
* ice_sched_replay_node_prio - re-configure node priority
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @node: sched node to configure
* @priority: priority value
*
}
/**
- * ice_sched_replay_node_bw - replay node(s) bw
- * @hw: pointer to the hw struct
+ * ice_sched_replay_node_bw - replay node(s) BW
+ * @hw: pointer to the HW struct
* @node: sched node to configure
- * @bw_t_info: bw type information
+ * @bw_t_info: BW type information
*
- * This function restores node's bw from bw_t_info. The caller needs
+ * This function restores node's BW from bw_t_info. The caller needs
* to hold the scheduler lock.
*/
static enum ice_status
}
/**
- * ice_sched_replay_agg_bw - replay aggregator node(s) bw
- * @hw: pointer to the hw struct
+ * ice_sched_replay_agg_bw - replay aggregator node(s) BW
+ * @hw: pointer to the HW struct
* @agg_info: aggregator data structure
*
* This function re-creates aggregator type nodes. The caller needs to hold
{
u8 tc;
- /* Some tc(s) may be missing after reset, adjust for replay */
+ /* Some TC(s) may be missing after reset, adjust for replay */
for (tc = 0; tc < ICE_MAX_TRAFFIC_CLASS; tc++)
if (ice_is_tc_ena(*tc_bitmap, tc) &&
(ice_sched_get_tc_node(pi, tc)))
/**
* ice_sched_replay_agg - recreate aggregator node(s)
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* This function recreate aggregator type nodes which are not replayed earlier.
- * It also replay aggregator bw information. These aggregator nodes are not
+ * It also replay aggregator BW information. These aggregator nodes are not
* associated with VSI type node yet.
*/
void ice_sched_replay_agg(struct ice_hw *hw)
ice_acquire_lock(&pi->sched_lock);
LIST_FOR_EACH_ENTRY(agg_info, &hw->agg_list, ice_sched_agg_info,
list_entry) {
- /* replay agg (re-create aggregator node) */
+ /* replay aggregator (re-create aggregator node) */
if (!ice_cmp_bitmap(agg_info->tc_bitmap,
agg_info->replay_tc_bitmap,
ICE_MAX_TRAFFIC_CLASS)) {
/* Move on to next one */
continue;
}
- /* Replay agg node bw (restore agg bw) */
+ /* Replay aggregator node BW (restore aggregator BW) */
status = ice_sched_replay_agg_bw(hw, agg_info);
if (status)
ice_info(hw, "Replay agg bw [id=%d] failed\n",
/**
* ice_sched_replay_agg_vsi_preinit - Agg/VSI replay pre initialization
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
*
* This function initialize aggregator(s) TC bitmap to zero. A required
* preinit step for replaying aggregators.
}
/**
- * ice_sched_replay_tc_node_bw - replay tc node(s) bw
- * @hw: pointer to the hw struct
+ * ice_sched_replay_tc_node_bw - replay TC node(s) BW
+ * @hw: pointer to the HW struct
*
- * This function replay tc nodes. The caller needs to hold the scheduler lock.
+ * This function replay TC nodes. The caller needs to hold the scheduler lock.
*/
enum ice_status
ice_sched_replay_tc_node_bw(struct ice_hw *hw)
tc_node = ice_sched_get_tc_node(hw->port_info, tc);
if (!tc_node)
- continue; /* tc not present */
+ continue; /* TC not present */
status = ice_sched_replay_node_bw(hw, tc_node,
&hw->tc_node_bw_t_info[tc]);
if (status)
}
/**
- * ice_sched_replay_vsi_bw - replay VSI type node(s) bw
- * @hw: pointer to the hw struct
+ * ice_sched_replay_vsi_bw - replay VSI type node(s) BW
+ * @hw: pointer to the HW struct
* @vsi_handle: software VSI handle
* @tc_bitmap: 8 bits TC bitmap
*
}
/**
- * ice_sched_replay_vsi_agg - replay agg & VSI to aggregator node(s)
- * @hw: pointer to the hw struct
+ * ice_sched_replay_vsi_agg - replay aggregator & VSI to aggregator node(s)
+ * @hw: pointer to the HW struct
* @vsi_handle: software VSI handle
*
* This function replays aggregator node, VSI to aggregator type nodes, and
return ICE_SUCCESS; /* Not present in list - default Agg case */
ice_sched_get_ena_tc_bitmap(pi, agg_info->replay_tc_bitmap,
replay_bitmap);
- /* Replay agg node associated to vsi_handle */
+ /* Replay aggregator node associated to vsi_handle */
status = ice_sched_cfg_agg(hw->port_info, agg_info->agg_id,
ICE_AGG_TYPE_AGG, replay_bitmap);
if (status)
return status;
- /* Replay agg node bw (restore agg bw) */
+ /* Replay aggregator node BW (restore aggregator BW) */
status = ice_sched_replay_agg_bw(hw, agg_info);
if (status)
return status;
replay_bitmap);
if (status)
return status;
- /* Replay VSI bw (restore VSI bw) */
+ /* Replay VSI BW (restore VSI BW) */
return ice_sched_replay_vsi_bw(hw, vsi_handle,
agg_vsi_info->tc_bitmap);
}
/**
* ice_replay_vsi_agg - replay VSI to aggregator node
- * @hw: pointer to the hw struct
+ * @hw: pointer to the HW struct
* @vsi_handle: software VSI handle
*
* This function replays association of VSI to aggregator type nodes, and
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);
};
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);
};
* 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
*/
/**
* 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.
/**
* 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
*
/**
* 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
/**
* 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
*
/**
* 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
}
/**
- * 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)
/**
* 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
/**
* 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
*
/**
* 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
/**
* 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)
{
/**
* 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
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) {
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
/**
* 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
/**
* 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
*
/**
* 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
* 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
}
/**
- * 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)
* @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
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;
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
*/
* @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,
* @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,
/**
* 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
* @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)
/**
* 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
*/
* 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
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;
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);
* @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
/**
* 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
/**
* 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
* 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
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;
}
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;
((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) {
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;
}
}
} 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;
/* 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];
* @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
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;
/**
* 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
/**
* 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.
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);
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)
/**
* 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.
*/
/**
* 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.
*/
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,
/* 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;
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;
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;
/* 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);
* 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
};
/* 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,
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;
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) */
/* 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 */
};
*
* (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)
* 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,
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];
};
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;
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 */
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;
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 */