DPDK usage discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: omer yamac <aomeryamac@gmail.com>
Cc: users@dpdk.org
Subject: Re: Direct Mem Pool vs Indirect mem pool creation
Date: Fri, 01 Sep 2023 15:08:06 +0200	[thread overview]
Message-ID: <14989106.JCcGWNJJiE@thomas> (raw)
In-Reply-To: <CA+sj1i9PB4zEXJx1UqfJiSqm65YeRHvuQQQiTyAHKqKscCuB8Q@mail.gmail.com>

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



  reply	other threads:[~2023-09-01 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 12:47 omer yamac
2023-09-01 13:08 ` Thomas Monjalon [this message]
2023-09-01 13:31   ` omer yamac
2023-09-01 21:30     ` Abdullah Ömer Yamaç

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14989106.JCcGWNJJiE@thomas \
    --to=thomas@monjalon.net \
    --cc=aomeryamac@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).