Message ID | 1463817516-1752-2-git-send-email-ee07b291@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Thomas Monjalon |
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 D8C1E5A36; Mon, 23 May 2016 19:14:38 +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 BADFD5A30 for <dev@dpdk.org>; Mon, 23 May 2016 19:14:37 +0200 (CEST) Received: by mail-pa0-f65.google.com with SMTP id f8so6698074pag.0 for <dev@dpdk.org>; Mon, 23 May 2016 10:14:37 -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=OROPWAUpEk3ljGM5jx2KjLqjyeg+8Ozm07ZKXD6c3bk=; b=uH/wrZzXLsuykfEQ42IzqMavR6MLwbFPlmupWUno/uGvj7Xf/tIifM+bJmkP50IfaP lIwYnR9qC2vg39Hfbb0f1qTnTXQ0U9TB9HYoxXBYIvQKGSIXq8w0J430F6UqCYJgCsCR 7NRTjZsfr5/YOxnv55smYDdoDVAx3DzDgjt+6LKVqlN30rg7u8EifsGT7rTfPXXJbu0+ k3KIxHg+mAVqMP84PeW9rP0iOutQeTngjB2m+RiXS06F41GETwfC646vON7ulP27hOoA Q9zRBb6u37tq8l/gK41zSbE3D93RA4RzAJfdN0wdlpSzj5qJ38WJyjW4dM/KCI+YCUG+ x/Ig== 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=OROPWAUpEk3ljGM5jx2KjLqjyeg+8Ozm07ZKXD6c3bk=; b=PobmKCtCMs1QlssYFMWjh3+lWcf+vZGJpYaAYnWXDcwMOmulP3n8NVPBVU3qgJ7nLu C04GkYeV4bJplBr+fWTlmZw3kwgi5rzehrAc8GLgLnGsScjtWEszDWxZgNsHQ4lu0PV6 dhwcL/rVncUL7Q69lO89DkaIuODAQsoobrkC9eBXPnwpqlj/ruMc080QqDUDAFvnJA17 xtlEX2vLQ141CsuwfW0oxqmjHyefwTfvHjyaj0LHGYYqmS/Y0JabFtwueRtpGXK7QvO6 rRZeXa1qyKhfphwdxmMXjS3Laxkc59RZ2t3lIc/genPYOFQ4UXeyqFshgLw2A/c1TdYn a+HQ== X-Gm-Message-State: AOPr4FWqLLp2hBRwC7Jy56awMibSYIMFJgLN2sQlbUkC46+Gxm+8ShGxGDDjgJoQ2CiP5Q== X-Received: by 10.66.190.131 with SMTP id gq3mr28890361pac.42.1464023676985; Mon, 23 May 2016 10:14:36 -0700 (PDT) Received: from localhost.localdomain ([50.242.71.57]) by smtp.gmail.com with ESMTPSA id e184sm48022372pfe.14.2016.05.23.10.14.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 May 2016 10:14:36 -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:58:36 -0700 Message-Id: <1463817516-1752-2-git-send-email-ee07b291@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1463817516-1752-1-git-send-email-ee07b291@gmail.com> References: <1463817516-1752-1-git-send-email-ee07b291@gmail.com> Subject: [dpdk-dev] [PATCH 2/2 v3] 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:58 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> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> --- lib/librte_kni/rte_kni.h | 3 +++ 1 file changed, 3 insertions(+)
Comments
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alex Wang > Sent: Saturday, May 21, 2016 8:59 AM > To: dev@dpdk.org > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Alex Wang > <alex@awakenetworks.com> > Subject: [dpdk-dev] [PATCH 2/2 v3] kni: add documentation for the mempool > capacity > > 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> Acked-by: John McNamara <john.mcnamara@intel.com>
Just to confirm, should I do anything before it gets merged? On Thu, Jun 9, 2016 at 5:03 AM, Mcnamara, John <john.mcnamara@intel.com> wrote: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alex Wang > > Sent: Saturday, May 21, 2016 8:59 AM > > To: dev@dpdk.org > > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Alex Wang > > <alex@awakenetworks.com> > > Subject: [dpdk-dev] [PATCH 2/2 v3] kni: add documentation for the mempool > > capacity > > > > 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> > > Acked-by: John McNamara <john.mcnamara@intel.com> > >
> Just to confirm, should I do anything before it gets merged?
No. Looks good to me. Now you just need to wait. :-)
John.
> > 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> > > Acked-by: John McNamara <john.mcnamara@intel.com> Applied, thanks
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