summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil Rao <nikhil.rao@intel.com>2019-05-10 13:38:10 +0530
committerThomas Monjalon <thomas@monjalon.net>2019-05-13 16:14:08 +0200
commit339677f87023ccfa8d96b88dd4469a0dc25f813d (patch)
treeff199069a9802d8835416cd4a9e24bc64c7763c7
parentee2b25c85a027af658ff50f33d737716d6350b90 (diff)
downloaddpdk-draft-windows-339677f87023ccfa8d96b88dd4469a0dc25f813d.zip
dpdk-draft-windows-339677f87023ccfa8d96b88dd4469a0dc25f813d.tar.gz
dpdk-draft-windows-339677f87023ccfa8d96b88dd4469a0dc25f813d.tar.xz
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 <matias.elo@nokia.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Tested-by: Matias Elo <matias.elo@nokia.com>
-rw-r--r--lib/librte_eventdev/rte_event_eth_rx_adapter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 8b6e69d..b60674b 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;