From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: <dev@dpdk.org>, <santosh.shukla@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH v2] mbuf: use pktmbuf helper to create the pool
Date: Thu, 2 Feb 2017 01:01:46 +0530 [thread overview]
Message-ID: <9b0e2213-e294-8224-faff-2af5b4dfc91e@nxp.com> (raw)
In-Reply-To: <20170131105535.2831ac3d@platinum>
On 1/31/2017 3:25 PM, Olivier Matz wrote:
> 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?
>
I agree, I will send the next version.
> 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-02-01 19:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 18:42 [dpdk-dev] [PATCH] " 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 ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2017-01-31 9:55 ` Olivier Matz
2017-02-01 19:31 ` Hemant Agrawal [this message]
2017-02-14 22:00 ` [dpdk-dev] [PATCH v3] " Hemant Agrawal
2017-03-14 9:14 ` [dpdk-dev] [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=9b0e2213-e294-8224-faff-2af5b4dfc91e@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.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 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).