src/dpdk/lib/librte_eventdev/rte_event_eth_rx_adapter.c
static void
rxa_calc_nb_post_add_intr(struct rte_event_eth_rx_adapter *rx_adapter,
			struct eth_device_info *dev_info,
			int rx_queue_id,
			uint32_t *nb_rx_poll,
			uint32_t *nb_rx_intr,
			uint32_t *nb_wrr)
{
	uint32_t intr_diff;
	uint32_t poll_diff;
	uint32_t wrr_len_diff;

	if (rx_queue_id == -1) {
		intr_diff = dev_info->dev->data->nb_rx_queues -
						dev_info->nb_rx_intr;
		poll_diff = dev_info->nb_rx_poll;
		wrr_len_diff = dev_info->wrr_len;
	} else {
		intr_diff = !rxa_intr_queue(dev_info, rx_queue_id);
		poll_diff = rxa_polled_queue(dev_info, rx_queue_id);
		wrr_len_diff = poll_diff ? dev_info->rx_queue[rx_queue_id].wt :
					0;
	}

	*nb_rx_intr = rx_adapter->num_rx_intr + intr_diff;
	*nb_rx_poll = rx_adapter->num_rx_polled - poll_diff;
	*nb_wrr = rx_adapter->wrr_len - wrr_len_diff;
}
/* Calculate nb_rx_* after adding interrupt mode rx queues, newly added
 * interrupt queues could currently be poll mode Rx queues
 */
Calculate nb_rx_* after adding interrupt mode rx queues, newly added
interrupt queues could currently be poll mode Rx queues
Calculate nb_rx_ * after adding interrupt mode rx queues newly added interrupt queues could currently be poll mode Rx queues
static void
rxa_calc_nb_post_add_intr(struct rte_event_eth_rx_adapter *rx_adapter,
			struct eth_device_info *dev_info,
			int rx_queue_id,
			uint32_t *nb_rx_poll,
			uint32_t *nb_rx_intr,
			uint32_t *nb_wrr)
{
	uint32_t intr_diff;
	uint32_t poll_diff;
	uint32_t wrr_len_diff;
	if (rx_queue_id == -1) {
		intr_diff = dev_info->dev->data->nb_rx_queues -
						dev_info->nb_rx_intr;
		poll_diff = dev_info->nb_rx_poll;
		wrr_len_diff = dev_info->wrr_len;
	} else {
		intr_diff = !rxa_intr_queue(dev_info, rx_queue_id);
		poll_diff = rxa_polled_queue(dev_info, rx_queue_id);
		wrr_len_diff = poll_diff ? dev_info->rx_queue[rx_queue_id].wt :
					0;
	}
	*nb_rx_intr = rx_adapter->num_rx_intr + intr_diff;
	*nb_rx_poll = rx_adapter->num_rx_polled - poll_diff;
	*nb_wrr = rx_adapter->wrr_len - wrr_len_diff;
}
static void rxa_calc_nb_post_add_intr ( struct rte_event_eth_rx_adapter * rx_adapter , struct eth_device_info * dev_info , int rx_queue_id , uint32_t * nb_rx_poll , uint32_t * nb_rx_intr , uint32_t * nb_wrr ) { uint32_t intr_diff ; uint32_t poll_diff ; uint32_t wrr_len_diff ; if ( rx_queue_id == -1 ) { intr_diff = dev_info -> dev -> data -> nb_rx_queues - dev_info -> nb_rx_intr ; poll_diff = dev_info -> nb_rx_poll ; wrr_len_diff = dev_info -> wrr_len ; } else { intr_diff = ! rxa_intr_queue ( dev_info , rx_queue_id ) ; poll_diff = rxa_polled_queue ( dev_info , rx_queue_id ) ; wrr_len_diff = poll_diff ? dev_info -> rx_queue [ rx_queue_id ] . wt : 0 ; } * nb_rx_intr = rx_adapter -> num_rx_intr + intr_diff ; * nb_rx_poll = rx_adapter -> num_rx_polled - poll_diff ; * nb_wrr = rx_adapter -> wrr_len - wrr_len_diff ; }
Calculate nb_rx_* after adding interrupt mode rx queues, newly added
 interrupt queues could currently be poll mode Rx queues
Calculate nb_rx_ * after adding interrupt mode rx queues newly added interrupt queues could currently be poll mode Rx queues