src/dpdk/drivers/net/ice/base/ice_sched.c
static void
ice_sched_calc_vsi_child_nodes(struct ice_hw *hw, u16 num_qs, u16 *num_nodes)
{
	u16 num = num_qs;
	u8 i, qgl, vsil;

	qgl = ice_sched_get_qgrp_layer(hw);
	vsil = ice_sched_get_vsi_layer(hw);

	/* calculate num nodes from queue group to VSI layer */
	for (i = qgl; i > vsil; i--) {
		/* round to the next integer if there is a remainder */
		num = DIVIDE_AND_ROUND_UP(num, hw->max_children[i]);

		/* need at least one node */
		num_nodes[i] = num ? num : 1;
	}
}
/**
 * ice_sched_calc_vsi_child_nodes - calculate number of VSI child nodes
 * @hw: pointer to the HW struct
 * @num_qs: number of queues
 * @num_nodes: num nodes array
 *
 * This function calculates the number of VSI child nodes based on the
 * number of queues.
 */
calculate number of VSI child nodes
@hw: pointer to the HW struct
@num_qs: number of queues
@num_nodes: num nodes array

This function calculates the number of VSI child nodes based on the
number of queues.
calculate number of VSI child nodes @hw : pointer to the HW struct @num_qs : number of queues @num_nodes : num nodes array This function calculates the number of VSI child nodes based on the number of queues .
static void
ice_sched_calc_vsi_child_nodes(struct ice_hw *hw, u16 num_qs, u16 *num_nodes)
{
	u16 num = num_qs;
	u8 i, qgl, vsil;
	qgl = ice_sched_get_qgrp_layer(hw);
	vsil = ice_sched_get_vsi_layer(hw);
	for (i = qgl; i > vsil; i--) {
		num = DIVIDE_AND_ROUND_UP(num, hw->max_children[i]);
		num_nodes[i] = num ? num : 1;
	}
}
static void ice_sched_calc_vsi_child_nodes ( struct ice_hw * hw , u16 num_qs , u16 * num_nodes ) { u16 num = num_qs ; u8 i , qgl , vsil ; qgl = ice_sched_get_qgrp_layer ( hw ) ; vsil = ice_sched_get_vsi_layer ( hw ) ; for ( i = qgl ; i > vsil ; i -- ) { num = DIVIDE_AND_ROUND_UP ( num , hw -> max_children [ i ] ) ; num_nodes [ i ] = num ? num : 1 ; } }
ice_sched_calc_vsi_child_nodes - calculate number of VSI child nodes
 @hw: pointer to the HW struct
 @num_qs: number of queues
 @num_nodes: num nodes array
ice_sched_calc_vsi_child_nodes - calculate number of VSI child nodes @hw : pointer to the HW struct @num_qs : number of queues @num_nodes : num nodes array
/* calculate num nodes from queue group to VSI layer */ /* round to the next integer if there is a remainder */ /* need at least one node */