eventdev: fix Rx adapter event flush logic

Message ID 1557376797-10609-1-git-send-email-nikhil.rao@intel.com (mailing list archive)
State Superseded, archived
Headers
Series eventdev: fix Rx adapter event flush logic |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Rao, Nikhil May 9, 2019, 4:39 a.m. UTC
  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.

Fixes: 6b83f5935543 ("eventdev: add event buffer flush in Rx adapter")

Reported-by: Matias Elo <matias.elo@nokia.com>

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 8d178be..fd3761b 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 @@  static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
 			break;
 	}
 
-	if (buf->count >= BATCH_SIZE)
+	if (buf->count)
 		rxa_flush_event_buffer(rx_adapter);
 
 	return nb_rx;