From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0321BA0524; Thu, 3 Jun 2021 21:01:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B381740FDF; Thu, 3 Jun 2021 21:01:40 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id B406240E78 for ; Thu, 3 Jun 2021 21:01:39 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Thu, 3 Jun 2021 21:01:36 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C61819@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: rte_mempool_create conflicting parameter advice Thread-Index: AddYquCyCVl+a57NSJijCcRof+hLaw== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Olivier Matz" , "Andrew Rybchenko" Cc: Subject: [dpdk-dev] rte_mempool_create conflicting parameter advice X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Olivier, Andrew (Memory pool maintainers) While reviewing documentation for the parameters to = rte_mempool_create(), I noticed these two conflicting recommendations: 1. n (the number of elements in the pool) is advised to be a power of = two minus one. 2. cache_size is advised to have "n modulo cache_size =3D=3D 0". E.g. n could be 0xFFFF, but then n modulo any value cannot be 0. The cache_size parameter description tells what happens when not = following the advice. The n parameter description should also tell what happens when not = following the advice. Furthermore, the documentation for rte_pktmbuf_pool_create() and alike = simply refer to the documentation for rte_mempool_create() regarding the = cache_size parameter, although they copy the documentation regarding the = n parameter. If the cache_size advice is important, it should be copied = rather than simply referred to.