All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Olivier Matz <olivier.matz@6wind.com>,
	David Marchand <david.marchand@redhat.com>,
	Ray Kinsella <mdr@ashroe.eu>,
	"Artem V. Andreev" <artem.andreev@oktetlabs.ru>,
	Ashwin Sekhar T K <asekhar@marvell.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@oss.nxp.com>,
	Harman Kalra <hkalra@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 5/6] mempool: add namespace to driver register macro
Date: Tue, 19 Oct 2021 13:08:44 +0300	[thread overview]
Message-ID: <20211019100845.1632332-6-andrew.rybchenko@oktetlabs.ru> (raw)
In-Reply-To: <20211019100845.1632332-1-andrew.rybchenko@oktetlabs.ru>

Add RTE_ prefix to macro used to register mempool driver.
The old one is still available but deprecated.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 doc/guides/prog_guide/mempool_lib.rst           |  2 +-
 doc/guides/rel_notes/deprecation.rst            |  4 ++++
 doc/guides/rel_notes/release_21_11.rst          |  3 +++
 drivers/mempool/bucket/rte_mempool_bucket.c     |  2 +-
 drivers/mempool/cnxk/cn10k_mempool_ops.c        |  2 +-
 drivers/mempool/cnxk/cn9k_mempool_ops.c         |  2 +-
 drivers/mempool/dpaa/dpaa_mempool.c             |  2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c        |  2 +-
 drivers/mempool/octeontx/rte_mempool_octeontx.c |  2 +-
 drivers/mempool/octeontx2/otx2_mempool_ops.c    |  2 +-
 drivers/mempool/ring/rte_mempool_ring.c         | 12 ++++++------
 drivers/mempool/stack/rte_mempool_stack.c       |  4 ++--
 lib/mempool/rte_mempool.h                       |  6 +++++-
 13 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/doc/guides/prog_guide/mempool_lib.rst b/doc/guides/prog_guide/mempool_lib.rst
index 890535eb23..55838317b9 100644
--- a/doc/guides/prog_guide/mempool_lib.rst
+++ b/doc/guides/prog_guide/mempool_lib.rst
@@ -115,7 +115,7 @@ management systems and software based memory allocators, to be used with DPDK.
 There are two aspects to a mempool handler.
 
 * Adding the code for your new mempool operations (ops). This is achieved by
-  adding a new mempool ops code, and using the ``MEMPOOL_REGISTER_OPS`` macro.
+  adding a new mempool ops code, and using the ``RTE_MEMPOOL_REGISTER_OPS`` macro.
 
 * Using the new API to call ``rte_mempool_create_empty()`` and
   ``rte_mempool_set_ops_byname()`` to create a new mempool and specifying which
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index bc3aca8ef1..0095d48084 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -43,6 +43,10 @@ Deprecation Notices
   be removed in DPDK 22.11. The replacement macro
   ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
 
+* mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
+  deprecated and will be removed in DPDK 22.11. Use replacement macro
+  ``RTE_MEMPOOL_REGISTER_OPS()``.
+
 * 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 e95ddb93a6..9804c033c0 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -227,6 +227,9 @@ API Changes
 * mempool: Helper macro ``MEMPOOL_HEADER_SIZE()`` is deprecated.
   The replacement macro ``RTE_MEMPOOL_HEADER_SIZE()`` is internal only.
 
+* mempool: Macro to register mempool driver ``MEMPOOL_REGISTER_OPS()`` is
+  deprecated.  Use replacement ``RTE_MEMPOOL_REGISTER_OPS()``.
+
 * net: Renamed ``s_addr`` and ``d_addr`` fields of ``rte_ether_hdr`` structure
   to ``src_addr`` and ``dst_addr``, respectively.
 
diff --git a/drivers/mempool/bucket/rte_mempool_bucket.c b/drivers/mempool/bucket/rte_mempool_bucket.c
index 8ff9e53007..c0b480bfc7 100644
--- a/drivers/mempool/bucket/rte_mempool_bucket.c
+++ b/drivers/mempool/bucket/rte_mempool_bucket.c
@@ -663,4 +663,4 @@ static const struct rte_mempool_ops ops_bucket = {
 };
 
 
-MEMPOOL_REGISTER_OPS(ops_bucket);
+RTE_MEMPOOL_REGISTER_OPS(ops_bucket);
diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
index 95458b34b7..4c669b878f 100644
--- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
+++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
@@ -316,4 +316,4 @@ static struct rte_mempool_ops cn10k_mempool_ops = {
 	.populate = cnxk_mempool_populate,
 };
 
-MEMPOOL_REGISTER_OPS(cn10k_mempool_ops);
+RTE_MEMPOOL_REGISTER_OPS(cn10k_mempool_ops);
diff --git a/drivers/mempool/cnxk/cn9k_mempool_ops.c b/drivers/mempool/cnxk/cn9k_mempool_ops.c
index c0cdba640b..b7967f8085 100644
--- a/drivers/mempool/cnxk/cn9k_mempool_ops.c
+++ b/drivers/mempool/cnxk/cn9k_mempool_ops.c
@@ -86,4 +86,4 @@ static struct rte_mempool_ops cn9k_mempool_ops = {
 	.populate = cnxk_mempool_populate,
 };
 
-MEMPOOL_REGISTER_OPS(cn9k_mempool_ops);
+RTE_MEMPOOL_REGISTER_OPS(cn9k_mempool_ops);
diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index f02056982c..f17aff9655 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -358,4 +358,4 @@ static const struct rte_mempool_ops dpaa_mpool_ops = {
 	.populate = dpaa_populate,
 };
 
-MEMPOOL_REGISTER_OPS(dpaa_mpool_ops);
+RTE_MEMPOOL_REGISTER_OPS(dpaa_mpool_ops);
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 771e0a0e28..39c6252a63 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -455,6 +455,6 @@ static const struct rte_mempool_ops dpaa2_mpool_ops = {
 	.populate = dpaa2_populate,
 };
 
-MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
+RTE_MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
 
 RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_mempool, NOTICE);
diff --git a/drivers/mempool/octeontx/rte_mempool_octeontx.c b/drivers/mempool/octeontx/rte_mempool_octeontx.c
index bd00700202..f4de1c8412 100644
--- a/drivers/mempool/octeontx/rte_mempool_octeontx.c
+++ b/drivers/mempool/octeontx/rte_mempool_octeontx.c
@@ -202,4 +202,4 @@ static struct rte_mempool_ops octeontx_fpavf_ops = {
 	.populate = octeontx_fpavf_populate,
 };
 
-MEMPOOL_REGISTER_OPS(octeontx_fpavf_ops);
+RTE_MEMPOOL_REGISTER_OPS(octeontx_fpavf_ops);
diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
index d827fd8c7b..332e4f1cb2 100644
--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
@@ -898,4 +898,4 @@ static struct rte_mempool_ops otx2_npa_ops = {
 #endif
 };
 
-MEMPOOL_REGISTER_OPS(otx2_npa_ops);
+RTE_MEMPOOL_REGISTER_OPS(otx2_npa_ops);
diff --git a/drivers/mempool/ring/rte_mempool_ring.c b/drivers/mempool/ring/rte_mempool_ring.c
index 4b785971c4..c6aa935eea 100644
--- a/drivers/mempool/ring/rte_mempool_ring.c
+++ b/drivers/mempool/ring/rte_mempool_ring.c
@@ -198,9 +198,9 @@ static const struct rte_mempool_ops ops_mt_hts = {
 	.get_count = common_ring_get_count,
 };
 
-MEMPOOL_REGISTER_OPS(ops_mp_mc);
-MEMPOOL_REGISTER_OPS(ops_sp_sc);
-MEMPOOL_REGISTER_OPS(ops_mp_sc);
-MEMPOOL_REGISTER_OPS(ops_sp_mc);
-MEMPOOL_REGISTER_OPS(ops_mt_rts);
-MEMPOOL_REGISTER_OPS(ops_mt_hts);
+RTE_MEMPOOL_REGISTER_OPS(ops_mp_mc);
+RTE_MEMPOOL_REGISTER_OPS(ops_sp_sc);
+RTE_MEMPOOL_REGISTER_OPS(ops_mp_sc);
+RTE_MEMPOOL_REGISTER_OPS(ops_sp_mc);
+RTE_MEMPOOL_REGISTER_OPS(ops_mt_rts);
+RTE_MEMPOOL_REGISTER_OPS(ops_mt_hts);
diff --git a/drivers/mempool/stack/rte_mempool_stack.c b/drivers/mempool/stack/rte_mempool_stack.c
index 7e85c8d6b6..1476905227 100644
--- a/drivers/mempool/stack/rte_mempool_stack.c
+++ b/drivers/mempool/stack/rte_mempool_stack.c
@@ -93,5 +93,5 @@ static struct rte_mempool_ops ops_lf_stack = {
 	.get_count = stack_get_count
 };
 
-MEMPOOL_REGISTER_OPS(ops_stack);
-MEMPOOL_REGISTER_OPS(ops_lf_stack);
+RTE_MEMPOOL_REGISTER_OPS(ops_stack);
+RTE_MEMPOOL_REGISTER_OPS(ops_lf_stack);
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index 11ef60247e..409836d4d1 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -920,12 +920,16 @@ int rte_mempool_register_ops(const struct rte_mempool_ops *ops);
  * Note that the rte_mempool_register_ops fails silently here when
  * more than RTE_MEMPOOL_MAX_OPS_IDX is registered.
  */
-#define MEMPOOL_REGISTER_OPS(ops)				\
+#define RTE_MEMPOOL_REGISTER_OPS(ops)				\
 	RTE_INIT(mp_hdlr_init_##ops)				\
 	{							\
 		rte_mempool_register_ops(&ops);			\
 	}
 
+/** Deprecated. Use RTE_MEMPOOL_REGISTER_OPS() instead. */
+#define MEMPOOL_REGISTER_OPS(ops) \
+	RTE_DEPRECATED(RTE_MEMPOOL_REGISTER_OPS(ops))
+
 /**
  * An object callback function for mempool.
  *
-- 
2.30.2


  parent reply	other threads:[~2021-10-19 10:09 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 14:49 [dpdk-dev] [PATCH 0/6] mempool: cleanup namespace Andrew Rybchenko
2021-10-18 14:49 ` [dpdk-dev] [PATCH 1/6] mempool: avoid flags documentation in the next line Andrew Rybchenko
2021-10-18 14:49 ` [dpdk-dev] [PATCH 2/6] mempool: add namespace prefix to flags Andrew Rybchenko
2021-10-19  8:52   ` David Marchand
2021-10-19  9:40     ` Thomas Monjalon
2021-10-18 14:49 ` [dpdk-dev] [PATCH 3/6] mempool: add namespace to internal but still visible API Andrew Rybchenko
2021-10-19  8:47   ` David Marchand
2021-10-19  9:10     ` Andrew Rybchenko
2021-10-18 14:49 ` [dpdk-dev] [PATCH 4/6] mempool: make header size calculation internal Andrew Rybchenko
2021-10-19  8:48   ` David Marchand
2021-10-19  8:59     ` Andrew Rybchenko
2021-10-18 14:49 ` [dpdk-dev] [PATCH 5/6] mempool: add namespace to driver register macro Andrew Rybchenko
2021-10-19  8:49   ` David Marchand
2021-10-19  9:04     ` Andrew Rybchenko
2021-10-19  9:23       ` Andrew Rybchenko
2021-10-19  9:27       ` David Marchand
2021-10-19  9:38         ` Andrew Rybchenko
2021-10-19  9:42         ` Thomas Monjalon
2021-10-18 14:49 ` [dpdk-dev] [PATCH 6/6] mempool: deprecate unused defines Andrew Rybchenko
2021-10-19 10:08 ` [dpdk-dev] [PATCH v2 0/6] mempool: cleanup namespace Andrew Rybchenko
2021-10-19 10:08   ` [dpdk-dev] [PATCH v2 1/6] mempool: avoid flags documentation in the next line Andrew Rybchenko
2021-10-19 16:13     ` Olivier Matz
2021-10-19 10:08   ` [dpdk-dev] [PATCH v2 2/6] mempool: add namespace prefix to flags Andrew Rybchenko
2021-10-19 16:13     ` Olivier Matz
2021-10-19 16:15       ` Olivier Matz
2021-10-19 17:45       ` Andrew Rybchenko
2021-10-19 10:08   ` [dpdk-dev] [PATCH v2 3/6] mempool: add namespace to internal but still visible API Andrew Rybchenko
2021-10-19 16:14     ` Olivier Matz
2021-10-19 10:08   ` [dpdk-dev] [PATCH v2 4/6] mempool: make header size calculation internal Andrew Rybchenko
2021-10-19 16:14     ` Olivier Matz
2021-10-19 17:23       ` Andrew Rybchenko
2021-10-19 10:08   ` Andrew Rybchenko [this message]
2021-10-19 16:16     ` [dpdk-dev] [PATCH v2 5/6] mempool: add namespace to driver register macro Olivier Matz
2021-10-19 10:08   ` [dpdk-dev] [PATCH v2 6/6] mempool: deprecate unused defines Andrew Rybchenko
2021-10-19 16:21     ` Olivier Matz
2021-10-19 17:23       ` Andrew Rybchenko
2021-10-19 17:40 ` [dpdk-dev] [PATCH v3 0/6] mempool: cleanup namespace Andrew Rybchenko
2021-10-19 17:40   ` [dpdk-dev] [PATCH v3 1/6] mempool: avoid flags documentation in the next line Andrew Rybchenko
2021-10-19 17:40   ` [dpdk-dev] [PATCH v3 2/6] mempool: add namespace prefix to flags Andrew Rybchenko
2021-10-19 20:03     ` David Marchand
2021-10-20  7:50       ` Andrew Rybchenko
2021-10-19 17:40   ` [dpdk-dev] [PATCH v3 3/6] mempool: add namespace to internal but still visible API Andrew Rybchenko
2021-10-19 17:40   ` [dpdk-dev] [PATCH v3 4/6] mempool: make header size calculation internal Andrew Rybchenko
2021-10-20  6:55     ` Olivier Matz
2021-10-19 17:40   ` [dpdk-dev] [PATCH v3 5/6] mempool: add namespace to driver register macro Andrew Rybchenko
2021-10-20  6:57     ` Olivier Matz
2021-10-19 17:40   ` [dpdk-dev] [PATCH v3 6/6] mempool: deprecate unused defines Andrew Rybchenko
2021-10-20  7:08     ` Olivier Matz
2021-10-19 20:09   ` [dpdk-dev] [PATCH v3 0/6] mempool: cleanup namespace David Marchand
2021-10-20  7:52     ` David Marchand
2021-10-20  7:54       ` Andrew Rybchenko
2021-10-20  7:52     ` Andrew Rybchenko
2021-10-20  8:07       ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211019100845.1632332-6-andrew.rybchenko@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=artem.andreev@oktetlabs.ru \
    --cc=asekhar@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=mdr@ashroe.eu \
    --cc=ndabilpuram@marvell.com \
    --cc=olivier.matz@6wind.com \
    --cc=pbhagavatula@marvell.com \
    --cc=sachin.saxena@oss.nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.