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 F0C31A0096 for ; Thu, 9 May 2019 13:11:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D0F737B7; Thu, 9 May 2019 13:11:54 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 511D92C18 for ; Thu, 9 May 2019 13:11:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 04:11:51 -0700 X-ExtLoop1: 1 Received: from unknown (HELO broadwell-dev-4.localdomain) ([10.224.122.193]) by orsmga007.jf.intel.com with ESMTP; 09 May 2019 04:11:49 -0700 From: Nikhil Rao To: jerinj@marvell.com Cc: dev@dpdk.org, matias.elo@nokia.com, Nikhil Rao Date: Thu, 9 May 2019 10:09:57 +0530 Message-Id: <1557376797-10609-1-git-send-email-nikhil.rao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] 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: <20190509043957.Rh0qgL01OG0R62Jc4Y0m-FgPvwnd5FjTWrhxtghKU5A@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. 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(-) 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