All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fady Bader <fady@mellanox.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Thomas Monjalon <thomas@monjalon.net>,
	Tasnim Bashar <tbashar@mellanox.com>,
	Tal Shnaiderman <talshn@mellanox.com>,
	Yohad Tor <yohadt@mellanox.com>,
	"harini.ramakrishnan@microsoft.com"
	<harini.ramakrishnan@microsoft.com>,
	"ocardona@microsoft.com" <ocardona@microsoft.com>,
	"pallavi.kadam@intel.com" <pallavi.kadam@intel.com>,
	"ranjit.menon@intel.com" <ranjit.menon@intel.com>,
	 "olivier.matz@6wind.com" <olivier.matz@6wind.com>,
	"arybchenko@solarflare.com" <arybchenko@solarflare.com>,
	"mdr@ashroe.eu" <mdr@ashroe.eu>,
	"nhorman@tuxdriver.com" <nhorman@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH v5 2/3] mempool: use generic memory management
Date: Sun, 5 Jul 2020 12:25:40 +0000	[thread overview]
Message-ID: <VI1PR05MB587244B1CC18F8855C709951BF680@VI1PR05MB5872.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20200705150826.30f0b143@sovereign>



> -----Original Message-----
> From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Sent: Sunday, July 5, 2020 3:08 PM
> To: Fady Bader <fady@mellanox.com>
> Cc: dev@dpdk.org; Thomas Monjalon <thomas@monjalon.net>; Tasnim Bashar
> <tbashar@mellanox.com>; Tal Shnaiderman <talshn@mellanox.com>; Yohad Tor
> <yohadt@mellanox.com>; harini.ramakrishnan@microsoft.com;
> ocardona@microsoft.com; pallavi.kadam@intel.com; ranjit.menon@intel.com;
> olivier.matz@6wind.com; arybchenko@solarflare.com; mdr@ashroe.eu;
> nhorman@tuxdriver.com
> Subject: Re: [PATCH v5 2/3] mempool: use generic memory management
> 
> On Sun,  5 Jul 2020 14:46:28 +0300, Fady Bader wrote:
> [snip]
> >  /* populate the mempool with an anonymous mapping */ @@ -740,20
> > +741,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_errno is set by rte_mem_map(), using errno here is incorrect on Windows.

Ok, I'll send a new version soon.

> 
> >  		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;
> 
> Ditto.
> 
> [snip]
> 
> --
> Dmitry Kozlyuk

  reply	other threads:[~2020-07-05 12:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 13:14 [dpdk-dev] [PATCH v4 0/3] build mempool on Windows Fady Bader
2020-07-02 13:14 ` [dpdk-dev] [PATCH v4 1/3] eal: disable function versioning " Fady Bader
2020-07-05 11:46   ` [dpdk-dev] [PATCH v5 0/3] build mempool " Fady Bader
2020-07-05 11:46     ` [dpdk-dev] [PATCH v5 1/3] eal: disable function versioning " Fady Bader
2020-07-06  8:19       ` Bruce Richardson
2020-07-06 10:39         ` Fady Bader
2020-07-05 11:46     ` [dpdk-dev] [PATCH v5 2/3] mempool: use generic memory management Fady Bader
2020-07-05 11:50       ` Andrew Rybchenko
2020-07-05 12:08       ` Dmitry Kozlyuk
2020-07-05 12:25         ` Fady Bader [this message]
2020-07-05 11:46     ` [dpdk-dev] [PATCH v5 3/3] mempool: mempool build on Windows Fady Bader
2020-07-05 12:01       ` David Marchand
2020-07-05 12:24         ` Fady Bader
2020-07-05 13:47     ` [dpdk-dev] [PATCH v6 0/3] build mempool " Fady Bader
2020-07-05 13:47       ` [dpdk-dev] [PATCH v6 1/3] eal: disable function versioning " Fady Bader
2020-07-05 14:36         ` Tal Shnaiderman
2020-07-05 20:23         ` Thomas Monjalon
2020-07-06  7:02           ` Fady Bader
2020-07-05 13:47       ` [dpdk-dev] [PATCH v6 2/3] mempool: use generic memory management Fady Bader
2020-07-05 15:26         ` Dmitry Kozlyuk
2020-07-05 20:08         ` Thomas Monjalon
2020-07-05 13:47       ` [dpdk-dev] [PATCH v6 3/3] mempool: mempool build on Windows Fady Bader
2020-07-05 20:25         ` Thomas Monjalon
2020-07-06 11:32       ` [dpdk-dev] [PATCH v7 0/3] build mempool " Fady Bader
2020-07-06 11:32         ` [dpdk-dev] [PATCH v7 1/3] eal: disable function versioning " Fady Bader
2020-07-06 12:22           ` Bruce Richardson
2020-07-06 23:16             ` Thomas Monjalon
2020-07-06 11:32         ` [dpdk-dev] [PATCH v7 2/3] mempool: use generic memory management Fady Bader
2020-07-06 11:32         ` [dpdk-dev] [PATCH v7 3/3] mempool: mempool build on Windows Fady Bader
2020-07-06 23:29         ` [dpdk-dev] [PATCH v7 0/3] build mempool " Thomas Monjalon
2020-07-02 13:14 ` [dpdk-dev] [PATCH v4 2/3] mempool: use generic memory management Fady Bader
2020-07-03 13:16   ` Olivier Matz
2020-07-02 13:14 ` [dpdk-dev] [PATCH v4 3/3] mempool: mempool build on Windows Fady Bader
2020-07-03 13:17   ` Olivier Matz

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=VI1PR05MB587244B1CC18F8855C709951BF680@VI1PR05MB5872.eurprd05.prod.outlook.com \
    --to=fady@mellanox.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.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=ranjit.menon@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 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.