src/dpdk/drivers/net/ice/base/ice_sched.c
static enum ice_status
ice_sched_set_tc_node_bw_alloc(struct ice_port_info *pi, u8 tc,
			       enum ice_rl_type rl_type, u8 bw_alloc)
{
	enum ice_status status = ICE_ERR_PARAM;
	struct ice_sched_node *tc_node;

	if (tc >= ICE_MAX_TRAFFIC_CLASS)
		return status;
	ice_acquire_lock(&pi->sched_lock);
	tc_node = ice_sched_get_tc_node(pi, tc);
	if (!tc_node)
		goto exit_set_tc_node_bw_alloc;
	status = ice_sched_cfg_node_bw_alloc(pi->hw, tc_node, rl_type,
					     bw_alloc);
	if (status)
		goto exit_set_tc_node_bw_alloc;
	status = ice_sched_save_tc_node_bw_alloc(pi, tc, rl_type, bw_alloc);

exit_set_tc_node_bw_alloc:
	ice_release_lock(&pi->sched_lock);
	return status;
}
/**
 * ice_sched_set_tc_node_bw_alloc - set TC node BW alloc
 * @pi: port information structure
 * @tc: TC number
 * @rl_type: min or max
 * @bw_alloc: bandwidth alloc
 *
 * 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.
 */
set TC node BW alloc
@pi: port information structure
@tc: TC number
@rl_type: min or max
@bw_alloc: bandwidth alloc

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.
set TC node BW alloc @pi : port information structure @tc : TC number @rl_type : min or max @bw_alloc : bandwidth alloc 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 .
static enum ice_status
ice_sched_set_tc_node_bw_alloc(struct ice_port_info *pi, u8 tc,
			       enum ice_rl_type rl_type, u8 bw_alloc)
{
	enum ice_status status = ICE_ERR_PARAM;
	struct ice_sched_node *tc_node;
	if (tc >= ICE_MAX_TRAFFIC_CLASS)
		return status;
	ice_acquire_lock(&pi->sched_lock);
	tc_node = ice_sched_get_tc_node(pi, tc);
	if (!tc_node)
		goto exit_set_tc_node_bw_alloc;
	status = ice_sched_cfg_node_bw_alloc(pi->hw, tc_node, rl_type,
					     bw_alloc);
	if (status)
		goto exit_set_tc_node_bw_alloc;
	status = ice_sched_save_tc_node_bw_alloc(pi, tc, rl_type, bw_alloc);
exit_set_tc_node_bw_alloc:
	ice_release_lock(&pi->sched_lock);
	return status;
}
static enum ice_status ice_sched_set_tc_node_bw_alloc ( struct ice_port_info * pi , u8 tc , enum ice_rl_type rl_type , u8 bw_alloc ) { enum ice_status status = ICE_ERR_PARAM ; struct ice_sched_node * tc_node ; if ( tc >= ICE_MAX_TRAFFIC_CLASS ) return status ; ice_acquire_lock ( & pi -> sched_lock ) ; tc_node = ice_sched_get_tc_node ( pi , tc ) ; if ( ! tc_node ) goto exit_set_tc_node_bw_alloc ; status = ice_sched_cfg_node_bw_alloc ( pi -> hw , tc_node , rl_type , bw_alloc ) ; if ( status ) goto exit_set_tc_node_bw_alloc ; status = ice_sched_save_tc_node_bw_alloc ( pi , tc , rl_type , bw_alloc ) ; exit_set_tc_node_bw_alloc : ice_release_lock ( & pi -> sched_lock ) ; return status ; }
ice_sched_set_tc_node_bw_alloc - set TC node BW alloc
 @pi: port information structure
 @tc: TC number
 @rl_type: min or max
 @bw_alloc: bandwidth alloc
ice_sched_set_tc_node_bw_alloc - set TC node BW alloc @pi : port information structure @tc : TC number @rl_type : min or max @bw_alloc : bandwidth alloc