src/dpdk/drivers/net/hns3/hns3_tm.h
static inline uint8_t
hns3_tm_calc_node_tc_no(struct hns3_tm_conf *conf, uint32_t node_id)
{
	if (node_id >= conf->nb_leaf_nodes_max &&
	    node_id < conf->nb_nodes_max - 1)
		return node_id - conf->nb_leaf_nodes_max;
	else
		return 0;
}
/*
 * This API used to calc node TC no. User must make sure the node id is in the
 * TC node id range.
 *
 * User could call rte_eth_dev_info_get API to get port's max_tx_queues, The TM
 * id's assignment should following the below rules:
 *     [0, max_tx_queues-1]: correspond queues's node id
 *     max_tx_queues + 0   : correspond TC0's node id
 *     max_tx_queues + 1   : correspond TC1's node id
 *     ...
 *     max_tx_queues + 7   : correspond TC7's node id
 *     max_tx_queues + 8   : correspond port's node id
 *
 */
This API used to calc node TC no. User must make sure the node id is in the
TC node id range.


This API used to calc node TC no . User must make sure the node id is in the TC node id range .
static inline uint8_t
hns3_tm_calc_node_tc_no(struct hns3_tm_conf *conf, uint32_t node_id)
{
	if (node_id >= conf->nb_leaf_nodes_max &&
	    node_id < conf->nb_nodes_max - 1)
		return node_id - conf->nb_leaf_nodes_max;
	else
		return 0;
}
static inline uint8_t hns3_tm_calc_node_tc_no ( struct hns3_tm_conf * conf , uint32_t node_id ) { if ( node_id >= conf -> nb_leaf_nodes_max && node_id < conf -> nb_nodes_max - 1 ) return node_id - conf -> nb_leaf_nodes_max ; else return 0 ; }
This API used to calc node TC no.
This API used to calc node TC no .