History log of /dpdk/app/test/test_malloc.c (Results 1 – 25 of 33)
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
# 06c047b6 09-Feb-2022 Stephen Hemminger <[email protected]>

remove unnecessary null checks

Functions like free, rte_free, and rte_mempool_free
already handle NULL pointer so the checks here are not necessary.

Remove redundant NULL pointer checks before free

remove unnecessary null checks

Functions like free, rte_free, and rte_mempool_free
already handle NULL pointer so the checks here are not necessary.

Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

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

show more ...


# 3c60274c 26-Jan-2022 Jie Zhou <[email protected]>

test: skip unsupported tests on Windows

Skip tests which are not yet supported for Windows:
- The libraries that tests depend on are not enabled on Windows yet
- The tests can compile but with issue

test: skip unsupported tests on Windows

Skip tests which are not yet supported for Windows:
- The libraries that tests depend on are not enabled on Windows yet
- The tests can compile but with issue still under investigation
* test_func_reentrancy:
Windows EAL has no protection against repeated calls.
* test_lcores:
Execution enters an infinite loops, requires investigation.
* test_rcu_qsbr_perf:
Execution hangs on Windows, requires investigation.

Signed-off-by: Jie Zhou <[email protected]>
Signed-off-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Tyler Retzlaff <[email protected]>

show more ...


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, v21.11-rc1, v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, 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
# cb056611 15-Oct-2020 Stephen Hemminger <[email protected]>

eal: rename lcore master and slave

Replace master lcore with main lcore and
replace slave lcore with worker lcore.

Keep the old functions and macros but mark them as deprecated
for this release.

T

eal: rename lcore master and slave

Replace master lcore with main lcore and
replace slave lcore with worker lcore.

Keep the old functions and macros but mark them as deprecated
for this release.

The "--master-lcore" command line option is also deprecated
and any usage will print a warning and use "--main-lcore"
as replacement.

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


# 17b347da 15-Oct-2020 Stephen Hemminger <[email protected]>

malloc: add alloc_size attribute to functions

By using the alloc_size() attribute the compiler can optimize
better and detect errors at compile time.

For example, Gcc will fail one of the invalid a

malloc: add alloc_size attribute to functions

By using the alloc_size() attribute the compiler can optimize
better and detect errors at compile time.

For example, Gcc will fail one of the invalid allocation examples
in app/test/test_malloc.c because the allocation is outside the
limits of memory.

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

show more ...


Revision tags: 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
# b341a09c 07-May-2020 Bing Zhao <[email protected]>

mem: fix overflow on allocation

The size checking is done in the caller. The size parameter is an
unsigned (64b wide) right now, so the comparison with zero should be
enough in most cases. But it wo

mem: fix overflow on allocation

The size checking is done in the caller. The size parameter is an
unsigned (64b wide) right now, so the comparison with zero should be
enough in most cases. But it won't help in the following case.
If the allocating request input a huge number by mistake, e.g., some
overflow after the calculation (especially subtraction), the checking
in the caller will succeed since it is not zero. Indeed, there is not
enough space in the system to support such huge memory allocation.
Usually it will return failure in the following code. But if the
input size is just a little smaller than the UINT64_MAX, like -2 in
signed type.
The roundup will cause an overflow and then "reset" the size to 0,
and then only a header (128B now) with zero length will be returned.
The following will be the previous allocation header.
It should be OK in most cases if the application won't access the
memory body. Or else, some critical issue will be caused and not easy
to debug. So this issue should be prevented at the beginning, like
other big size failure, NULL pointer should be returned also.

Fixes: fdf20fa7bee9 ("add prefix to cache line macros")
Cc: [email protected]

Signed-off-by: Bing Zhao <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v20.05-rc1
# 4a5a8678 02-Apr-2020 Anatoly Burakov <[email protected]>

test/malloc: add bad parameter tests for realloc

Realloc did not have bad parameter autotest. Add them.

Signed-off-by: Anatoly Burakov <[email protected]>
Reviewed-by: David Christensen <dr

test/malloc: add bad parameter tests for realloc

Realloc did not have bad parameter autotest. Add them.

Signed-off-by: Anatoly Burakov <[email protected]>
Reviewed-by: David Christensen <[email protected]>

show more ...


# dd467777 02-Apr-2020 Anatoly Burakov <[email protected]>

test/malloc: run realloc tests on external heap

Due to the fact that the rte_realloc() test depends on the layout of
underlying memory, it can sometimes fail due to fragmentation of the
memory. To a

test/malloc: run realloc tests on external heap

Due to the fact that the rte_realloc() test depends on the layout of
underlying memory, it can sometimes fail due to fragmentation of the
memory. To address this, make it so that the realloc autotests are run
using a newly created external memory heap instead of main memory.

Bugzilla ID: 424

Signed-off-by: Anatoly Burakov <[email protected]>
Tested-by: David Christensen <[email protected]>

show more ...


Revision tags: 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
# 71bdd8a1 24-Jan-2020 Pavan Nikhilesh <[email protected]>

app: use common macro RTE_DIM

Use RTE_DIM macro to calculate array size.

Suggested-by: David Marchand <[email protected]>
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by:

app: use common macro RTE_DIM

Use RTE_DIM macro to calculate array size.

Suggested-by: David Marchand <[email protected]>
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by: David Marchand <[email protected]>

show more ...


Revision tags: v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2, v19.11-rc1
# 8ac35916 12-Aug-2019 David Marchand <[email protected]>

remove useless include of EAL memory config header

Restrict this header inclusion to its real users.

Fixes: 028669bc9f0d ("eal: hide shared memory config")
Cc: [email protected]

Signed-off-by: David

remove useless include of EAL memory config header

Restrict this header inclusion to its real users.

Fixes: 028669bc9f0d ("eal: hide shared memory config")
Cc: [email protected]

Signed-off-by: David Marchand <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1
# 5348806e 26-Jun-2019 Stephen Hemminger <[email protected]>

malloc: deprecate unused function to set limit

The function rte_malloc_set_limit was defined but never implemented.
Mark it as deprecated for now, and remove in next release.

There is no point in k

malloc: deprecate unused function to set limit

The function rte_malloc_set_limit was defined but never implemented.
Mark it as deprecated for now, and remove in next release.

There is no point in keeping dead code.
"You Aren't Going to Need It"

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v19.05, v19.05-rc4, v19.05-rc3, v19.05-rc2, v19.05-rc1
# a7cece2e 01-Mar-2019 Tomasz Jozwiak <[email protected]>

malloc: add NUMA-aware realloc function

Currently, rte_realloc will not respect original allocation's
NUMA node when memory cannot be resized, and there is no
NUMA-aware equivalent of rte_realloc. T

malloc: add NUMA-aware realloc function

Currently, rte_realloc will not respect original allocation's
NUMA node when memory cannot be resized, and there is no
NUMA-aware equivalent of rte_realloc. This patch adds such a function.

The new API will ensure that reallocated memory stays on
requested NUMA node, as well as allow moving allocated memory
to a different NUMA node.

Signed-off-by: Tomasz Jozwiak <[email protected]>
Acked-by: Anatoly Burakov <[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, v16.07, v16.07-rc5, v16.07-rc4, 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, v16.04, v16.04-rc4, v16.04-rc3, v16.04-rc2, v16.04-rc1, v2.2.0, v2.2.0-rc4, v2.2.0-rc3, v2.2.0-rc2, v2.2.0-rc1, v2.1.0, v2.1.0-rc4, v2.1.0-rc3, v2.1.0-rc2, v2.1.0-rc1
# 89f3a815 15-Jul-2015 Sergio Gonzalez Monroy <[email protected]>

app/test: update malloc and memzone unit tests

Some unit test are not relevant anymore. It is the case of those malloc
UTs that checked corner cases when allocating MALLOC_MEMZONE_SIZE
chunks, and t

app/test: update malloc and memzone unit tests

Some unit test are not relevant anymore. It is the case of those malloc
UTs that checked corner cases when allocating MALLOC_MEMZONE_SIZE
chunks, and the case of those memzone UTs relaying of specific free
memsegs of rhte reserved memzone.

Other UTs just need to be update, for example, to calculate maximum free
block size available.

Signed-off-by: Sergio Gonzalez Monroy <[email protected]>

show more ...


Revision tags: v2.0.0, v2.0.0-rc3, v2.0.0-rc2
# ff708fac 04-Mar-2015 David Marchand <[email protected]>

tailq: remove unneeded inclusions

Only keep inclusion where really needed.

Signed-off-by: David Marchand <[email protected]>
Acked-by: Neil Horman <[email protected]>


Revision tags: v2.0.0-rc1, v1.8.0, v1.8.0-rc6, v1.8.0-rc5, v1.8.0-rc4, v1.8.0-rc3, v1.8.0-rc2
# fdf20fa7 19-Nov-2014 Sergio Gonzalez Monroy <[email protected]>

add prefix to cache line macros

CACHE_LINE_SIZE is a macro defined in machine/param.h in FreeBSD and
conflicts with DPDK macro version.
Adding RTE_ prefix to avoid conflicts.
CACHE_LINE_MASK and CAC

add prefix to cache line macros

CACHE_LINE_SIZE is a macro defined in machine/param.h in FreeBSD and
conflicts with DPDK macro version.
Adding RTE_ prefix to avoid conflicts.
CACHE_LINE_MASK and CACHE_LINE_ROUNDUP are also prefixed.

Signed-off-by: Sergio Gonzalez Monroy <[email protected]>
[Thomas: updated on HEAD, including PPC]

show more ...


# 536681d7 25-Nov-2014 Chao Zhu <[email protected]>

mk: define cache size for IBM Power

IBM Power architecture has different cache line size (128 bytes) than
x86 (64 bytes). This patch defines CACHE_LINE_SIZE to 128 bytes to
override the default valu

mk: define cache size for IBM Power

IBM Power architecture has different cache line size (128 bytes) than
x86 (64 bytes). This patch defines CACHE_LINE_SIZE to 128 bytes to
override the default value 64 bytes to support IBM Power Architecture.

Signed-off-by: Chao Zhu <[email protected]>
Acked-by: David Marchand <[email protected]>

show more ...


Revision tags: v1.8.0-rc1, v1.7.1
# 942405f9 18-Aug-2014 David Marchand <[email protected]>

app/test: convert all tests to register system

Remove all tests from the builtin commands list and use the dynamic commands
list register macro.

Signed-off-by: David Marchand <david.marchand@6wind.

app/test: convert all tests to register system

Remove all tests from the builtin commands list and use the dynamic commands
list register macro.

Signed-off-by: David Marchand <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Neil Horman <[email protected]>

show more ...


Revision tags: v1.7.0, v1.7.0-rc4, v1.7.0-rc3, v1.7.0-rc2
# 6f41fe75 24-Jun-2014 Stephen Hemminger <[email protected]>

eal: deprecate rte_snprintf

The function rte_snprintf serves no useful purpose. It is the
same as snprintf() for all valid inputs. Deprecate it and
replace all uses in current code.

Leave the tests

eal: deprecate rte_snprintf

The function rte_snprintf serves no useful purpose. It is the
same as snprintf() for all valid inputs. Deprecate it and
replace all uses in current code.

Leave the tests for the deprecated function in place.

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

show more ...


# 495ea3d9 23-Jun-2014 Robert Sanford <[email protected]>

malloc: fix unit tests

Fix typos and false assumptions in malloc unit tests.

Without enhancements to lib rte_malloc, malloc autotest fails every
second (2nd) run. With enhancements, malloc autotest

malloc: fix unit tests

Fix typos and false assumptions in malloc unit tests.

Without enhancements to lib rte_malloc, malloc autotest fails every
second (2nd) run. With enhancements, malloc autotest fails in
function test_multi_alloc_statistics, because we compare the wrong
sets of statistics.

Signed-off-by: Robert Sanford <[email protected]>
Acked-by: Pablo de Lara <[email protected]>

show more ...


Revision tags: v1.7.0-rc1
# 3031749c 03-Jun-2014 Bruce Richardson <[email protected]>

remove trailing whitespaces

This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [

remove trailing whitespaces

This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [hence the number of files reporting 8 lines
changed in the diffstat].

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Neil Horman <[email protected]>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <[email protected]>

show more ...


# 591a9d79 02-May-2014 Stephen Hemminger <[email protected]>

add FILE argument to debug functions

The DPDK dump functions are useful for remote debugging of an
applications. But when application runs as a daemon, stdout
is typically routed to /dev/null.

Inst

add FILE argument to debug functions

The DPDK dump functions are useful for remote debugging of an
applications. But when application runs as a daemon, stdout
is typically routed to /dev/null.

Instead change all these functions to take a stdio FILE * handle
instead. An application can then use open_memstream() to capture
the output.

Signed-off-by: Stephen Hemminger <[email protected]>
[Thomas: fix quota_watermark example]
Acked-by: Thomas Monjalon <[email protected]>

show more ...


Revision tags: v1.6.0r2, v1.6.0r1, v1.6.0r0, v1.5.2r2, v1.5.2r1, v1.5.2r0, v1.5.1r2, v1.5.1r1, v1.5.1r0, v1.5.0r2
# 21a7f4e2 14-Nov-2013 Thomas Monjalon <[email protected]>

app/test: fix build without librte_cmdline

Some features are not available if LIBRTE_CMDLINE is disabled:
- interactive commands
- cmdline tests
Remove also cmdline_parse includes which are not need

app/test: fix build without librte_cmdline

Some features are not available if LIBRTE_CMDLINE is disabled:
- interactive commands
- cmdline tests
Remove also cmdline_parse includes which are not needed.

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

show more ...


12