From: Olivier Matz <olivier.matz@6wind.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: <dev@dpdk.org>, <santosh.shukla@caviumnetworks.com>
Subject: Re: [PATCH v2] mbuf: use pktmbuf helper to create the pool
Date: Tue, 31 Jan 2017 10:55:35 +0100 [thread overview]
Message-ID: <20170131105535.2831ac3d@platinum> (raw)
In-Reply-To: <1484896280-18814-1-git-send-email-hemant.agrawal@nxp.com>
Hi Hemant,
Sorry for the delay.
On Fri, 20 Jan 2017 12:41:20 +0530, Hemant Agrawal
<hemant.agrawal@nxp.com> wrote:
> When possible, replace the uses of rte_mempool_create() with
> the helper provided in librte_mbuf: rte_pktmbuf_pool_create().
>
> This is the preferred way to create a mbuf pool.
>
> This also updates the documentation.
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>
> [...]
>
> --- a/examples/ip_reassembly/main.c
> @@ -909,11 +908,13 @@ struct rte_lpm6_config lpm6_config = {
>
> snprintf(buf, sizeof(buf), "mbuf_pool_%u_%u", lcore, queue);
>
> - if ((rxq->pool = rte_mempool_create(buf, nb_mbuf, MBUF_SIZE,
> 0,
> - sizeof(struct rte_pktmbuf_pool_private),
> - rte_pktmbuf_pool_init, NULL,
> rte_pktmbuf_init, NULL,
> - socket, MEMPOOL_F_SP_PUT |
> MEMPOOL_F_SC_GET)) == NULL) {
> - RTE_LOG(ERR, IP_RSMBL, "mempool_create(%s) failed",
> buf);
> + rxq->pool = rte_pktmbuf_pool_create(buf, nb_mbuf,
> + 0, /* cache size */
> + 0, /* priv size */
> + MBUF_DATA_SIZE, socket);
> + if (rxq->pool == NULL) {
> + RTE_LOG(ERR, IP_RSMBL,
> + "rte_pktmbuf_pool_create(%s) failed", buf);
> return -1;
Here we loose the SP/SC flags. In the ip reassembly example, it looks
there is one mbuf pool per rx core since the beginning (commit
cc8f4d020). It's probably not critical, but I think we should remove
the ip reass part of the patch, what do you think?
Note that this issue was also in my RFC patch, so it's my
mistake :)
Apart from that, the patch looks good.
Thanks
Olivier
next prev parent reply other threads:[~2017-01-31 9:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 18:42 [PATCH] mbuf: use pktmbuf helper to create the pool Hemant Agrawal
2017-01-17 13:31 ` Santosh Shukla
2017-01-18 6:01 ` Hemant Agrawal
2017-01-31 10:32 ` Olivier Matz
2017-01-20 7:11 ` [PATCH v2] " Hemant Agrawal
2017-01-31 9:55 ` Olivier Matz [this message]
2017-02-01 19:31 ` Hemant Agrawal
2017-02-14 22:00 ` [PATCH v3] " Hemant Agrawal
2017-03-14 9:14 ` [PATCH v4] " Olivier Matz
2017-03-15 12:57 ` Thomas Monjalon
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=20170131105535.2831ac3d@platinum \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=santosh.shukla@caviumnetworks.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.