From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id AF4EAA0096 for ; Thu, 9 May 2019 13:21:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE4AA49E0; Thu, 9 May 2019 13:21:31 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id A08BB493D for ; Thu, 9 May 2019 13:21:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 04:21:29 -0700 X-ExtLoop1: 1 Received: from unknown (HELO broadwell-dev-4.localdomain) ([10.224.122.193]) by orsmga001.jf.intel.com with ESMTP; 09 May 2019 04:21:27 -0700 From: Nikhil Rao To: jerinj@marvell.com Cc: dev@dpdk.org, matias.elo@nokia.com, Nikhil Rao Date: Thu, 9 May 2019 10:20:40 +0530 Message-Id: <1557377440-11616-1-git-send-email-nikhil.rao@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1557376797-10609-1-git-send-email-nikhil.rao@intel.com> References: <1557376797-10609-1-git-send-email-nikhil.rao@intel.com> Subject: [dpdk-dev] [PATCH v2] eventdev: fix Rx adapter event flush logic X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190509045040.TKUP6vzRajIgRRaIjnuFsf1Aw_8AJxyBF_V5FcNfhjg@z> 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") Reported-by: Matias Elo Signed-off-by: Nikhil Rao --- lib/librte_eventdev/rte_event_eth_rx_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) v2: * added Bugzilla ID 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; -- 1.8.3.1