From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; Mon, 23 May 2016 19:14:37 +0200 (CEST) Received: by mail-pa0-f65.google.com with SMTP id f8so6698074pag.0 for ; 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 To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Alex Wang 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 17:14:38 -0000 From: Alex Wang 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 Acked-by: Ferruh Yigit --- lib/librte_kni/rte_kni.h | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.1.4