DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>,
	"olivier.matz@6wind.com" <olivier.matz@6wind.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	jerin.jacob@caviumnetworks.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] Revert "eal: fix default mempool ops"
Date: Fri, 2 Feb 2018 02:10:00 +0530	[thread overview]
Message-ID: <20180201203959.wi3e56buepnu3px6@Pavan-LT> (raw)
In-Reply-To: <AM2PR04MB075328F278065579C22D31F189FA0@AM2PR04MB0753.eurprd04.prod.outlook.com>

Hi Hemanth,

	Currently, best_mempool_ops is broken because when
rte_mbuf_user_mempool_ops is invoked it is expected to returns 'NULL' through
internal_config.user_mbuf_pool_ops_name. IMO it is best to create a named
memzone ('mbuf_user_pool_ops') at the end of eal_init and copy mbuf-pool-ops
passed to eal.

`rte_eal_mbuf_default_mempool_ops` is not expected to return 'NULL' would doing
so break the ABI?.

---
/**
 * Get default pool ops name for mbuf
 *
 * @return
 *   returns default pool ops name.
 */
const char *
rte_eal_mbuf_default_mempool_ops(void);
---

IMO creating named mempool at the end of eal_init and changing
`rte_mbuf_user_mempool_ops` as below would be a better solution.

rte_mbuf_user_mempool_ops(void)
{
...
        mz = rte_memzone_lookup("mbuf_user_pool_ops");
        if (mz == NULL)
                return NULL;
	...
}

Thoughts?

Pavan.

On Thu, Feb 01, 2018 at 07:56:47PM +0000, Hemant Agrawal wrote:
> Hi Pavan,
> 	Your patch was breaking the design of the best_mempool_ops and the whole purpose of selection was getting lost.
> I guess you were trying to fix  test_mempool.  I have sent another patch, which fixes that and start using the best mempool ops API
> instead of default mempool ops API.
>
> Regards,
> Hemant
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Hemant Agrawal
> > Sent: Friday, February 02, 2018 1:17 AM
> > To: olivier.matz@6wind.com; pbhagavatula@caviumnetworks.com
> > Cc: thomas@monjalon.net; dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH 1/2] Revert "eal: fix default mempool ops"
> >
> > This reverts commit fe06cb6c54fe5ada299ebba40a382bee37c919f2.
> > ---

  reply	other threads:[~2018-02-01 20:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 19:47 Hemant Agrawal
2018-02-01 19:47 ` [dpdk-dev] [PATCH 2/2] test: use the best mempool ops API to get mbuf pool Hemant Agrawal
2018-02-01 19:56 ` [dpdk-dev] [PATCH 1/2] Revert "eal: fix default mempool ops" Hemant Agrawal
2018-02-01 20:40   ` Pavan Nikhilesh [this message]
2018-02-02  5:43     ` Hemant Agrawal
2018-02-02  8:03 ` [dpdk-dev] [PATCH FIX-OPTION-2 1/2] eal: use named memzone to store user mempool ops name Hemant Agrawal
2018-02-02  8:03   ` [dpdk-dev] [PATCH FIX-OPTION-1] mbuf: fix the logic of user mempool ops API Hemant Agrawal
2018-02-02 13:40     ` Olivier Matz
2018-02-02 13:47       ` Hemant Agrawal
2018-02-06  0:05       ` Thomas Monjalon
     [not found]     ` <BY1PR0701MB1895B37B913A223180EED6D3EAFF0@BY1PR0701MB1895.namprd07.prod.outlook.com>
2018-02-04  6:34       ` [dpdk-dev] Fw: " santosh
2018-02-04 10:27         ` [dpdk-dev] " Hemant Agrawal
2018-02-02  8:03   ` [dpdk-dev] [PATCH FIX-OPTION-2 2/2] mbuf: fix user mempool ops get to use only named memzone Hemant Agrawal
2018-02-02  8:03 ` [dpdk-dev] [PATCH] doc: remove eal API for default mempool ops name Hemant Agrawal
2018-02-02  8:31   ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2018-02-02 14:01     ` Olivier Matz
2018-02-13 11:28       ` Ferruh Yigit
2018-02-14 14:58         ` Thomas Monjalon
2018-02-03 13:28     ` Jerin Jacob

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=20180201203959.wi3e56buepnu3px6@Pavan-LT \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=olivier.matz@6wind.com \
    --cc=thomas@monjalon.net \
    /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).