From: Nikhil Rao Date: Fri, 10 May 2019 08:08:10 +0000 (+0530) Subject: eventdev: fix Rx adapter event flush X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=339677f87023ccfa8d96b88dd4469a0dc25f813d;p=dpdk.git eventdev: fix Rx adapter event flush The Rx adapter flushes events only if it has BATCH_SIZE events buffered where BATCH_SIZE is set to 32, e.g., if a single packet is sent, it is never passed to eventdev. Fix this issue by adding an event buffer flush either when a Rx queue is found to be empty or the adapter service function has processed the max number of packets for an invocation. Bugzilla ID: 277 Fixes: 6b83f5935543 ("eventdev: add event buffer flush in Rx adapter") Cc: stable@dpdk.org Reported-by: Matias Elo Signed-off-by: Nikhil Rao Reviewed-by: Mattias Rönnblom Tested-by: Matias Elo --- diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c index 8b6e69daf3..b60674b610 100644 --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c @@ -872,7 +872,7 @@ rxa_eth_rx(struct rte_event_eth_rx_adapter *rx_adapter, break; } - if (buf->count >= BATCH_SIZE) + if (buf->count > 0) rxa_flush_event_buffer(rx_adapter); return nb_rx;