#define ICE_ACL_TBL_TCAM_ENTRY_IDX(e) ((e) % ICE_AQC_ACL_TCAM_DEPTH)
#define ICE_ACL_SCEN_ENTRY_INVAL 0xFFFF
+
/**
* ice_acl_init_entry
* @scen: pointer to the scenario struct
*/
static void ice_acl_init_entry(struct ice_acl_scen *scen)
{
- /**
- * low priority: start from the highest index, 25% of total entries
+ /* low priority: start from the highest index, 25% of total entries
* normal priority: start from the highest index, 50% of total entries
* high priority: start from the lowest index, 25% of total entries
*/
* Returns ICE_ACL_SCEN_ENTRY_INVAL if fails
* Returns index on success
*/
-static u16 ice_acl_scen_assign_entry_idx(struct ice_acl_scen *scen,
- enum ice_acl_entry_prior prior)
+static u16
+ice_acl_scen_assign_entry_idx(struct ice_acl_scen *scen,
+ enum ice_acl_entry_prior prior)
{
u16 first_idx, last_idx, i;
s8 step;
/**
* ice_acl_assign_act_mems_to_tcam
- * @tbl: pointer to acl table structure
+ * @tbl: pointer to ACL table structure
* @cur_tcam: Index of current TCAM. Value = 0 to (ICE_AQC_ACL_SLICES - 1)
* @cur_mem_idx: Index of current action memory bank. Value = 0 to
* (ICE_AQC_MAX_ACTION_MEMORIES - 1)
/**
* ice_acl_divide_act_mems_to_tcams
- * @tbl: pointer to acl table structure
+ * @tbl: pointer to ACL table structure
*
* Figure out how to divide given action memory banks to given TCAMs. This
* division is for SW book keeping. In the time when scenario is created,
CPU_TO_LE16(params->dep_tbls[i]);
}
- /* call the aq command to create the ACL table with these values */
+ /* call the AQ command to create the ACL table with these values */
status = ice_aq_alloc_acl_tbl(hw, &tbl_alloc, NULL);
if (status) {
/**
* ice_acl_assign_act_mem_for_scen
- * @tbl: pointer to acl table structure
+ * @tbl: pointer to ACL table structure
* @scen: pointer to the scenario struct
* @scen_buf: pointer to the available space for the scenario
* @current_tcam_idx: theoretical index of the TCAM that we associated those
}
}
- /* call the aq command to destroy the ACL table */
+ /* call the AQ command to destroy the ACL table */
status = ice_aq_dealloc_acl_tbl(hw, hw->acl_tbl->id, &resp_buf, NULL);
if (status) {
enum ice_acl_entry_prior prior, u8 *keys, u8 *inverts,
struct ice_acl_act_entry *acts, u8 acts_cnt, u16 *entry_idx)
{
- u8 i, entry_tcam, num_cscd, idx, offset;
+ u8 i, entry_tcam, num_cscd, offset;
struct ice_aqc_acl_data buf;
enum ice_status status = ICE_SUCCESS;
+ u16 idx;
if (!scen)
return ICE_ERR_DOES_NOT_EXIST;
NULL);
if (status)
ice_debug(hw, ICE_DBG_ACL,
- "aq program acl entry failed status: %d\n",
+ "AQ program ACL entry failed status: %d\n",
status);
}
}
}
- /* Call the aq command to destroy the targeted scenario */
+ /* Call the AQ command to destroy the targeted scenario */
status = ice_aq_dealloc_acl_scen(hw, scen_id, NULL);
if (status) {