src/dpdk/lib/librte_eventdev/rte_event_eth_rx_adapter.c
static inline uint32_t
rxa_poll(struct rte_event_eth_rx_adapter *rx_adapter)
{
	uint32_t num_queue;
	uint32_t nb_rx = 0;
	struct rte_eth_event_enqueue_buffer *buf;
	uint32_t wrr_pos;
	uint32_t max_nb_rx;

	wrr_pos = rx_adapter->wrr_pos;
	max_nb_rx = rx_adapter->max_nb_rx;
	buf = &rx_adapter->event_enqueue_buffer;

	/* Iterate through a WRR sequence */
	for (num_queue = 0; num_queue < rx_adapter->wrr_len; num_queue++) {
		unsigned int poll_idx = rx_adapter->wrr_sched[wrr_pos];
		uint16_t qid = rx_adapter->eth_rx_poll[poll_idx].eth_rx_qid;
		uint16_t d = rx_adapter->eth_rx_poll[poll_idx].eth_dev_id;

		/* Don't do a batch dequeue from the rx queue if there isn't
		 * enough space in the enqueue buffer.
		 */
		if (buf->count >= BATCH_SIZE)
			rxa_flush_event_buffer(rx_adapter);
		if (BATCH_SIZE > (ETH_EVENT_BUFFER_SIZE - buf->count)) {
			rx_adapter->wrr_pos = wrr_pos;
			return nb_rx;
		}

		nb_rx += rxa_eth_rx(rx_adapter, d, qid, nb_rx, max_nb_rx,
				NULL);
		if (nb_rx > max_nb_rx) {
			rx_adapter->wrr_pos =
				    (wrr_pos + 1) % rx_adapter->wrr_len;
			break;
		}

		if (++wrr_pos == rx_adapter->wrr_len)
			wrr_pos = 0;
	}
	return nb_rx;
}
/*
 * Polls receive queues added to the event adapter and enqueues received
 * packets to the event device.
 *
 * The receive code enqueues initially to a temporary buffer, the
 * temporary buffer is drained anytime it holds >= BATCH_SIZE packets
 *
 * If there isn't space available in the temporary buffer, packets from the
 * Rx queue aren't dequeued from the eth device, this back pressures the
 * eth device, in virtual device environments this back pressure is relayed to
 * the hypervisor's switching layer where adjustments can be made to deal with
 * it.
 */
Polls receive queues added to the event adapter and enqueues received
packets to the event device.

The receive code enqueues initially to a temporary buffer, the
temporary buffer is drained anytime it holds >= BATCH_SIZE packets

If there isn't space available in the temporary buffer, packets from the
Rx queue aren't dequeued from the eth device, this back pressures the
eth device, in virtual device environments this back pressure is relayed to
the hypervisor's switching layer where adjustments can be made to deal with
it.
Polls receive queues added to the event adapter and enqueues received packets to the event device . The receive code enqueues initially to a temporary buffer the temporary buffer is drained anytime it holds > = BATCH_SIZE packets If there isn ' t space available in the temporary buffer packets from the Rx queue aren ' t dequeued from the eth device this back pressures the eth device in virtual device environments this back pressure is relayed to the hypervisor ' s switching layer where adjustments can be made to deal with it .
static inline uint32_t
rxa_poll(struct rte_event_eth_rx_adapter *rx_adapter)
{
	uint32_t num_queue;
	uint32_t nb_rx = 0;
	struct rte_eth_event_enqueue_buffer *buf;
	uint32_t wrr_pos;
	uint32_t max_nb_rx;
	wrr_pos = rx_adapter->wrr_pos;
	max_nb_rx = rx_adapter->max_nb_rx;
	buf = &rx_adapter->event_enqueue_buffer;
	for (num_queue = 0; num_queue < rx_adapter->wrr_len; num_queue++) {
		unsigned int poll_idx = rx_adapter->wrr_sched[wrr_pos];
		uint16_t qid = rx_adapter->eth_rx_poll[poll_idx].eth_rx_qid;
		uint16_t d = rx_adapter->eth_rx_poll[poll_idx].eth_dev_id;
		if (buf->count >= BATCH_SIZE)
			rxa_flush_event_buffer(rx_adapter);
		if (BATCH_SIZE > (ETH_EVENT_BUFFER_SIZE - buf->count)) {
			rx_adapter->wrr_pos = wrr_pos;
			return nb_rx;
		}
		nb_rx += rxa_eth_rx(rx_adapter, d, qid, nb_rx, max_nb_rx,
				NULL);
		if (nb_rx > max_nb_rx) {
			rx_adapter->wrr_pos =
				    (wrr_pos + 1) % rx_adapter->wrr_len;
			break;
		}
		if (++wrr_pos == rx_adapter->wrr_len)
			wrr_pos = 0;
	}
	return nb_rx;
}
static inline uint32_t rxa_poll ( struct rte_event_eth_rx_adapter * rx_adapter ) { uint32_t num_queue ; uint32_t nb_rx = 0 ; struct rte_eth_event_enqueue_buffer * buf ; uint32_t wrr_pos ; uint32_t max_nb_rx ; wrr_pos = rx_adapter -> wrr_pos ; max_nb_rx = rx_adapter -> max_nb_rx ; buf = & rx_adapter -> event_enqueue_buffer ; for ( num_queue = 0 ; num_queue < rx_adapter -> wrr_len ; num_queue ++ ) { unsigned int poll_idx = rx_adapter -> wrr_sched [ wrr_pos ] ; uint16_t qid = rx_adapter -> eth_rx_poll [ poll_idx ] . eth_rx_qid ; uint16_t d = rx_adapter -> eth_rx_poll [ poll_idx ] . eth_dev_id ; if ( buf -> count >= BATCH_SIZE ) rxa_flush_event_buffer ( rx_adapter ) ; if ( BATCH_SIZE > ( ETH_EVENT_BUFFER_SIZE - buf -> count ) ) { rx_adapter -> wrr_pos = wrr_pos ; return nb_rx ; } nb_rx += rxa_eth_rx ( rx_adapter , d , qid , nb_rx , max_nb_rx , NULL ) ; if ( nb_rx > max_nb_rx ) { rx_adapter -> wrr_pos = ( wrr_pos + 1 ) % rx_adapter -> wrr_len ; break ; } if ( ++ wrr_pos == rx_adapter -> wrr_len ) wrr_pos = 0 ; } return nb_rx ; }
Polls receive queues added to the event adapter and enqueues received
 packets to the event device.
Polls receive queues added to the event adapter and enqueues received packets to the event device .
/* Iterate through a WRR sequence */ /* Don't do a batch dequeue from the rx queue if there isn't
		 * enough space in the enqueue buffer.
		 */