DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dkozlyuk@oss.nvidia.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, YuX Jiang <yux.jiang@intel.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH] app/test: fix mempool test failure on FreeBSD
Date: Fri, 29 Oct 2021 09:37:03 +0000	[thread overview]
Message-ID: <CH0PR12MB50913535C6C1BC63721B251EB9879@CH0PR12MB5091.namprd12.prod.outlook.com> (raw)
In-Reply-To: <YXvAJi0gsMeWb3EQ@platinum>



> -----Original Message-----
> From: Olivier Matz <olivier.matz@6wind.com>
> Sent: 29 октября 2021 г. 12:35
> To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> Cc: dev@dpdk.org; YuX Jiang <yux.jiang@intel.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>
> Subject: Re: [PATCH] app/test: fix mempool test failure on FreeBSD
> 
> External email: Use caution opening links or attachments
> 
> 
> Hi Dmitry,
> 
> On Fri, Oct 29, 2021 at 11:40:50AM +0300, Dmitry Kozlyuk wrote:
> > FreeBSD EAL does not implement rte_mem_virt2iova()
> > that was used in mempool_autotest, causing it to fail:
> >
> >     EAL: Test assert
> test_mempool_flag_non_io_unset_when_populated_with_valid_iova
> >     line 781 failed: Cannot get IOVA
> >     test failed at test_mempool():1030
> >     Test Failed
> >
> > Change unit test to use rte_memzone_reserve() to allocate memory,
> > which allows to obtain IOVA directly.
> >
> > Bugzilla ID: 863
> > Fixes: 11541c5c81dd ("mempool: add non-IO flag")
> >
> > Reported-by: YuX Jiang <yux.jiang@intel.com>
> > Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> 
> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
> 
> However, I launched the test like this and it failed:
> 
> $ ./build/app/test/dpdk-test --no-huge -m 512
> EAL: Detected CPU lcores: 12
> EAL: Detected NUMA nodes: 1
> EAL: Detected shared linkage of DPDK
> EAL: Multi-process socket /run/user/12489/dpdk/rte/mp_socket
> EAL: Selected IOVA mode 'VA'
> APP: HPET is not enabled, using TSC as default timer
> RTE>>mempool_autotest
> (...)
> EAL: Test assert test_mempool_events line 585 failed: Failed to populate
> mempool empty1: Success
> test failed at test_mempool():1019
> Test Failed
> 
> It appears that the failure comes from:
> 
> int
> rte_mempool_populate_anon(struct rte_mempool *mp)
> {
> (...)
>         /* can't use MMAP_LOCKED, it does not exist on BSD */
>         if (rte_mem_lock(addr, size) < 0) {
> =>              rte_mem_unmap(addr, size);
>                 return 0;
>         }
> 
> The errno here is 12 (ENOMEM). This is because of the default ulimit for
> max locked memory: (kbytes, -l) 65536
> 
> If I increase it to 128000, it works.
> 
> Would it make sense to decrease the size of the pools so that we don't
> reach this limit?

Good catch, will send a v2.

> (...)
> > @@ -789,12 +791,12 @@
> test_mempool_flag_non_io_unset_when_populated_with_valid_iova(void)
> >       /*
> >        * Since objects from the pool are never used in the test,
> >        * we don't care for contiguous IOVA, on the other hand,
> > -      * reiuring it could cause spurious test failures.
> > +      * reqiuring it could cause spurious test failures.
> 
> nice try :D

  reply	other threads:[~2021-10-29  9:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  8:40 Dmitry Kozlyuk
2021-10-29  9:34 ` Olivier Matz
2021-10-29  9:37   ` Dmitry Kozlyuk [this message]
2021-11-01  7:36 ` [dpdk-dev] [PATCH v2 0/3] Mempool fixes for FreeBSD Dmitry Kozlyuk
2021-11-01  7:36   ` [dpdk-dev] [PATCH v2 1/3] eal/freebsd: fix IOVA mode selection Dmitry Kozlyuk
2021-11-01 16:21     ` Bruce Richardson
2021-11-01  7:37   ` [dpdk-dev] [PATCH v2 2/3] app/test: fix mempool test on FreeBSD Dmitry Kozlyuk
2021-11-01  7:37   ` [dpdk-dev] [PATCH v2 3/3] app/test: fix mempool test in no-huge mode Dmitry Kozlyuk
2021-11-02 10:08   ` [dpdk-dev] [PATCH v3 0/3] Mempool fixes for FreeBSD Dmitry Kozlyuk
2021-11-02 10:08     ` [dpdk-dev] [PATCH v3 1/3] eal/freebsd: fix IOVA mode selection Dmitry Kozlyuk
2021-11-02 10:08     ` [dpdk-dev] [PATCH v3 2/3] app/test: fix mempool test on FreeBSD Dmitry Kozlyuk
2021-11-02 10:08     ` [dpdk-dev] [PATCH v3 3/3] app/test: fix mempool test in no-huge mode Dmitry Kozlyuk
2021-11-03 17:39     ` [dpdk-dev] [PATCH v3 0/3] Mempool fixes for FreeBSD 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=CH0PR12MB50913535C6C1BC63721B251EB9879@CH0PR12MB5091.namprd12.prod.outlook.com \
    --to=dkozlyuk@oss.nvidia.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=yux.jiang@intel.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).