src/dpdk/lib/librte_eventdev/rte_event_eth_rx_adapter.c
static inline uint16_t
rxa_flush_event_buffer(struct rte_event_eth_rx_adapter *rx_adapter)
{
	struct rte_eth_event_enqueue_buffer *buf =
	    &rx_adapter->event_enqueue_buffer;
	struct rte_event_eth_rx_adapter_stats *stats = &rx_adapter->stats;

	uint16_t n = rte_event_enqueue_new_burst(rx_adapter->eventdev_id,
					rx_adapter->event_port_id,
					buf->events,
					buf->count);
	if (n != buf->count) {
		memmove(buf->events,
			&buf->events[n],
			(buf->count - n) * sizeof(struct rte_event));
		stats->rx_enq_retry++;
	}

	n ? rxa_enq_block_end_ts(rx_adapter, stats) :
		rxa_enq_block_start_ts(rx_adapter);

	buf->count -= n;
	stats->rx_enq_count += n;

	return n;
}
/* Enqueue buffered events to event device */
Enqueue buffered events to event device
Enqueue buffered events to event device
static inline uint16_t
rxa_flush_event_buffer(struct rte_event_eth_rx_adapter *rx_adapter)
{
	struct rte_eth_event_enqueue_buffer *buf =
	    &rx_adapter->event_enqueue_buffer;
	struct rte_event_eth_rx_adapter_stats *stats = &rx_adapter->stats;
	uint16_t n = rte_event_enqueue_new_burst(rx_adapter->eventdev_id,
					rx_adapter->event_port_id,
					buf->events,
					buf->count);
	if (n != buf->count) {
		memmove(buf->events,
			&buf->events[n],
			(buf->count - n) * sizeof(struct rte_event));
		stats->rx_enq_retry++;
	}
	n ? rxa_enq_block_end_ts(rx_adapter, stats) :
		rxa_enq_block_start_ts(rx_adapter);
	buf->count -= n;
	stats->rx_enq_count += n;
	return n;
}
static inline uint16_t rxa_flush_event_buffer ( struct rte_event_eth_rx_adapter * rx_adapter ) { struct rte_eth_event_enqueue_buffer * buf = & rx_adapter -> event_enqueue_buffer ; struct rte_event_eth_rx_adapter_stats * stats = & rx_adapter -> stats ; uint16_t n = rte_event_enqueue_new_burst ( rx_adapter -> eventdev_id , rx_adapter -> event_port_id , buf -> events , buf -> count ) ; if ( n != buf -> count ) { memmove ( buf -> events , & buf -> events [ n ] , ( buf -> count - n ) * sizeof ( struct rte_event ) ) ; stats -> rx_enq_retry ++ ; } n ? rxa_enq_block_end_ts ( rx_adapter , stats ) : rxa_enq_block_start_ts ( rx_adapter ) ; buf -> count -= n ; stats -> rx_enq_count += n ; return n ; }
Enqueue buffered events to event device
Enqueue buffered events to event device