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 1EA64A0096 for ; Thu, 9 May 2019 21:24:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A4004C95; Thu, 9 May 2019 21:24:04 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by dpdk.org (Postfix) with ESMTP id ED8F849E0 for ; Thu, 9 May 2019 21:24:02 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 8E54C40006 for ; Thu, 9 May 2019 21:24:02 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 760764000D; Thu, 9 May 2019 21:24:02 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.1 X-Spam-Score: -0.9 Received: from [192.168.1.59] (host-90-232-127-248.mobileonline.telia.com [90.232.127.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 6BA9E40006; Thu, 9 May 2019 21:23:59 +0200 (CEST) To: Thomas Monjalon , Nikhil Rao Cc: dev@dpdk.org, jerinj@marvell.com, matias.elo@nokia.com References: <1557376797-10609-1-git-send-email-nikhil.rao@intel.com> <1557377440-11616-1-git-send-email-nikhil.rao@intel.com> <51938683.yaEMjVf3gu@xps> From: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= Message-ID: <316ca2a3-1988-7d46-6bec-3ed0148f49a2@ericsson.com> Date: Thu, 9 May 2019 21:23:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <51938683.yaEMjVf3gu@xps> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [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" Message-ID: <20190509192358._oAGLbnc-3sZAymK_PUYfAgFeRDBj2JKxqABp1tXX0s@z> On 2019-05-09 21:17, Thomas Monjalon wrote: > 09/05/2019 06:50, Nikhil Rao: >> 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 >> --- >> --- 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) >> - if (buf->count >= BATCH_SIZE) >> + if (buf->count) > > I don't this code, but it looks you are removing a test > which was probably done on purpose. > By the way, you should make your test explicit with "!= 0". > "> 0". count is unsigned.