src/dpdk/drivers/net/ice/base/ice_acl_ctrl.c
static void
ice_acl_commit_partition(struct ice_hw *hw, struct ice_acl_scen *scen,
			 bool commit)
{
	u16 tcam_idx, off, num_cscd, units, cnt;

	/* Determine the starting TCAM index and offset of the start entry */
	tcam_idx = ICE_ACL_TBL_TCAM_IDX(scen->start);
	off = (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 TCAM */
	num_cscd = scen->width / ICE_AQC_ACL_KEY_WIDTH_BYTES;

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

		/* Set/clear the corresponding bitmap of individual 64-entry
		 * chunk spans across a row of 1 or more TCAMs
		 */
		for (w = 0; w < num_cscd; w++) {
			u16 b;

			b = ((tcam_idx + w) * ICE_AQC_MAX_TCAM_ALLOC_UNITS) +
				off;
			if (commit)
				ice_set_bit(b, hw->acl_tbl->avail);
			else
				ice_clear_bit(b, hw->acl_tbl->avail);
		}

		off = (off + 1) % ICE_AQC_MAX_TCAM_ALLOC_UNITS;
		if (!off)
			tcam_idx += num_cscd;
	}
}
/**
 * ice_acl_commit_partition - Indicate if the specified partition is active
 * @hw: pointer to the hardware structure
 * @scen: pointer to the scenario struct
 * @commit: true if the partition is being commit
 */
Indicate if the specified partition is active
@hw: pointer to the hardware structure
@scen: pointer to the scenario struct
@commit: true if the partition is being commit
Indicate if the specified partition is active @hw : pointer to the hardware structure @scen : pointer to the scenario struct @commit : true if the partition is being commit
static void
ice_acl_commit_partition(struct ice_hw *hw, struct ice_acl_scen *scen,
			 bool commit)
{
	u16 tcam_idx, off, num_cscd, units, cnt;
	tcam_idx = ICE_ACL_TBL_TCAM_IDX(scen->start);
	off = (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 w;
		for (w = 0; w < num_cscd; w++) {
			u16 b;
			b = ((tcam_idx + w) * ICE_AQC_MAX_TCAM_ALLOC_UNITS) +
				off;
			if (commit)
				ice_set_bit(b, hw->acl_tbl->avail);
			else
				ice_clear_bit(b, hw->acl_tbl->avail);
		}
		off = (off + 1) % ICE_AQC_MAX_TCAM_ALLOC_UNITS;
		if (!off)
			tcam_idx += num_cscd;
	}
}
static void ice_acl_commit_partition ( struct ice_hw * hw , struct ice_acl_scen * scen , bool commit ) { u16 tcam_idx , off , num_cscd , units , cnt ; tcam_idx = ICE_ACL_TBL_TCAM_IDX ( scen -> start ) ; off = ( 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 w ; for ( w = 0 ; w < num_cscd ; w ++ ) { u16 b ; b = ( ( tcam_idx + w ) * ICE_AQC_MAX_TCAM_ALLOC_UNITS ) + off ; if ( commit ) ice_set_bit ( b , hw -> acl_tbl -> avail ) ; else ice_clear_bit ( b , hw -> acl_tbl -> avail ) ; } off = ( off + 1 ) % ICE_AQC_MAX_TCAM_ALLOC_UNITS ; if ( ! off ) tcam_idx += num_cscd ; } }
ice_acl_commit_partition - Indicate if the specified partition is active
 @hw: pointer to the hardware structure
 @scen: pointer to the scenario struct
 @commit: true if the partition is being commit
ice_acl_commit_partition - Indicate if the specified partition is active @hw : pointer to the hardware structure @scen : pointer to the scenario struct @commit : true if the partition is being commit
/* 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 TCAM */ /* Set/clear the corresponding bitmap of individual 64-entry
		 * chunk spans across a row of 1 or more TCAMs
		 */