History log of /dpdk/lib/mempool/rte_mempool.c (Results 1 – 13 of 13)
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, v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, 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 ...


# 2f5c4025 22-Oct-2021 Gowrishankar Muthukrishnan <[email protected]>

mempool: add telemetry endpoint

Add telemetry endpoint for mempool info.

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

mempool: add telemetry endpoint

Add telemetry endpoint for mempool info.

Signed-off-by: Gowrishankar Muthukrishnan <[email protected]>
Reviewed-by: Bruce Richardson <[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 ...


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


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


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


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