diff mbox series

[v2,6/6] mempool: deprecate unused defines

Message ID 20211019100845.1632332-7-andrew.rybchenko@oktetlabs.ru (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers show
Series mempool: cleanup namespace | expand

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-spell-check-testing warning Testing issues
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Oct. 19, 2021, 10:08 a.m. UTC
MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX are not used.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 doc/guides/contributing/documentation.rst | 4 ++--
 doc/guides/rel_notes/deprecation.rst      | 3 +++
 doc/guides/rel_notes/release_21_11.rst    | 3 +++
 lib/mempool/rte_mempool.h                 | 7 ++++---
 4 files changed, 12 insertions(+), 5 deletions(-)

Comments

Olivier Matz Oct. 19, 2021, 4:21 p.m. UTC | #1
On Tue, Oct 19, 2021 at 01:08:45PM +0300, Andrew Rybchenko wrote:
> MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX are not used.
> 
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Fixes: fd943c764a63 ("mempool: deprecate xmem functions") ?

> --- a/lib/mempool/rte_mempool.h
> +++ b/lib/mempool/rte_mempool.h
> @@ -116,10 +116,11 @@ struct rte_mempool_objsz {
>  /* "MP_<name>" */
>  #define	RTE_MEMPOOL_MZ_FORMAT	RTE_MEMPOOL_MZ_PREFIX "%s"
>  
> -#define	MEMPOOL_PG_SHIFT_MAX	(sizeof(uintptr_t) * CHAR_BIT - 1)
> +#define	MEMPOOL_PG_SHIFT_MAX \
> +	RTE_DEPRECATED(sizeof(uintptr_t) * CHAR_BIT - 1)
>  
> -/** Mempool over one chunk of physically continuous memory */
> -#define	MEMPOOL_PG_NUM_DEFAULT	1
> +/** Deprecated. Mempool over one chunk of physically continuous memory */
> +#define	MEMPOOL_PG_NUM_DEFAULT	RTE_DEPRECATED(1)
>  

Same comment than previous patches here.


Thanks Andrew for this series!
Andrew Rybchenko Oct. 19, 2021, 5:23 p.m. UTC | #2
On 10/19/21 7:21 PM, Olivier Matz wrote:
> On Tue, Oct 19, 2021 at 01:08:45PM +0300, Andrew Rybchenko wrote:
>> MEMPOOL_PG_NUM_DEFAULT and MEMPOOL_PG_SHIFT_MAX are not used.
>>
>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 
> Fixes: fd943c764a63 ("mempool: deprecate xmem functions") ?

I think it is good idea. Without Cc to stable.

> 
>> --- a/lib/mempool/rte_mempool.h
>> +++ b/lib/mempool/rte_mempool.h
>> @@ -116,10 +116,11 @@ struct rte_mempool_objsz {
>>   /* "MP_<name>" */
>>   #define	RTE_MEMPOOL_MZ_FORMAT	RTE_MEMPOOL_MZ_PREFIX "%s"
>>   
>> -#define	MEMPOOL_PG_SHIFT_MAX	(sizeof(uintptr_t) * CHAR_BIT - 1)
>> +#define	MEMPOOL_PG_SHIFT_MAX \
>> +	RTE_DEPRECATED(sizeof(uintptr_t) * CHAR_BIT - 1)
>>   
>> -/** Mempool over one chunk of physically continuous memory */
>> -#define	MEMPOOL_PG_NUM_DEFAULT	1
>> +/** Deprecated. Mempool over one chunk of physically continuous memory */
>> +#define	MEMPOOL_PG_NUM_DEFAULT	RTE_DEPRECATED(1)
>>   
> 
> Same comment than previous patches here.
> 
> 
> Thanks Andrew for this series!

Thanks a lot for the review.
diff mbox series

Patch

diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 8cbd4a0f6f..7fcbb7fc43 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -705,7 +705,7 @@  The following are some guidelines for use of Doxygen in the DPDK API documentati
      /**< Virtual address of the first mempool object. */
      uintptr_t   elt_va_end;
      /**< Virtual address of the <size + 1> mempool object. */
-     phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT];
+     phys_addr_t elt_pa[1];
      /**< Array of physical page addresses for the mempool buffer. */
 
   This doesn't have an effect on the rendered documentation but it is confusing for the developer reading the code.
@@ -724,7 +724,7 @@  The following are some guidelines for use of Doxygen in the DPDK API documentati
      /** Virtual address of the <size + 1> mempool object. */
      uintptr_t   elt_va_end;
      /** Array of physical page addresses for the mempool buffer. */
-     phys_addr_t elt_pa[MEMPOOL_PG_NUM_DEFAULT];
+     phys_addr_t elt_pa[1];
 
 * Read the rendered section of the documentation that you have added for correctness, clarity and consistency
   with the surrounding text.
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 0095d48084..c59dd5ca98 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -47,6 +47,9 @@  Deprecation Notices
   deprecated and will be removed in DPDK 22.11. Use replacement macro
   ``RTE_MEMPOOL_REGISTER_OPS()``.
 
+* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
+  will be removed in DPDK 22.11.
+
 * mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
   A compatibility layer will be kept until DPDK 22.11, except for the flags
   that are already deprecated (``PKT_RX_L4_CKSUM_BAD``, ``PKT_RX_IP_CKSUM_BAD``,
diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index 9804c033c0..eea9c13151 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -230,6 +230,9 @@  API Changes
 * mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
   deprecated.  Use replacement ``RTE_MEMPOOL_REGISTER_OPS()``.
 
+* mempool: The mempool API macros ``MEMPOOL_PG_*`` are deprecated and
+  will be removed in DPDK 22.11.
+
 * net: Renamed ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` structure
   to ``src_addr`` and ``dst_addr``, respectively.
 
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index 409836d4d1..8ef067fb12 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -116,10 +116,11 @@  struct rte_mempool_objsz {
 /* "MP_<name>" */
 #define	RTE_MEMPOOL_MZ_FORMAT	RTE_MEMPOOL_MZ_PREFIX "%s"
 
-#define	MEMPOOL_PG_SHIFT_MAX	(sizeof(uintptr_t) * CHAR_BIT - 1)
+#define	MEMPOOL_PG_SHIFT_MAX \
+	RTE_DEPRECATED(sizeof(uintptr_t) * CHAR_BIT - 1)
 
-/** Mempool over one chunk of physically continuous memory */
-#define	MEMPOOL_PG_NUM_DEFAULT	1
+/** Deprecated. Mempool over one chunk of physically continuous memory */
+#define	MEMPOOL_PG_NUM_DEFAULT	RTE_DEPRECATED(1)
 
 #ifndef RTE_MEMPOOL_ALIGN
 /**