From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx01.arubanetworks.com (mx01.arubanetworks.com [104.36.248.59]) by dpdk.org (Postfix) with ESMTP id 209E136E for ; Tue, 22 Sep 2015 07:10:16 +0200 (CEST) X-ASG-Debug-ID: 1442898612-03d124107118b50001-TfluYd Received: from sjc-exch10hc-01.arubanetworks.com ([10.1.8.45]) by mx01.arubanetworks.com with ESMTP id ELaCZLMuesm6DAFS (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 21 Sep 2015 22:10:12 -0700 (PDT) X-Barracuda-Envelope-From: vmohare@arubanetworks.com Received: from BOREAL.arubanetworks.com ([::1]) by sjc-exch10hc-01.arubanetworks.com ([fe80::58e7:e72c:3b0d:5534%11]) with mapi id 14.03.0158.001; Mon, 21 Sep 2015 22:10:12 -0700 From: Vithal Mohare To: "dev@dpdk.org" Thread-Topic: mbuf pool and ring size... X-ASG-Orig-Subj: mbuf pool and ring size... Thread-Index: AdD080TygcV1rDt1SgyS0Z2bzas+lw== Date: Tue, 22 Sep 2015 05:10:12 +0000 Message-ID: <98DB008FA2AC6644B40AD8C766FAB271020CB4B3FE@BOREAL.arubanetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.104.110] MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[10.1.8.45] X-Barracuda-Start-Time: 1442898612 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: https://mx01.arubanetworks.com:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at arubanetworks.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=7.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.22775 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] mbuf pool and ring size... 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: Tue, 22 Sep 2015 05:10:16 -0000 Hi, While creating mbuf pool, suppose if mbuf-pool size passed to DPDK API is a= lready pow-of-2 [ rte_mempool_create()-->rte_mempool_xmem_create()]. Then= , noticed that, corresponding size of the ring created for this pool will b= e double the size of mbuf-pool. This is because of below code snippet: rte_mempool_xmem_create(...) { .... r =3D rte_ring_create(rg_name, rte_align32pow2(n+1), socket_id, rg_flags); = <<<<<<<< Notice that its 'n+1' here, rte_align32pow2(n+1) .... } Question: why is this 'n+1'? Shouldn't this be just 'n'? Thanks, -Vithal