DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] mem: fix API doc about allocation on secondary processes
@ 2022-09-29 12:23 Olivier Matz
  2022-09-30 13:19 ` Honnappa Nagarahalli
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Matz @ 2022-09-29 12:23 UTC (permalink / raw)
  To: dev
  Cc: Anatoly Burakov, Olivier Matz, Andrew Rybchenko,
	Honnappa Nagarahalli, Konstantin Ananyev

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")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 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(-)

diff --git a/lib/eal/include/rte_memzone.h b/lib/eal/include/rte_memzone.h
index 5db1210831..bb4223a056 100644
--- a/lib/eal/include/rte_memzone.h
+++ b/lib/eal/include/rte_memzone.h
@@ -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
diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
index 9811e8c760..b6e23d98ce 100644
--- a/lib/mbuf/rte_mbuf.h
+++ b/lib/mbuf/rte_mbuf.h
@@ -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
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index a3c4ee351d..4c4af2a8ed 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -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
diff --git a/lib/ring/rte_ring.h b/lib/ring/rte_ring.h
index 980e92e594..7c48e35d27 100644
--- a/lib/ring/rte_ring.h
+++ b/lib/ring/rte_ring.h
@@ -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
diff --git a/lib/ring/rte_ring_elem.h b/lib/ring/rte_ring_elem.h
index fb1edc9aad..7f7d4951d3 100644
--- a/lib/ring/rte_ring_elem.h
+++ b/lib/ring/rte_ring_elem.h
@@ -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
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-04 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 12:23 [PATCH] mem: fix API doc about allocation on secondary processes Olivier Matz
2022-09-30 13:19 ` Honnappa Nagarahalli
2022-10-04 11:35   ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).