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 4679C42220 for ; Fri, 1 Sep 2023 15:08:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0BB140285; Fri, 1 Sep 2023 15:08:13 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 657294014F for ; Fri, 1 Sep 2023 15:08:12 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 612445C00D6; Fri, 1 Sep 2023 09:08:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 01 Sep 2023 09:08:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1693573691; x=1693660091; bh=jbs4kfUjKKPSWz9XBrlwp+Pxn5wDTLc+QMX 50yOxKHg=; b=oCYckQGLMKXuK53+rg0Puxvd3pHF49Bf4Ep4RmUH6OdvnZJwSqT zztLt6HyxKaIcqWH6h0vJvpEqCaT132Zdhu92ZoG0j+0Fzy349Fb0Pr2RZToNq/o wlL0rXfBF80PxqoKLupPy3uEoqxVg5eg0BkVA2RkcYH7rTbDgh9mhuDBRskrxNGO meCdA0/6e45a/ojtqUen/pt7gcBHvX10kzdvjGAwCsRg6uiAnA/BZKIhDNfhT29/ QkLix3+RE1Anr+iSn0E4fVrdT3jXy2d8RJ7XWDiCrW3e7bDIvk3Ns509ajFQfHKg wGgoxm8bsuEwWPQpqUoJXmbAO4Fm6Fd03Xw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1693573691; x=1693660091; bh=jbs4kfUjKKPSWz9XBrlwp+Pxn5wDTLc+QMX 50yOxKHg=; b=qWC3dwgtt3W6w0gKXe2P5WGgdeUJpoEhDz1ZfizqdJlVFGDd1sJ bE0LIn1c2HL9sPxDfE+85xa4R8XbS2rPlA9Qnq/zzSoPtsRZRbJAoGyAmBoOGHJz J1l02pldPeSKZtzQRz7cLC2numN6pHG6PMYbqTpz0zMWdfMW0mSJScfuJCiv+mPn f+CnW2+um9mEcWDfl6oBOJQR/svrl6dy12ARLP+DVFW+IBTlyt9V6K8/IapaV3+s WrdqhkMsxdJ8sHrc2jGbUaEntOuyhOD+naV0xqA/WoOQBZoHWflZlMQpTL9twmBV SOz/aUYqkyVmpqoCvIiRPQDwa5KtpEQmyrA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegvddgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeejjefffffgffekfefflefgkeelteejffelledugefhheelffet heevudffudfgvdenucffohhmrghinhepughpughkrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Sep 2023 09:08:10 -0400 (EDT) From: Thomas Monjalon To: omer yamac Cc: users@dpdk.org Subject: Re: Direct Mem Pool vs Indirect mem pool creation Date: Fri, 01 Sep 2023 15:08:06 +0200 Message-ID: <14989106.JCcGWNJJiE@thomas> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org 01/09/2023 14:47, omer yamac: > Hello, > > I need clarification while creating direct/indirect buffers for mbuf. I > couldn't find exact documentation, and I just looked over the fragmentation > test case and saw that two pools were created. One is a > direct pool, and the other is an indirect pool. Here are the methods to > create pools: > direct_pool = rte_pktmbuf_pool_create("FRAG_D_MBUF_POOL", > NUM_MBUFS, BURST, 0, > RTE_MBUF_DEFAULT_BUF_SIZE, > SOCKET_ID_ANY); > indirect_pool = rte_pktmbuf_pool_create("FRAG_I_MBUF_POOL", > NUM_MBUFS, BURST, 0, > 0, SOCKET_ID_ANY) > > I couldn't see the exact difference. Just the "data_room_size" parameter is > different. If this parameter is 0, then is the pool indirect? A pool is neither direct or indirect, it is just a pool of buffers with a defined size for all buffers of a pool. You are free to create any pool for your needs. Now if you create a pool of buffers with size 0, we can expect you will save some data elsewhere, using rte_pktmbuf_attach_extbuf() for instance. More explanations can be found in the doc: https://doc.dpdk.org/guides/prog_guide/mbuf_lib.html#direct-and-indirect-buffers