From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Olivier Matz <olivier.matz@6wind.com>, <dev@dpdk.org>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] mempool: fix alignment of memzone length when populating
Date: Mon, 7 May 2018 11:30:57 +0300 [thread overview]
Message-ID: <0797b346-61e4-53d0-691a-147d8f2be989@solarflare.com> (raw)
In-Reply-To: <20180507081801.15050-1-olivier.matz@6wind.com>
On 05/07/2018 11:18 AM, Olivier Matz wrote:
> When populating a mempool with the default function, if there is not
> enough virtually contiguous memory for the whole mempool, it will be
> populated with several chunks. A chunk of the maximum available length
> is requested with:
>
> mz = rte_memzone_reserve_aligned(..., len=0, ..., align=x)
>
> If align is smaller than the page size, the address and the length of
> the memzone may not be a multiple of the page size. This makes
> rte_mempool_populate_virt() to fail because it requires them to be
> page-aligned. This patch fixes that.
>
> The problem can be reproduced easily by allocating more than available
> memory:
> ./build/app/testpmd -l 0,1 -- --total-num-mbufs=65536
> ...
> Cause: Creation of mbuf pool for socket 0 failed: Invalid argument
>
> After the patch, the error code is correct:
> ./build/app/testpmd -l 0,1 -- --total-num-mbufs=65536
> ...
> Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> Fixes: ba0009560c30 ("mempool: support new allocation methods")
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
next prev parent reply other threads:[~2018-05-07 8:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 20:13 [dpdk-dev] [PATCH] " Olivier Matz
2018-05-03 8:03 ` Burakov, Anatoly
2018-05-03 9:34 ` Andrew Rybchenko
2018-05-03 10:04 ` Olivier Matz
2018-05-07 8:18 ` [dpdk-dev] [PATCH v2] " Olivier Matz
2018-05-07 8:30 ` Andrew Rybchenko [this message]
2018-05-08 13:59 ` 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=0797b346-61e4-53d0-691a-147d8f2be989@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.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).