src/dpdk/drivers/net/ice/base/ice_sched.c
static u16
ice_sched_get_node_rl_prof_id(struct ice_sched_node *node,
			      enum ice_rl_type rl_type)
{
	u16 rl_prof_id = ICE_SCHED_INVAL_PROF_ID;
	struct ice_aqc_txsched_elem *data;

	data = &node->info.data;
	switch (rl_type) {
	case ICE_MIN_BW:
		if (data->valid_sections & ICE_AQC_ELEM_VALID_CIR)
			rl_prof_id = LE16_TO_CPU(data->cir_bw.bw_profile_idx);
		break;
	case ICE_MAX_BW:
		if (data->valid_sections & ICE_AQC_ELEM_VALID_EIR)
			rl_prof_id = LE16_TO_CPU(data->eir_bw.bw_profile_idx);
		break;
	case ICE_SHARED_BW:
		if (data->valid_sections & ICE_AQC_ELEM_VALID_SHARED)
			rl_prof_id = LE16_TO_CPU(data->srl_id);
		break;
	default:
		break;
	}

	return rl_prof_id;
}
/**
 * ice_sched_get_node_rl_prof_id - get node's rate limit profile ID
 * @node: sched node
 * @rl_type: rate limit type
 *
 * If existing profile matches, it returns the corresponding rate
 * limit profile ID, otherwise it returns an invalid ID as error.
 */
get node's rate limit profile ID
@node: sched node
@rl_type: rate limit type

If existing profile matches, it returns the corresponding rate
limit profile ID, otherwise it returns an invalid ID as error.
get node ' s rate limit profile ID @node : sched node @rl_type : rate limit type If existing profile matches it returns the corresponding rate limit profile ID otherwise it returns an invalid ID as error .
static u16
ice_sched_get_node_rl_prof_id(struct ice_sched_node *node,
			      enum ice_rl_type rl_type)
{
	u16 rl_prof_id = ICE_SCHED_INVAL_PROF_ID;
	struct ice_aqc_txsched_elem *data;
	data = &node->info.data;
	switch (rl_type) {
	case ICE_MIN_BW:
		if (data->valid_sections & ICE_AQC_ELEM_VALID_CIR)
			rl_prof_id = LE16_TO_CPU(data->cir_bw.bw_profile_idx);
		break;
	case ICE_MAX_BW:
		if (data->valid_sections & ICE_AQC_ELEM_VALID_EIR)
			rl_prof_id = LE16_TO_CPU(data->eir_bw.bw_profile_idx);
		break;
	case ICE_SHARED_BW:
		if (data->valid_sections & ICE_AQC_ELEM_VALID_SHARED)
			rl_prof_id = LE16_TO_CPU(data->srl_id);
		break;
	default:
		break;
	}
	return rl_prof_id;
}
static u16 ice_sched_get_node_rl_prof_id ( struct ice_sched_node * node , enum ice_rl_type rl_type ) { u16 rl_prof_id = ICE_SCHED_INVAL_PROF_ID ; struct ice_aqc_txsched_elem * data ; data = & node -> info . data ; switch ( rl_type ) { case ICE_MIN_BW : if ( data -> valid_sections & ICE_AQC_ELEM_VALID_CIR ) rl_prof_id = LE16_TO_CPU ( data -> cir_bw . bw_profile_idx ) ; break ; case ICE_MAX_BW : if ( data -> valid_sections & ICE_AQC_ELEM_VALID_EIR ) rl_prof_id = LE16_TO_CPU ( data -> eir_bw . bw_profile_idx ) ; break ; case ICE_SHARED_BW : if ( data -> valid_sections & ICE_AQC_ELEM_VALID_SHARED ) rl_prof_id = LE16_TO_CPU ( data -> srl_id ) ; break ; default : break ; } return rl_prof_id ; }
ice_sched_get_node_rl_prof_id - get node's rate limit profile ID
 @node: sched node
 @rl_type: rate limit type
ice_sched_get_node_rl_prof_id - get node ' s rate limit profile ID @node : sched node @rl_type : rate limit type