DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ranjit Menon <ranjit.menon@intel.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Fady Bader <fady@mellanox.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <tbashar@mellanox.com>,
	<talshn@mellanox.com>, <yohadt@mellanox.com>,
	<harini.ramakrishnan@microsoft.com>, <ocardona@microsoft.com>,
	<pallavi.kadam@intel.com>, <olivier.matz@6wind.com>,
	<arybchenko@solarflare.com>, <mdr@ashroe.eu>,
	<nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/4] mempool: use generic memory management
Date: Mon, 1 Jun 2020 13:47:04 -0700	[thread overview]
Message-ID: <059d7ca6-4de6-a5cd-9182-a6bda70af470@intel.com> (raw)
In-Reply-To: <20200601225921.371ebfa6@sovereign>

On 6/1/2020 12:59 PM, Dmitry Kozlyuk wrote:
> On Mon,  1 Jun 2020 13:31:37 +0300
> Fady Bader <fady@mellanox.com> wrote:
>
> [snip]
>>   /* populate the mempool with an anonymous mapping */
>> @@ -740,20 +739,20 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
>>   	}
>>   
>>   	/* get chunk of virtually continuous memory */
>> -	addr = mmap(NULL, size, PROT_READ | PROT_WRITE,
>> -		MAP_SHARED | MAP_ANONYMOUS, -1, 0);
>> -	if (addr == MAP_FAILED) {
>> +	addr = rte_mem_map(NULL, size, RTE_PROT_READ | RTE_PROT_WRITE,
>> +		RTE_MAP_SHARED | RTE_MAP_ANONYMOUS, -1, 0);
>> +	if (addr == NULL) {
>>   		rte_errno = errno;
> rte_mem_map() sets rte_errno, on Windows using errno here is invalid.
>
>>   		return 0;
>>   	}
>>   	/* can't use MMAP_LOCKED, it does not exist on BSD */
>> -	if (mlock(addr, size) < 0) {
>> +	if (rte_mem_lock(addr, size) < 0) {
>>   		rte_errno = errno;
> Same as above.
>
> [snip]
>
> Two more things:
>
> 1. What do you think about changing rte_ to rte_eal_ prefix for memory
> management wrappers in MM series as Andrew Rybchenko suggested for v1? Since
> the functions are DPDK-internal, this sounds reasonable to me.

I fully support this.

ranjit m.



  reply	other threads:[~2020-06-01 20:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 10:31 [dpdk-dev] [PATCH v2 0/4] build mempool on Windows Fady Bader
2020-06-01 10:31 ` [dpdk-dev] [PATCH v2 1/4] eal: disable function versioning " Fady Bader
2020-06-01 19:55   ` Neil Horman
2020-06-01 21:46     ` [dpdk-dev] [EXTERNAL] " Omar Cardona
2020-06-02 10:27       ` Neil Horman
2020-06-02 10:40         ` Thomas Monjalon
2020-06-11 10:09           ` Kinsella, Ray
2020-06-01 10:31 ` [dpdk-dev] [PATCH v2 2/4] mempool: use generic memory management Fady Bader
2020-06-01 19:59   ` Dmitry Kozlyuk
2020-06-01 20:47     ` Ranjit Menon [this message]
2020-06-01 21:14     ` Thomas Monjalon
2020-06-02  7:40       ` Andrew Rybchenko
2020-06-01 10:31 ` [dpdk-dev] [PATCH v2 3/4] eal: export needed functions for mempool Fady Bader
2020-06-01 10:31 ` [dpdk-dev] [PATCH v2 4/4] mempool: mempool build on Windows Fady Bader
2020-06-02  7:41   ` Andrew Rybchenko

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=059d7ca6-4de6-a5cd-9182-a6bda70af470@intel.com \
    --to=ranjit.menon@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=fady@mellanox.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=mdr@ashroe.eu \
    --cc=nhorman@tuxdriver.com \
    --cc=ocardona@microsoft.com \
    --cc=olivier.matz@6wind.com \
    --cc=pallavi.kadam@intel.com \
    --cc=talshn@mellanox.com \
    --cc=tbashar@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=yohadt@mellanox.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).