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