src/dpdk/drivers/net/ice/base/ice_acl_ctrl.c
static void
ice_acl_set_scen_chnk_msk(struct ice_aqc_acl_scen *scen_buf,
			  struct ice_acl_scen *scen)
{
	u16 tcam_idx, num_cscd, units, cnt;
	u8 chnk_offst;

	/* Determine the starting TCAM index and offset of the start entry */
	tcam_idx = ICE_ACL_TBL_TCAM_IDX(scen->start);
	chnk_offst = (u8)((scen->start % ICE_AQC_ACL_TCAM_DEPTH) /
			  ICE_ACL_ENTRY_ALLOC_UNIT);

	/* Entries are allocated and tracked in multiple of 64's */
	units = scen->num_entry / ICE_ACL_ENTRY_ALLOC_UNIT;

	/* Determine number of cascaded TCAMs */
	num_cscd = scen->width / ICE_AQC_ACL_KEY_WIDTH_BYTES;

	for (cnt = 0; cnt < units; cnt++) {
		u16 i;

		/* Set the corresponding bitmap of individual 64-entry
		 * chunk spans across a cascade of 1 or more TCAMs
		 * For each TCAM, there will be (ICE_AQC_ACL_TCAM_DEPTH
		 * / ICE_ACL_ENTRY_ALLOC_UNIT) or 8 chunks.
		 */
		for (i = tcam_idx; i < tcam_idx + num_cscd; i++)
			scen_buf->tcam_cfg[i].chnk_msk |= BIT(chnk_offst);

		chnk_offst = (chnk_offst + 1) % ICE_AQC_MAX_TCAM_ALLOC_UNITS;
		if (!chnk_offst)
			tcam_idx += num_cscd;
	}
}
/**
 * ice_acl_set_scen_chnk_msk
 * @scen_buf: Pointer to the scenario buffer that needs to be populated
 * @scen: pointer to the available space for the scenario
 *
 * Set the chunk mask for the entries that will be used by this scenario
 */
ice_acl_set_scen_chnk_msk
@scen_buf: Pointer to the scenario buffer that needs to be populated
@scen: pointer to the available space for the scenario

Set the chunk mask for the entries that will be used by this scenario
ice_acl_set_scen_chnk_msk @scen_buf : Pointer to the scenario buffer that needs to be populated @scen : pointer to the available space for the scenario Set the chunk mask for the entries that will be used by this scenario
static void
ice_acl_set_scen_chnk_msk(struct ice_aqc_acl_scen *scen_buf,
			  struct ice_acl_scen *scen)
{
	u16 tcam_idx, num_cscd, units, cnt;
	u8 chnk_offst;
	tcam_idx = ICE_ACL_TBL_TCAM_IDX(scen->start);
	chnk_offst = (u8)((scen->start % ICE_AQC_ACL_TCAM_DEPTH) /
			  ICE_ACL_ENTRY_ALLOC_UNIT);
	units = scen->num_entry / ICE_ACL_ENTRY_ALLOC_UNIT;
	num_cscd = scen->width / ICE_AQC_ACL_KEY_WIDTH_BYTES;
	for (cnt = 0; cnt < units; cnt++) {
		u16 i;
		for (i = tcam_idx; i < tcam_idx + num_cscd; i++)
			scen_buf->tcam_cfg[i].chnk_msk |= BIT(chnk_offst);
		chnk_offst = (chnk_offst + 1) % ICE_AQC_MAX_TCAM_ALLOC_UNITS;
		if (!chnk_offst)
			tcam_idx += num_cscd;
	}
}
static void ice_acl_set_scen_chnk_msk ( struct ice_aqc_acl_scen * scen_buf , struct ice_acl_scen * scen ) { u16 tcam_idx , num_cscd , units , cnt ; u8 chnk_offst ; tcam_idx = ICE_ACL_TBL_TCAM_IDX ( scen -> start ) ; chnk_offst = ( u8 ) ( ( scen -> start % ICE_AQC_ACL_TCAM_DEPTH ) / ICE_ACL_ENTRY_ALLOC_UNIT ) ; units = scen -> num_entry / ICE_ACL_ENTRY_ALLOC_UNIT ; num_cscd = scen -> width / ICE_AQC_ACL_KEY_WIDTH_BYTES ; for ( cnt = 0 ; cnt < units ; cnt ++ ) { u16 i ; for ( i = tcam_idx ; i < tcam_idx + num_cscd ; i ++ ) scen_buf -> tcam_cfg [ i ] . chnk_msk |= BIT ( chnk_offst ) ; chnk_offst = ( chnk_offst + 1 ) % ICE_AQC_MAX_TCAM_ALLOC_UNITS ; if ( ! chnk_offst ) tcam_idx += num_cscd ; } }
ice_acl_set_scen_chnk_msk
 @scen_buf: Pointer to the scenario buffer that needs to be populated
 @scen: pointer to the available space for the scenario
ice_acl_set_scen_chnk_msk @scen_buf : Pointer to the scenario buffer that needs to be populated @scen : pointer to the available space for the scenario
/* Determine the starting TCAM index and offset of the start entry */ /* Entries are allocated and tracked in multiple of 64's */ /* Determine number of cascaded TCAMs */ /* Set the corresponding bitmap of individual 64-entry
		 * chunk spans across a cascade of 1 or more TCAMs
		 * For each TCAM, there will be (ICE_AQC_ACL_TCAM_DEPTH
		 * / ICE_ACL_ENTRY_ALLOC_UNIT) or 8 chunks.
		 */