From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yk0-f182.google.com (mail-yk0-f182.google.com [209.85.160.182]) by dpdk.org (Postfix) with ESMTP id 9A986255 for ; Wed, 28 Jan 2015 21:57:59 +0100 (CET) Received: by mail-yk0-f182.google.com with SMTP id q9so10080032ykb.13 for ; Wed, 28 Jan 2015 12:57:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1C0lCtIL7fKa+6NPHuLCwRLMYVgen5fK+4oT87pbSiE=; b=XmL/OjMM3TsihtfGsEFvbuiISSNOvWsrqfavsxuhMQf6UXchRE7bERp5StPUDwudeu nfS4um8DXaO5zxtLDc9+HNOtSusH8Xto+1pc7An8LuThf4FzQVdD/Edo3WfuDcTBAGgX M+wgORckGfPPqjJElMTrgR766AXjSdOdnDAORGpBL5ikp4rton5ehmwvDQvyzHF1GgGd h0Nj+RC6cLHv9TAde++tjeUJcXQIvVkjvj//dv0K+adtHCOaA718tCAgmzfYm9v3mdHR KelqUInuLwx0dWYLAieTAGqfWkNvbf+yBCXXP2H3SlfzPNMeCtqNNa+oG7984ELw8BjY WLnw== X-Gm-Message-State: ALoCoQl10Ovr4ZIjgHVJcCNnYZp2Ai2xWuxr15W5MFhLHDcuVtoR74jpBedOZHvXnc5m9C2QD1CS MIME-Version: 1.0 X-Received: by 10.170.165.130 with SMTP id h124mr2172980ykd.63.1422478678900; Wed, 28 Jan 2015 12:57:58 -0800 (PST) Received: by 10.170.42.212 with HTTP; Wed, 28 Jan 2015 12:57:58 -0800 (PST) In-Reply-To: <20150128164925.GA10321@localhost.localdomain> References: <20150128164925.GA10321@localhost.localdomain> Date: Wed, 28 Jan 2015 14:57:58 -0600 Message-ID: From: Jay Rolette To: Neil Horman Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: Dev Subject: Re: [dpdk-dev] Process question: reviewing older patches X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 20:58:00 -0000 Thanks Thomas and Neil. Sadly, no joy. While I generally like gmail for my mail, there's not a reasonable way to import the mbox file or to control the message id. If someone else wants to resend the message to the list, I can reply to that. Otherwise, here are the relevant bits from the original patch email: >>From patchwork Wed Jul 23 06:45:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] kni: optimizing the rte_kni_rx_burst From: Hemant Agrawal X-Patchwork-Id: 84 Message-Id: <14060979121185-git-send-email-Hemant@freescale.com> To: Date: Wed, 23 Jul 2014 12:15:12 +0530 The current implementation of rte_kni_rx_burst polls the fifo for buffers. Irrespective of success or failure, it allocates the mbuf and try to put them into the alloc_q if the buffers are not added to alloc_q, it frees them. This waste lots of cpu cycles in allocating and freeing the buffers if alloc_q is full. The logic has been changed to: 1. Initially allocand add buffer(burstsize) to alloc_q 2. Add buffers to alloc_q only when you are pulling out the buffers. Signed-off-by: Hemant Agrawal --- lib/librte_kni/rte_kni.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 76feef4..01e85f8 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -263,6 +263,9 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool, ctx->in_use = 1; + /* Allocate mbufs and then put them into alloc_q */ + kni_allocate_mbufs(ctx); + return ctx; fail: @@ -369,8 +372,9 @@ rte_kni_rx_burst(struct rte_kni *kni, struct rte_mbuf **mbufs, unsigned num) { unsigned ret = kni_fifo_get(kni->tx_q, (void **)mbufs, num); - /* Allocate mbufs and then put them into alloc_q */ - kni_allocate_mbufs(kni); + /* If buffers removed, allocate mbufs and then put them into alloc_q */ + if(ret) + kni_allocate_mbufs(kni); return ret; } The patch looks good from a DPDK 1.6r2 viewpoint. We saw the same behavior in our app and ended up avoiding it higher in the stack (in our code). Reviewed-by: Jay Rolette Jay On Wed, Jan 28, 2015 at 10:49 AM, Neil Horman wrote: > On Wed, Jan 28, 2015 at 09:52:48AM -0600, Jay Rolette wrote: > > There's a fairly old KNI patch (http://dpdk.org/dev/patchwork/patch/84/) > > that I reviewed, but I'm not seeing how to submit my "Reviewed-by" when I > > don't have any of the emails from the patch in my mail client. > > > > I can copy the text from the 'mbox' link in Patchwork into an email, but > > I'm guessing that may not make the patch toolchain happy. > > > > What's the right way to do this? > > > Just grab the message id from the patchwork site, and list it in the > envelope > headers in-reply-to: field when you respond. You won't have the rest of > the > conversation field in the thread, but you will respond properly to the > thread, > and patchwork will pick up the ACK > Neil > > > Thanks, > > Jay > > >