From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=3.0 tests=DATE_IN_PAST_06_12, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42038C04AB1 for ; Thu, 9 May 2019 11:11:55 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id F34A120644 for ; Thu, 9 May 2019 11:11:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F34A120644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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" 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