From: "Li, WenjieX A" <wenjiex.a.li@intel.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: Olivier Matz <olivier.matz@6wind.com>,
Andrew Rybchenko <arybchenko@solarflare.com>,
"david.marchand@redhat.com" <david.marchand@redhat.com>,
"stable@dpdk.org" <stable@dpdk.org>,
"Chen, BoX C" <box.c.chen@intel.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 2/2] mempool: remove check for bad IOVA when populating
Date: Tue, 19 Nov 2019 01:45:10 +0000 [thread overview]
Message-ID: <8688172CD5C0B74590FAE19D9579F94B537E95DE@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <d541158e2c590c0d3e1a985e2bbea4c236da1f9f.1573739893.git.anatoly.burakov@intel.com>
Tested-by: Chen, BoX C <box.c.chen@intel.com>
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Anatoly Burakov
> Sent: Thursday, November 14, 2019 9:58 PM
> To: dev@dpdk.org
> Cc: Olivier Matz <olivier.matz@6wind.com>; Andrew Rybchenko
> <arybchenko@solarflare.com>; david.marchand@redhat.com; stable@dpdk.org
> Subject: [dpdk-stable] [PATCH 2/2] mempool: remove check for bad IOVA when
> populating
>
> Currently, mempool will check if IOVA is bad for a segment, and reject the IOVA
> if hugepages are also enabled. This check is wrong because now that we have
> external memory segments, they are allowed to have their IOVA's to be invalid.
> This check also doesn't make much sense in the first place, because the
> following code can handle bad IOVA's perfectly well (and in fact, this check is
> not triggering a failure when --no-huge option is enabled), so there is not much
> sense to check for this in the first place.
>
> Fixes: 950e8fb4e194 ("mem: allow registering external memory areas")
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>
> Notes:
> An alternative implementation would be to add a socket ID check to see
> if the memory being allocated from belongs to an external segment.
>
> lib/librte_mempool/rte_mempool.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/lib/librte_mempool/rte_mempool.c
> b/lib/librte_mempool/rte_mempool.c
> index 8da2e471c7..78d8eb941e 100644
> --- a/lib/librte_mempool/rte_mempool.c
> +++ b/lib/librte_mempool/rte_mempool.c
> @@ -390,11 +390,6 @@ rte_mempool_populate_virt(struct rte_mempool *mp,
> char *addr,
>
> iova = get_iova(addr + off);
>
> - if (iova == RTE_BAD_IOVA && rte_eal_has_hugepages()) {
> - ret = -EINVAL;
> - goto fail;
> - }
> -
> /* populate with the largest group of contiguous pages */
> for (phys_len = RTE_MIN(
> (size_t)(RTE_PTR_ALIGN_CEIL(addr + off + 1, pg_sz) -
> --
> 2.17.1
next prev parent reply other threads:[~2019-11-19 1:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 13:58 [dpdk-dev] [PATCH 1/2] mempool: use actual IOVA addresses " Anatoly Burakov
2019-11-14 13:58 ` [dpdk-dev] [PATCH 2/2] mempool: remove check for bad IOVA " Anatoly Burakov
2019-11-15 8:48 ` Olivier Matz
2019-11-19 1:45 ` Li, WenjieX A [this message]
2019-11-15 8:46 ` [dpdk-dev] [PATCH 1/2] mempool: use actual IOVA addresses " Olivier Matz
2019-11-15 10:12 ` Burakov, Anatoly
2019-11-19 1:45 ` [dpdk-dev] [dpdk-stable] " Li, WenjieX A
2019-11-19 20:56 ` [dpdk-dev] " David Marchand
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=8688172CD5C0B74590FAE19D9579F94B537E95DE@SHSMSX103.ccr.corp.intel.com \
--to=wenjiex.a.li@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=arybchenko@solarflare.com \
--cc=box.c.chen@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=stable@dpdk.org \
/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).