src/dpdk/drivers/net/ice/base/ice_sched.c
enum ice_status ice_rm_agg_cfg(struct ice_port_info *pi, u32 agg_id)
{
	struct ice_sched_agg_info *agg_info;
	enum ice_status status = ICE_SUCCESS;
	u8 tc;

	ice_acquire_lock(&pi->sched_lock);
	agg_info = ice_get_agg_info(pi->hw, agg_id);
	if (!agg_info) {
		status = ICE_ERR_DOES_NOT_EXIST;
		goto exit_ice_rm_agg_cfg;
	}

	ice_for_each_traffic_class(tc) {
		status = ice_rm_agg_cfg_tc(pi, agg_info, tc, true);
		if (status)
			goto exit_ice_rm_agg_cfg;
	}

	if (ice_is_any_bit_set(agg_info->tc_bitmap, ICE_MAX_TRAFFIC_CLASS)) {
		status = ICE_ERR_IN_USE;
		goto exit_ice_rm_agg_cfg;
	}

	/* Safe to delete entry now */
	LIST_DEL(&agg_info->list_entry);
	ice_free(pi->hw, agg_info);

	/* Remove unused RL profile IDs from HW and SW DB */
	ice_sched_rm_unused_rl_prof(pi->hw);

exit_ice_rm_agg_cfg:
	ice_release_lock(&pi->sched_lock);
	return status;
}
/**
 * ice_rm_agg_cfg - remove aggregator configuration
 * @pi: port information structure
 * @agg_id: aggregator ID
 *
 * This function removes aggregator reference to VSI and delete aggregator ID
 * info. It removes the aggregator configuration completely.
 */
remove aggregator configuration
@pi: port information structure
@agg_id: aggregator ID

This function removes aggregator reference to VSI and delete aggregator ID
info. It removes the aggregator configuration completely.
remove aggregator configuration @pi : port information structure @agg_id : aggregator ID 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)
{
	struct ice_sched_agg_info *agg_info;
	enum ice_status status = ICE_SUCCESS;
	u8 tc;
	ice_acquire_lock(&pi->sched_lock);
	agg_info = ice_get_agg_info(pi->hw, agg_id);
	if (!agg_info) {
		status = ICE_ERR_DOES_NOT_EXIST;
		goto exit_ice_rm_agg_cfg;
	}
	ice_for_each_traffic_class(tc) {
		status = ice_rm_agg_cfg_tc(pi, agg_info, tc, true);
		if (status)
			goto exit_ice_rm_agg_cfg;
	}
	if (ice_is_any_bit_set(agg_info->tc_bitmap, ICE_MAX_TRAFFIC_CLASS)) {
		status = ICE_ERR_IN_USE;
		goto exit_ice_rm_agg_cfg;
	}
	LIST_DEL(&agg_info->list_entry);
	ice_free(pi->hw, agg_info);
	ice_sched_rm_unused_rl_prof(pi->hw);
exit_ice_rm_agg_cfg:
	ice_release_lock(&pi->sched_lock);
	return status;
}
enum ice_status ice_rm_agg_cfg ( struct ice_port_info * pi , u32 agg_id ) { struct ice_sched_agg_info * agg_info ; enum ice_status status = ICE_SUCCESS ; u8 tc ; ice_acquire_lock ( & pi -> sched_lock ) ; agg_info = ice_get_agg_info ( pi -> hw , agg_id ) ; if ( ! agg_info ) { status = ICE_ERR_DOES_NOT_EXIST ; goto exit_ice_rm_agg_cfg ; } ice_for_each_traffic_class ( tc ) { status = ice_rm_agg_cfg_tc ( pi , agg_info , tc , true ) ; if ( status ) goto exit_ice_rm_agg_cfg ; } if ( ice_is_any_bit_set ( agg_info -> tc_bitmap , ICE_MAX_TRAFFIC_CLASS ) ) { status = ICE_ERR_IN_USE ; goto exit_ice_rm_agg_cfg ; } LIST_DEL ( & agg_info -> list_entry ) ; ice_free ( pi -> hw , agg_info ) ; ice_sched_rm_unused_rl_prof ( pi -> hw ) ; exit_ice_rm_agg_cfg : ice_release_lock ( & pi -> sched_lock ) ; return status ; }
ice_rm_agg_cfg - remove aggregator configuration
 @pi: port information structure
 @agg_id: aggregator ID
ice_rm_agg_cfg - remove aggregator configuration @pi : port information structure @agg_id : aggregator ID
/* Safe to delete entry now */ /* Remove unused RL profile IDs from HW and SW DB */