History log of /dpdk/lib/mempool/rte_mempool.h (Results 1 – 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2
# 30a1de10 15-Feb-2022 Sean Morrissey <[email protected]>

lib: remove unneeded header includes

These header includes have been flagged by the iwyu_tool
and removed.

Signed-off-by: Sean Morrissey <[email protected]>


Revision tags: v22.03-rc1
# e7b1c466 09-Feb-2022 Stephen Hemminger <[email protected]>

lib: update documentation of some *_free functions

These functions all behave like libc free() and do
nothing if handed a NULL pointer. The code is already doing
this, this patch just documents the

lib: update documentation of some *_free functions

These functions all behave like libc free() and do
nothing if handed a NULL pointer. The code is already doing
this, this patch just documents the behavior.

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

show more ...


Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1
# 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 ...


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

mempool: deprecate unused physical page defines

MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX are not used.

Fixes: fd943c764a63 ("mempool: deprecate xmem functions")

Signed-off-by: Andrew Rybche

mempool: deprecate unused physical page defines

MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX are not used.

Fixes: fd943c764a63 ("mempool: deprecate xmem functions")

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

show more ...


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

mempool: add namespace to driver register macro

Add RTE_ prefix to macro used to register mempool driver.
The old one is still available but deprecated.

Signed-off-by: Andrew Rybchenko <andrew.rybc

mempool: add namespace to driver register macro

Add RTE_ prefix to macro used to register mempool driver.
The old one is still available but deprecated.

Signed-off-by: Andrew Rybchenko <[email protected]>
Acked-by: Olivier Matz <[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 ...


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

mempool: add namespace to internal helpers

Add RTE_ prefix to internal API defined in public header.
Use the prefix instead of double underscore.
Use uppercase for macros in the case of name conflic

mempool: add namespace to internal helpers

Add RTE_ prefix to internal API defined in public header.
Use the prefix instead of double underscore.
Use uppercase for macros in the case of name conflict.

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 ...


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

mempool: enhance flags documentation readability

Move documentation into a separate line just before define.
Prepare to have a bit longer flag name because of namespace prefix.

Signed-off-by: Andre

mempool: enhance flags documentation readability

Move documentation into a separate line just before define.
Prepare to have a bit longer flag name because of namespace 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 ...


# a87a0c0d 13-Oct-2021 Andrew Rybchenko <[email protected]>

mempool: fix name size in mempool structure

Use correct define as a name array size.

The change breaks ABI and therefore cannot be backported to
stable branches.

Fixes: 38c9817ee1d8 ("mempool: adj

mempool: fix name size in mempool structure

Use correct define as a name array size.

The change breaks ABI and therefore cannot be backported to
stable branches.

Fixes: 38c9817ee1d8 ("mempool: adjust name size in related data types")

Signed-off-by: Andrew Rybchenko <[email protected]>
Reviewed-by: David Marchand <[email protected]>

show more ...


# f1f6ebc0 24-Aug-2021 William Tu <[email protected]>

eal: remove sys/queue.h from public headers

Currently there are some public headers that include 'sys/queue.h', which
is not POSIX, but usually provided by the Linux/BSD system library.
(Not in POSI

eal: remove sys/queue.h from public headers

Currently there are some public headers that include 'sys/queue.h', which
is not POSIX, but usually provided by the Linux/BSD system library.
(Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs.)
The file is missing on Windows. During the Windows build, DPDK uses a
bundled copy, so building a DPDK library works fine. But when OVS or other
applications use DPDK as a library, because some DPDK public headers
include 'sys/queue.h', on Windows, it triggers an error due to no such
file.

One solution is to install the 'lib/eal/windows/include/sys/queue.h' into
Windows environment, such as [1]. However, this means DPDK exports the
functionalities of 'sys/queue.h' into the environment, which might cause
symbols, macros, headers clashing with other applications.

The patch fixes it by removing the "#include <sys/queue.h>" from
DPDK public headers, so programs including DPDK headers don't depend
on the system to provide 'sys/queue.h'. When these public headers use
macros such as TAILQ_xxx, we replace it by the ones with RTE_ prefix.
For Windows, we copy the definitions from <sys/queue.h> to rte_os.h
in Windows EAL. Note that these RTE_ macros are compatible with
<sys/queue.h>, both at the level of API (to use with <sys/queue.h>
macros in C files) and ABI (to avoid breaking it).

Additionally, the TAILQ_FOREACH_SAFE is not part of <sys/queue.h>,
the patch replaces it with RTE_TAILQ_FOREACH_SAFE.

[1] http://mails.dpdk.org/archives/dev/2021-August/216304.html

Suggested-by: Nick Connolly <[email protected]>
Suggested-by: Dmitry Kozlyuk <[email protected]>
Signed-off-by: William Tu <[email protected]>
Acked-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Narcisa Vasile <[email protected]>

show more ...


Revision tags: 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
# cee151b4 27-Apr-2021 Joyce Kong <[email protected]>

mempool: distinguish cache and pool debug counters

If cache is enabled, objects will be retrieved/put from/to cache,
subsequently from/to the common pool. Now the debug stats calculate
the objects r

mempool: distinguish cache and pool debug counters

If cache is enabled, objects will be retrieved/put from/to cache,
subsequently from/to the common pool. Now the debug stats calculate
the objects retrieved/put from/to cache and pool together, it is
better to distinguish them.

Signed-off-by: Joyce Kong <[email protected]>
Signed-off-by: Dharmik Thakkar <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>
Reviewed-by: Honnappa Nagarahalli <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


# 56487040 27-Apr-2021 Dharmik Thakkar <[email protected]>

mempool: make stats macro generic

Make __MEMPOOL_STAT_ADD macro more generic and delete
__MEMPOOL_CONTIG_BLOCKS_STAT_ADD macro.

Suggested-by: Olivier Matz <[email protected]>
Signed-off-by: Dh

mempool: make stats macro generic

Make __MEMPOOL_STAT_ADD macro more generic and delete
__MEMPOOL_CONTIG_BLOCKS_STAT_ADD macro.

Suggested-by: Olivier Matz <[email protected]>
Signed-off-by: Dharmik Thakkar <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>
Reviewed-by: Honnappa Nagarahalli <[email protected]>
Acked-by: Olivier Matz <[email protected]>

show more ...


Revision tags: v21.05-rc1
# 99a2dd95 20-Apr-2021 Bruce Richardson <[email protected]>

lib: remove librte_ prefix from directory names

There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
m

lib: remove librte_ prefix from directory names

There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
makes it awkward to add features referring to individual libraries in the
build - should the lib names be specified with or without the prefix.
Therefore, we can just remove the library prefix and use the library's
unique name as the directory name, i.e. 'eal' rather than 'librte_eal'

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

show more ...