Message ID | 1463815522-27916-2-git-send-email-ee07b291@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 362045A40; Mon, 23 May 2016 18:41:40 +0200 (CEST) Received: from mail-pa0-f65.google.com (mail-pa0-f65.google.com [209.85.220.65]) by dpdk.org (Postfix) with ESMTP id 38C705A36 for <dev@dpdk.org>; Mon, 23 May 2016 18:41:38 +0200 (CEST) Received: by mail-pa0-f65.google.com with SMTP id rw9so18533056pab.2 for <dev@dpdk.org>; Mon, 23 May 2016 09:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o99hnAoacoDjpUr1s+FP8tu1tLd3fjgtCAs3Px9Vv+4=; b=Rs062gNztOtRNYNFdbwXkmOclKsMown7qf87PvApC0h23/zliFqxtdLF7rFNRJ2iB3 I20Z0ZJEPnMwMZzEBFWo6ShwTQq0zczneq+g+/AP2+x4MMwBtAeXbDb4Nnn64ONUQPM1 vM7Pnd5EUsvM161kM8ohfgJ4q3XfHouxVDoL0rUoF8rVQ0rBaliHVResZFTfe8u9FKPB 0/0whKz04gsccON8IbFhTu6mIiF+Ihwr5BHJMtIL9CqCn51hD0tFdasnNcy0nCShc1cO dflO3Xj2MfeijNVQebLWIACj7i2vWGsWKg3s3P74rtHibLFUUW4LnTGJ/v1pA1yjodAI W21Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=o99hnAoacoDjpUr1s+FP8tu1tLd3fjgtCAs3Px9Vv+4=; b=F6S/ooF1kWl2Y7hF9tV6BGraXFznQIr5nIEL2tgjbog88M4OZKuQlVr2/IB7sxI1uB Bbro8NUH43B1s1r3LohsnnFzq/uPyqH9vDw0xYdL4tZ1LdWV7FhxEpS95d7O8zprZEZ7 u3TAxFo9LqndDC2uivxzbKfBkwySHL8h5W9fO3gWpshti2pPEG1CPnV3xzgiukdfqnHM XO6sTiNixc3l0EOW4EZslP3PTmYCAHhTqueAARkgXS0Q7KjB/qbHxKE44cMCpZmWAP+O FdU0JFp9EEYnx49q1p/f3oQZddiIZzGlRc/XLuVb9LVuF8ZSIVzahYQ50ukOwmt7VfmN tjEw== X-Gm-Message-State: AOPr4FUphq1Zn7iOB6Zs4ODP15g4DOSpsy2HIGJvj52bLeIGfCGF/lCwcdZydqE4XhzJqw== X-Received: by 10.66.118.166 with SMTP id kn6mr28731878pab.33.1464021697497; Mon, 23 May 2016 09:41:37 -0700 (PDT) Received: from localhost.localdomain ([50.242.71.57]) by smtp.gmail.com with ESMTPSA id 5sm47858112pfi.91.2016.05.23.09.41.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 May 2016 09:41:37 -0700 (PDT) From: Alex Wang <ee07b291@gmail.com> To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Alex Wang <alex@awakenetworks.com> Date: Sat, 21 May 2016 00:25:22 -0700 Message-Id: <1463815522-27916-2-git-send-email-ee07b291@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1463815522-27916-1-git-send-email-ee07b291@gmail.com> References: <1463815522-27916-1-git-send-email-ee07b291@gmail.com> Subject: [dpdk-dev] [PATCH 2/2 v2] kni: Add documentation for the mempool capacity X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
ALeX Wang
May 21, 2016, 7:25 a.m. UTC
From: Alex Wang <alex@awakenetworks.com> Function like 'rte_kni_rx_burst()' keeps allocating 'MAX_MBUF_BURST_NUM' mbufs to kni fifo queue unless the queue's capacity ('KNI_FIFO_COUNT_MAX') is reached. So, if the mempool is under-provisioned, user may run into "Out of Memory" logs from KNI code. This commit documents the need to provision mempool capacity of more than "2 x KNI_FIFO_COUNT_MAX" for each KNI interface. Signed-off-by: Alex Wang <alex@awakenetworks.com> --- lib/librte_kni/rte_kni.h | 3 +++ 1 file changed, 3 insertions(+)
Comments
On 5/21/2016 8:25 AM, Alex Wang wrote: > From: Alex Wang <alex@awakenetworks.com> > > Function like 'rte_kni_rx_burst()' keeps > allocating 'MAX_MBUF_BURST_NUM' mbufs to > kni fifo queue unless the queue's capacity > ('KNI_FIFO_COUNT_MAX') is reached. So, if > the mempool is under-provisioned, user may > run into "Out of Memory" logs from KNI code. > This commit documents the need to provision > mempool capacity of more than > "2 x KNI_FIFO_COUNT_MAX" for each KNI interface. > > Signed-off-by: Alex Wang <alex@awakenetworks.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
On 5/23/2016 6:00 PM, Ferruh Yigit wrote: > On 5/21/2016 8:25 AM, Alex Wang wrote: >> From: Alex Wang <alex@awakenetworks.com> >> >> Function like 'rte_kni_rx_burst()' keeps >> allocating 'MAX_MBUF_BURST_NUM' mbufs to >> kni fifo queue unless the queue's capacity >> ('KNI_FIFO_COUNT_MAX') is reached. So, if >> the mempool is under-provisioned, user may >> run into "Out of Memory" logs from KNI code. >> This commit documents the need to provision >> mempool capacity of more than >> "2 x KNI_FIFO_COUNT_MAX" for each KNI interface. >> >> Signed-off-by: Alex Wang <alex@awakenetworks.com> > > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> > Hi Alex, This is detail but I just recognized patch subject after tag starts with uppercase. Would you mind sending another patch? You can keep my ack with it. Thanks, ferruh
Shoooot, sorry for missing that, sending V3, On Mon, May 23, 2016 at 10:10 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote: > On 5/23/2016 6:00 PM, Ferruh Yigit wrote: > > On 5/21/2016 8:25 AM, Alex Wang wrote: > >> From: Alex Wang <alex@awakenetworks.com> > >> > >> Function like 'rte_kni_rx_burst()' keeps > >> allocating 'MAX_MBUF_BURST_NUM' mbufs to > >> kni fifo queue unless the queue's capacity > >> ('KNI_FIFO_COUNT_MAX') is reached. So, if > >> the mempool is under-provisioned, user may > >> run into "Out of Memory" logs from KNI code. > >> This commit documents the need to provision > >> mempool capacity of more than > >> "2 x KNI_FIFO_COUNT_MAX" for each KNI interface. > >> > >> Signed-off-by: Alex Wang <alex@awakenetworks.com> > > > > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> > > > > Hi Alex, > > This is detail but I just recognized patch subject after tag starts with > uppercase. Would you mind sending another patch? You can keep my ack > with it. > > Thanks, > ferruh >
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index 25fa45e..ac11148 100644 --- a/lib/librte_kni/rte_kni.h +++ b/lib/librte_kni/rte_kni.h @@ -113,6 +113,9 @@ extern void rte_kni_init(unsigned int max_kni_ifaces); * The rte_kni_alloc shall not be called before rte_kni_init() has been * called. rte_kni_alloc is thread safe. * + * The mempool should have capacity of more than "2 x KNI_FIFO_COUNT_MAX" + * elements for each KNI interface allocated. + * * @param pktmbuf_pool * The mempool for allocting mbufs for packets. * @param conf