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 4FDEFA0096 for ; Fri, 10 May 2019 10:08:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2DC9F374; Fri, 10 May 2019 10:08:43 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 37EF9374; Fri, 10 May 2019 10:08:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2019 01:08:39 -0700 X-ExtLoop1: 1 Received: from unknown (HELO broadwell-dev-4.localdomain) ([10.224.122.193]) by orsmga003.jf.intel.com with ESMTP; 10 May 2019 01:08:36 -0700 From: Nikhil Rao To: thomas@monjalon.net Cc: jerinj@marvell.com, dev@dpdk.org, matias.elo@nokia.com, Nikhil Rao , stable@dpdk.org Date: Fri, 10 May 2019 13:38:10 +0530 Message-Id: <1557475690-42133-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-stable] [PATCH v3] eventdev: fix Rx adapter event flush logic X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 CC: stable@dpdk.org Signed-off-by: Nikhil Rao --- lib/librte_eventdev/rte_event_eth_rx_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) v2: * add Bugzilla ID v3: * add stable CC * replace boolean check with check for > 0 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 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b) break; } - if (buf->count >= BATCH_SIZE) + if (buf->count > 0) rxa_flush_event_buffer(rx_adapter); return nb_rx; -- 1.8.3.1