mem: fix API doc about allocation on secondary processes
PATCH 1/1 mem: fix API doc about allocation on secondary processes
Since 10 years, memzone allocation is allowed on secondary processes. Now it's time to update the documentation accordingly.
At the same time, fix mempool, mbuf and ring documentation which rely on memzones internally.
Bugzilla ID: 1074
--- lib/eal/include/rte_memzone.h | 3 --- lib/mbuf/rte_mbuf.h | 3 --- lib/mempool/rte_mempool.h | 1 - lib/ring/rte_ring.h | 1 - lib/ring/rte_ring_elem.h | 1 - 5 files changed, 9 deletions(-)
lib/eal/include/rte_memzone.h +0 -3
@@ -118,7 +118,6 @@ struct rte_memzone {* on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone
@@ -184,7 +183,6 @@ const struct rte_memzone *rte_memzone_reserve(const char *name,* on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone
@@ -256,7 +254,6 @@ const struct rte_memzone *rte_memzone_reserve_aligned(const char *name,* on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone
lib/mbuf/rte_mbuf.h +0 -3
@@ -664,7 +664,6 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg);* The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
@@ -706,7 +705,6 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,* The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
@@ -760,7 +758,6 @@ struct rte_pktmbuf_extmem {* The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
lib/mempool/rte_mempool.h +0 -1
@@ -1023,7 +1023,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);* The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large or an unknown flag was passed * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
lib/ring/rte_ring.h +0 -1
@@ -180,7 +180,6 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count,* On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - count provided is not a power of 2 * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists
lib/ring/rte_ring_elem.h +0 -1
@@ -96,7 +96,6 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count);* On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure -* - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - esize is not a multiple of 4 or count provided is not a * power of 2. * - ENOSPC - the maximum number of memzones has already been allocated
Signature · 1 line
2.30.2
<snip>
Quoted 5 lines
Subject: [PATCH] mem: fix API doc about allocation on secondary processes
Since 10 years, memzone allocation is allowed on secondary processes. Now it's time to update the documentation accordingly.
Quoted 7 lines
At the same time, fix mempool, mbuf and ring documentation which rely on memzones internally.
Bugzilla ID: 1074
Fixes 916e4f4f4e45 ("memory: fix for multi process support")Signed-off-by Olivier Matz <[email protected]>
LGTM
Quoted 140 lines
--- lib/eal/include/rte_memzone.h | 3 --- lib/mbuf/rte_mbuf.h | 3 --- lib/mempool/rte_mempool.h | 1 - lib/ring/rte_ring.h | 1 - lib/ring/rte_ring_elem.h | 1 - 5 files changed, 9 deletions(-)lib/eal/include/rte_memzone.h +0
-0@@ -118,7 +118,6 @@ struct rte_memzone {* on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already exists
* - ENOMEM - no appropriate memory area found in which to create
memzonelib/eal/include/rte_memzone.h +0
-0@@ -184,7 +183,6 @@ const struct rte_memzone *rte_memzone_reserve(const char *name, * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_configstructure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already exists
* - ENOMEM - no appropriate memory area found in which to create
memzonelib/eal/include/rte_memzone.h +0
-0@@ -256,7 +254,6 @@ const struct rte_memzone *rte_memzone_reserve_aligned(const char *name, * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_configstructure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already exists
* - ENOMEM - no appropriate memory area found in which to create
memzonelib/mbuf/rte_mbuf.h index renamed from lib/mbuf/rte_mbuf.h +0
-0
9811e8c760..b6e23d98ce100644lib/mbuf/rte_mbuf.h +0
-0@@ -664,7 +664,6 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg); * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_configstructure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - EINVAL - cache size provided is too large, orpriv_sizeis not aligned.
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already existslib/mbuf/rte_mbuf.h +0
-0@@ -706,7 +705,6 @@ rte_pktmbuf_pool_create(const char *name,unsigned n, * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_configstructure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - EINVAL - cache size provided is too large, orpriv_sizeis not aligned.
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already existslib/mbuf/rte_mbuf.h +0
-0@@ -760,7 +758,6 @@ struct rte_pktmbuf_extmem {* The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - EINVAL - cache size provided is too large, orpriv_sizeis not aligned.
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already existslib/mempool/rte_mempool.h +0
-0@@ -1023,7 +1023,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *); * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_configstructure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - EINVAL - cache size provided is too large or an unknown flag was
passed
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already existslib/ring/rte_ring.h index renamed from lib/ring/rte_ring.h +0
-0
980e92e594..7c48e35d27100644lib/ring/rte_ring.h +0
-0@@ -180,7 +180,6 @@ int rte_ring_init(struct rte_ring *r, const char *name,unsigned int count, * On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_configstructure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - EINVAL - count provided is not a power of 2
* - ENOSPC - the maximum number of memzones has already been
allocated
* - EEXIST - a memzone with the same name already existslib/ring/rte_ring_elem.h index renamed from lib/ring/rte_ring_elem.h +0
-0
fb1edc9aad..7f7d4951d3100644lib/ring/rte_ring_elem.h +0
-0@@ -96,7 +96,6 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); * On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_configstructure
- * -E_RTE_SECONDARY- function was called from a secondary process
instance
* - EINVAL - esize is not a multiple of 4 or count provided is not a
* power of 2.
* - ENOSPC - the maximum number of memzones has already been
allocated
--
2.30.2
David Marchand
AppliedQuoted 8 lines · Honnappa Nagarahalli
Quoted 8 lines
Since 10 years, memzone allocation is allowed on secondary processes. Now it's time to update the documentation accordingly.
At the same time, fix mempool, mbuf and ring documentation which rely on memzones internally.
Bugzilla ID: 1074
Fixes 916e4f4f4e45 ("memory: fix for multi process support")
Quoted 3 lines
Quoted 2 lines
Signed-off-by Olivier Matz <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand