History log of /dpdk/app/test/test_mempool.c (Results 1 – 25 of 50)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1
# 7be78d02 29-Nov-2021 Josh Soref <[email protected]>

fix spelling in comments and strings

The tool comes from https://github.com/jsoref

Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>


Revision tags: v21.11, v21.11-rc4, v21.11-rc3
# 4a6672c2 12-Nov-2021 Stephen Hemminger <[email protected]>

fix spelling in comments and doxygen

Fix spelling errors in comments including doxygen found using codespell.

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Konstantin Anan

fix spelling in comments and doxygen

Fix spelling errors in comments including doxygen found using codespell.

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>
Acked-by: Vladimir Medvedkin <[email protected]>
Reviewed-by: Honnappa Nagarahalli <[email protected]>
Acked-by: Ray Kinsella <[email protected]>
Acked-by: Cristian Dumitrescu <[email protected]>
Acked-by: Chenbo Xia <[email protected]>

show more ...


Revision tags: v21.11-rc2
# 5b08ac4e 02-Nov-2021 Dmitry Kozlyuk <[email protected]>

test/mempool: fix no-huge mode

Amount of locked memory for regular users is limited,
it is usually 64 KB by default.
Hitting this limit in rte_mempool_populate_anon()
resulted in not populating the

test/mempool: fix no-huge mode

Amount of locked memory for regular users is limited,
it is usually 64 KB by default.
Hitting this limit in rte_mempool_populate_anon()
resulted in not populating the mempool, and a test case failure:

EAL: Test assert test_mempool_events line 585 failed: Failed to populate mempool empty1: Success
test failed at test_mempool():1019
Test Failed

Decrease the amount of mapped anonymous memory to fit the limit.
While there, make all function-local constants lowercase.

Fixes: 11541c5c81dd ("mempool: add non-IO flag")

Reported-by: Olivier Matz <[email protected]>
Signed-off-by: Dmitry Kozlyuk <[email protected]>

show more ...


# 89e94773 02-Nov-2021 Dmitry Kozlyuk <[email protected]>

test/mempool: fix test on FreeBSD

FreeBSD EAL does not implement rte_mem_virt2iova() causing an error:

EAL: Test assert test_mempool_flag_non_io_unset_when_populated_with_valid_iova
line 78

test/mempool: fix test on FreeBSD

FreeBSD EAL does not implement rte_mem_virt2iova() causing an error:

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: Yu Jiang <[email protected]>
Signed-off-by: Dmitry Kozlyuk <[email protected]>

show more ...


Revision tags: v21.11-rc1
# 6fda3ff6 22-Oct-2021 Dmitry Kozlyuk <[email protected]>

mempool: fix non-IO flag inference

When mempool had been created with RTE_MEMPOOL_F_NO_IOVA_CONTIG flag
but later populated with valid IOVA, RTE_MEMPOOL_F_NON_IO was unset,
while it should be kept.

mempool: fix non-IO flag inference

When mempool had been created with RTE_MEMPOOL_F_NO_IOVA_CONTIG flag
but later populated with valid IOVA, RTE_MEMPOOL_F_NON_IO was unset,
while it should be kept. The unit test did not catch this
because rte_mempool_populate_default() it used was populating
with RTE_BAD_IOVA.

Keep setting RTE_MEMPOOL_NON_IO at an empty mempool creation
and add an assert for it in the unit test (remove the separate case).
Do not reset the flag if RTE_MEMPOOL_F_ON_IOVA_CONTIG is set.

Fixes: 11541c5c81dd ("mempool: add non-IO flag")

Signed-off-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# afdaa607 18-Oct-2021 David Marchand <[email protected]>

mempool: accept user flags only

As reported by Dmitry, RTE_MEMPOOL_F_POOL_CREATED is a flag only
manipulated internally.
This flag is not supposed to be requested from an application and would
proba

mempool: accept user flags only

As reported by Dmitry, RTE_MEMPOOL_F_POOL_CREATED is a flag only
manipulated internally.
This flag is not supposed to be requested from an application and would
probably result in an incorrect behavior if an application did pass it.

At least one other internal flag has been added recently and more may be
introduced later.

Rework the check and export a mask of valid user flags for use in the
unit test.

Fixes: b240af8b10f9 ("mempool: enforce valid flags at creation")

Reported-by: Dmitry Kozlyuk <[email protected]>
Signed-off-by: David Marchand <[email protected]>
Acked-by: Olivier Matz <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>

show more ...


# d7203661 19-Oct-2021 Andrew Rybchenko <[email protected]>

mempool: make header size calculation internal

Add RTE_ prefix to helper macro to calculate mempool header size and
make it internal. Old macro is still available, but deprecated.

Signed-off-by: An

mempool: make header size calculation internal

Add RTE_ prefix to helper macro to calculate mempool header size and
make it internal. Old macro is still available, but deprecated.

Signed-off-by: Andrew Rybchenko <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# c47d7b90 19-Oct-2021 Andrew Rybchenko <[email protected]>

mempool: add namespace to flags

Fix the mempool flags namespace by adding an RTE_ prefix to the name.
The old flags remain usable, to be deprecated in the future.

Flag MEMPOOL_F_NON_IO added in the

mempool: add namespace to flags

Fix the mempool flags namespace by adding an RTE_ prefix to the name.
The old flags remain usable, to be deprecated in the future.

Flag MEMPOOL_F_NON_IO added in the release is just renamed to have RTE_
prefix.

Signed-off-by: Andrew Rybchenko <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# 11541c5c 18-Oct-2021 Dmitry Kozlyuk <[email protected]>

mempool: add non-IO flag

Mempool is a generic allocator that is not necessarily used
for device IO operations and its memory for DMA.
Add MEMPOOL_F_NON_IO flag to mark such mempools automatically
a)

mempool: add non-IO flag

Mempool is a generic allocator that is not necessarily used
for device IO operations and its memory for DMA.
Add MEMPOOL_F_NON_IO flag to mark such mempools automatically
a) if their objects are not contiguous;
b) if IOVA is not available for any object.
Other components can inspect this flag
in order to optimize their memory management.

Discussion: https://mails.dpdk.org/archives/dev/2021-August/216654.html

Signed-off-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Matan Azrad <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>

show more ...


# da2b9cb2 18-Oct-2021 Dmitry Kozlyuk <[email protected]>

mempool: add event callbacks

Data path performance can benefit if the PMD knows which memory it will
need to handle in advance, before the first mbuf is sent to the PMD.
It is impractical, however,

mempool: add event callbacks

Data path performance can benefit if the PMD knows which memory it will
need to handle in advance, before the first mbuf is sent to the PMD.
It is impractical, however, to consider all allocated memory for this
purpose. Most often mbuf memory comes from mempools that can come and
go. PMD can enumerate existing mempools on device start, but it also
needs to track creation and destruction of mempools after the forwarding
starts but before an mbuf from the new mempool is sent to the device.

Add an API to register callback for mempool life cycle events:
* rte_mempool_event_callback_register()
* rte_mempool_event_callback_unregister()
Currently tracked events are:
* RTE_MEMPOOL_EVENT_READY (after populating a mempool)
* RTE_MEMPOOL_EVENT_DESTROY (before freeing a mempool)
Provide a unit test for the new API.
The new API is internal, because it is primarily demanded by PMDs that
may need to deal with any mempools and do not control their creation,
while an application, on the other hand, knows which mempools it creates
and doesn't care about internal mempools PMDs might create.

Signed-off-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Matan Azrad <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>

show more ...


# b240af8b 14-Oct-2021 David Marchand <[email protected]>

mempool: enforce valid flags at creation

If we do not enforce valid flags are passed by an application, this
application might face issues in the future when we add more flags.

Signed-off-by: David

mempool: enforce valid flags at creation

If we do not enforce valid flags are passed by an application, this
application might face issues in the future when we add more flags.

Signed-off-by: David Marchand <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Acked-by: Ray Kinsella <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>

show more ...


Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2
# eb9ea11c 20-Jul-2021 Joyce Kong <[email protected]>

test/mempool: remove unused variable for lcores sync

Remove the unused synchro variable as there is no lcores
sync in mempool function test.

Signed-off-by: Joyce Kong <[email protected]>
Reviewed-

test/mempool: remove unused variable for lcores sync

Remove the unused synchro variable as there is no lcores
sync in mempool function test.

Signed-off-by: Joyce Kong <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>

show more ...


Revision tags: v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2
# e1064f80 27-Apr-2021 Olivier Matz <[email protected]>

test/mempool: fix object initializer

The function rte_pktmbuf_init() expects that the mempool private area is
large enough and was previously initialized by rte_pktmbuf_pool_init(),
which is not the

test/mempool: fix object initializer

The function rte_pktmbuf_init() expects that the mempool private area is
large enough and was previously initialized by rte_pktmbuf_pool_init(),
which is not the case.

This causes the function rte_pktmbuf_priv_size() to return an
unpredictable value, and this value is used as a size in a memset.

Replace the mempool object initializer by my_obj_init(), which does not
have this constraint, and fits the needs for this test.

Fixes: 923ceaeac140 ("test/mempool: add unit test cases")
Cc: [email protected]

Reported-by: Wenwu Ma <[email protected]>
Signed-off-by: Olivier Matz <[email protected]>

show more ...


Revision tags: v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2, v20.11-rc1, v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1, v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3
# f2fc83b4 09-Feb-2020 Thomas Monjalon <[email protected]>

replace unused attributes

There is a common macro __rte_unused, avoiding warnings,
which is now used where appropriate for consistency.

Signed-off-by: Thomas Monjalon <[email protected]>


Revision tags: v20.02-rc2, v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2
# b2ca1e1c 04-Nov-2019 Olivier Matz <[email protected]>

test/mempool: fix false positive result

The ret variable, initialized to -1, is changed to 0 during the test,
making the test successful in some cases where it should return a
failure.

Fix this by

test/mempool: fix false positive result

The ret variable, initialized to -1, is changed to 0 during the test,
making the test successful in some cases where it should return a
failure.

Fix this by always using the GOTO_ERR() macro that sets the ret
variable before doing the goto.

Fixes: 923ceaeac140 ("test/mempool: add unit test cases")

Signed-off-by: Olivier Matz <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>

show more ...


Revision tags: v19.11-rc1
# 923ceaea 10-Sep-2019 Pallantla Poornima <[email protected]>

test/mempool: add unit test cases

Added UT to cover below functions:
- rte_mempool_populate_anon(),
- rte_mempool_mem_iter(),

Those additions also cover mempool internals:
rte_mempool_memchunk_anon

test/mempool: add unit test cases

Added UT to cover below functions:
- rte_mempool_populate_anon(),
- rte_mempool_mem_iter(),

Those additions also cover mempool internals:
rte_mempool_memchunk_anon_free() and get_anon_size().

Signed-off-by: Pallantla Poornima <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


Revision tags: v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1, v19.05, v19.05-rc4, v19.05-rc3, v19.05-rc2, v19.05-rc1
# 5fbc1d49 06-Mar-2019 Bruce Richardson <[email protected]>

build/freebsd: rename macro BSDPAPP to FREEBSD

Rename the macro and all instances in DPDK code, but keep a copy of
the old macro defined for legacy code linking against DPDK

Signed-off-by: Bruce Ri

build/freebsd: rename macro BSDPAPP to FREEBSD

Rename the macro and all instances in DPDK code, but keep a copy of
the old macro defined for legacy code linking against DPDK

Signed-off-by: Bruce Richardson <[email protected]>

show more ...


# a9de470c 26-Feb-2019 Bruce Richardson <[email protected]>

test: move to app directory

Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we ca

test: move to app directory

Since all other apps have been moved to the "app" folder, the autotest app
remains alone in the test folder. Rather than having an entire top-level
folder for this, we can move it back to where it all started in early
versions of DPDK - the "app/" folder.

This move has a couple of advantages:
* This reduces clutter at the top level of the project, due to one less
folder.
* It eliminates the separate build task necessary for building the
autotests using make "make test-build" which means that developers are
less likely to miss something in their own compilation tests
* It re-aligns the final location of the test binary in the app folder when
building with make with it's location in the source tree.

For meson builds, the autotest app is different from the other apps in that
it needs a series of different test cases defined for it for use by "meson
test". Therefore, it does not get built as part of the main loop in the
app folder, but gets built separately at the end.

Signed-off-by: Bruce Richardson <[email protected]>

show more ...


Revision tags: v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2, v19.02-rc1, v18.11, v18.11-rc5, v18.11-rc4, v18.11-rc3, v18.11-rc2, v18.11-rc1, v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1, v18.05, v18.05-rc6, v18.05-rc5, v18.05-rc4, v18.05-rc3, v18.05-rc2, v18.05-rc1, v18.02, v18.02-rc4, v18.02-rc3, v18.02-rc2, v18.02-rc1, v17.11, v17.11-rc4, v17.11-rc3, v17.11-rc2, v17.11-rc1, v17.08, v17.08-rc4, v17.08-rc3, v17.08-rc2, v17.08-rc1, v17.05, v17.05-rc4, v17.05-rc3, v17.05-rc2, v17.05-rc1, v17.02, v17.02-rc3, v17.02-rc2, v17.02-rc1, v16.11, v16.11-rc3, v16.11-rc2, v16.11-rc1
# 5ce434a6 03-Oct-2016 Thomas Monjalon <[email protected]>

app/test: add mempool walk

The mempool function rte_mempool_walk was not tested.
It will print the name of all mempools.

Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Olivier

app/test: add mempool walk

The mempool function rte_mempool_walk was not tested.
It will print the name of all mempools.

Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# f0372301 31-Aug-2016 Amine Kherbouche <[email protected]>

remove unused ring includes

This patch removes all unused <rte_ring.h> headers.

Signed-off-by: Amine Kherbouche <[email protected]>


Revision tags: v16.07, v16.07-rc5, v16.07-rc4
# cdc34f87 21-Jul-2016 Santosh Shukla <[email protected]>

app/test: fix mempool freeing

test_mempool func not using pointer variable 'mp_ext' and incorrectly
freed. So removing ptr var. Now freeing mp_stack var.

Fixes: ea151eb48a04 ("app/test: migrate cus

app/test: fix mempool freeing

test_mempool func not using pointer variable 'mp_ext' and incorrectly
freed. So removing ptr var. Now freeing mp_stack var.

Fixes: ea151eb48a04 ("app/test: migrate custom mempool handler to stack handler")

Signed-off-by: Santosh Shukla <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


Revision tags: v16.07-rc3
# 26e09db6 13-Jul-2016 Thomas Monjalon <[email protected]>

app/test: rework command registration

The tests are registered with their command name by adding a structure
to a list. The structure of each test was declared in each test file
and passed to the re

app/test: rework command registration

The tests are registered with their command name by adding a structure
to a list. The structure of each test was declared in each test file
and passed to the register macro.
This rework generate the structure inside the register macro.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Jan Viktorin <[email protected]>

show more ...


Revision tags: v16.07-rc2, v16.07-rc1
# ea151eb4 30-Jun-2016 David Hunt <[email protected]>

app/test: migrate custom mempool handler to stack handler

After introducing the stack handler in the previous commit,
we now have very similar code to the custom handler in test_mempool.c,
which cre

app/test: migrate custom mempool handler to stack handler

After introducing the stack handler in the previous commit,
we now have very similar code to the custom handler in test_mempool.c,
which creates a custom mempool based on simple mallocs.
The stack handler is a cleaner example of adding a new mempool handler,
so this commit replaces the custom handler test with a stack
handler test, and removes the custom handler code.

Signed-off-by: David Hunt <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# a0fd91ce 30-Jun-2016 Bruce Richardson <[email protected]>

mempool: rename functions with confusing names

The mempool_count and mempool_free_count behaved contrary to what their
names suggested. The free_count function actually returned the number of
elemen

mempool: rename functions with confusing names

The mempool_count and mempool_free_count behaved contrary to what their
names suggested. The free_count function actually returned the number of
elements that were allocated from the pool, not the number unallocated as
the name implied.

Fix this by introducing two new functions to replace the old ones,
* rte_mempool_avail_count to replace rte_mempool_count
* rte_mempool_in_use_count to replace rte_mempool_free_count

In this patch, the new functions are added, and the old ones are marked
as deprecated. All apps and examples that use the old functions are
updated to use the new functions.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Bruce Richardson <[email protected]>

show more ...


# 4b506275 28-Jun-2016 Lazaros Koromilas <[email protected]>

mempool: allow user-owned cache

The mempool cache is only available to EAL threads as a per-lcore
resource. Change this so that the user can create and provide their own
cache on mempool get and put

mempool: allow user-owned cache

The mempool cache is only available to EAL threads as a per-lcore
resource. Change this so that the user can create and provide their own
cache on mempool get and put operations. This works with non-EAL threads
too. This commit introduces the new API calls:

rte_mempool_cache_create(size, socket_id)
rte_mempool_cache_free(cache)
rte_mempool_cache_flush(cache, mp)
rte_mempool_default_cache(mp, lcore_id)

Changes the API calls:

rte_mempool_generic_put(mp, obj_table, n, cache, flags)
rte_mempool_generic_get(mp, obj_table, n, cache, flags)

The cache-oblivious API calls use the per-lcore default local cache.

Signed-off-by: Lazaros Koromilas <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


12