patch 'mem: fix API doc about allocation on secondary processes' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:27:20 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5e0e9abbdbcb495983405ffeb70d4fa98e759615

Thanks.

Luca Boccassi

---
>From 5e0e9abbdbcb495983405ffeb70d4fa98e759615 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Thu, 29 Sep 2022 14:23:11 +0200
Subject: [PATCH] mem: fix API doc about allocation on secondary processes

[ upstream commit d5262b521d096349e9e96b436f90eee6554ba595 ]

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 at 6wind.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
---
 lib/librte_eal/include/rte_memzone.h | 3 ---
 lib/librte_mbuf/rte_mbuf.h           | 3 ---
 lib/librte_mempool/rte_mempool.h     | 1 -
 lib/librte_ring/rte_ring.h           | 1 -
 lib/librte_ring/rte_ring_elem.h      | 1 -
 5 files changed, 9 deletions(-)

diff --git a/lib/librte_eal/include/rte_memzone.h b/lib/librte_eal/include/rte_memzone.h
index 5db1210831..bb4223a056 100644
--- a/lib/librte_eal/include/rte_memzone.h
+++ b/lib/librte_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/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index bcd8b743a7..d0794623c6 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -685,7 +685,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
@@ -727,7 +726,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
@@ -781,7 +779,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/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 9c990a5593..7516d90824 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -993,7 +993,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
  *    - ENOSPC - the maximum number of memzones has already been allocated
  *    - EEXIST - a memzone with the same name already exists
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index da17ed6d7c..937cfbb7a0 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -164,7 +164,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/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h
index 0057da3597..b79ba5cb7f 100644
--- a/lib/librte_ring/rte_ring_elem.h
+++ b/lib/librte_ring/rte_ring_elem.h
@@ -95,7 +95,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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:29.141810098 +0000
+++ 0062-mem-fix-API-doc-about-allocation-on-secondary-proces.patch	2022-11-03 09:27:25.481424532 +0000
@@ -1 +1 @@
-From d5262b521d096349e9e96b436f90eee6554ba595 Mon Sep 17 00:00:00 2001
+From 5e0e9abbdbcb495983405ffeb70d4fa98e759615 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5262b521d096349e9e96b436f90eee6554ba595 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -19,5 +20,5 @@
- 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 -
+ lib/librte_eal/include/rte_memzone.h | 3 ---
+ lib/librte_mbuf/rte_mbuf.h           | 3 ---
+ lib/librte_mempool/rte_mempool.h     | 1 -
+ lib/librte_ring/rte_ring.h           | 1 -
+ lib/librte_ring/rte_ring_elem.h      | 1 -
@@ -26 +27 @@
-diff --git a/lib/eal/include/rte_memzone.h b/lib/eal/include/rte_memzone.h
+diff --git a/lib/librte_eal/include/rte_memzone.h b/lib/librte_eal/include/rte_memzone.h
@@ -28,2 +29,2 @@
---- a/lib/eal/include/rte_memzone.h
-+++ b/lib/eal/include/rte_memzone.h
+--- a/lib/librte_eal/include/rte_memzone.h
++++ b/lib/librte_eal/include/rte_memzone.h
@@ -54,5 +55,5 @@
-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);
+diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
+index bcd8b743a7..d0794623c6 100644
+--- a/lib/librte_mbuf/rte_mbuf.h
++++ b/lib/librte_mbuf/rte_mbuf.h
+@@ -685,7 +685,6 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg);
@@ -66 +67 @@
-@@ -706,7 +705,6 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,
+@@ -727,7 +726,6 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,
@@ -74 +75 @@
-@@ -760,7 +758,6 @@ struct rte_pktmbuf_extmem {
+@@ -781,7 +779,6 @@ struct rte_pktmbuf_extmem {
@@ -82,5 +83,5 @@
-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 *);
+diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
+index 9c990a5593..7516d90824 100644
+--- a/lib/librte_mempool/rte_mempool.h
++++ b/lib/librte_mempool/rte_mempool.h
+@@ -993,7 +993,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *);
@@ -91 +92 @@
-  *    - EINVAL - cache size provided is too large or an unknown flag was passed
+  *    - EINVAL - cache size provided is too large
@@ -94,5 +95,5 @@
-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,
+diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
+index da17ed6d7c..937cfbb7a0 100644
+--- a/lib/librte_ring/rte_ring.h
++++ b/lib/librte_ring/rte_ring.h
+@@ -164,7 +164,6 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count,
@@ -106,5 +107,5 @@
-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);
+diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h
+index 0057da3597..b79ba5cb7f 100644
+--- a/lib/librte_ring/rte_ring_elem.h
++++ b/lib/librte_ring/rte_ring_elem.h
+@@ -95,7 +95,6 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count);


More information about the stable mailing list