DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro
@ 2019-01-14  5:20 Yongseok Koh
  2019-01-14  5:20 ` [dpdk-dev] [PATCH 2/2] mbuf: remove experimental tag of external buffer attachment Yongseok Koh
  2019-01-14  7:40 ` [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro Andrew Rybchenko
  0 siblings, 2 replies; 8+ messages in thread
From: Yongseok Koh @ 2019-01-14  5:20 UTC (permalink / raw)
  To: konstantin.ananyev, olivier.matz, thomas; +Cc: dev

RTE_MBUF_INDIRECT() is replaced with RTE_MBUF_CLONED() and removed.
This macro was deprecated in release 18.05 when EXT_ATTACHED_MBUF was
introduced.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 doc/guides/rel_notes/deprecation.rst   |  7 -------
 doc/guides/rel_notes/release_19_02.rst |  3 +++
 drivers/net/mlx4/mlx4_rxtx.h           |  2 +-
 drivers/net/mlx5/mlx5_rxtx.h           |  2 +-
 lib/librte_mbuf/rte_mbuf.h             |  8 +-------
 test/bpf/mbuf.h                        | 13 ++++++++++---
 6 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index bab82865fb..5f03443f88 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -44,13 +44,6 @@ Deprecation Notices
   structure would be made internal (or removed if all dependencies are cleared)
   in future releases.
 
-* mbuf: the macro ``RTE_MBUF_INDIRECT()`` will be removed in v18.08 or later and
-  replaced with ``RTE_MBUF_CLONED()`` which is already added in v18.05. As
-  ``EXT_ATTACHED_MBUF`` is newly introduced in v18.05, ``RTE_MBUF_INDIRECT()``
-  can no longer be mutually exclusive with ``RTE_MBUF_DIRECT()`` if the new
-  experimental API ``rte_pktmbuf_attach_extbuf()`` is used. Removal of the macro
-  is to fix this semantic inconsistency.
-
 * ethdev: the legacy filter API, including
   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
   as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
index 5a46f1acdc..c4ad072412 100644
--- a/doc/guides/rel_notes/release_19_02.rst
+++ b/doc/guides/rel_notes/release_19_02.rst
@@ -210,6 +210,9 @@ API Changes
   function from now on. Failed to do so will cause
   ``rte_cryptodev_sym_session_create()`` function call return error.
 
+* mbuf: ``RTE_MBUF_INDIRECT()``, which was deprecated in 18.05, was replaced
+  with ``RTE_MBUF_CLONED()`` and removed in 19.02.
+
 
 ABI Changes
 -----------
diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h
index d7ec4e0c5f..a5ef5c2ae8 100644
--- a/drivers/net/mlx4/mlx4_rxtx.h
+++ b/drivers/net/mlx4/mlx4_rxtx.h
@@ -179,7 +179,7 @@ uint32_t mlx4_tx_update_ext_mp(struct txq *txq, uintptr_t addr,
 static inline struct rte_mempool *
 mlx4_mb2mp(struct rte_mbuf *buf)
 {
-	if (unlikely(RTE_MBUF_INDIRECT(buf)))
+	if (unlikely(RTE_MBUF_CLONED(buf)))
 		return rte_mbuf_from_indirect(buf)->pool;
 	return buf->pool;
 }
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 75194a3fac..c2529f96bc 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -622,7 +622,7 @@ mlx5_tx_complete(struct mlx5_txq_data *txq)
 static inline struct rte_mempool *
 mlx5_mb2mp(struct rte_mbuf *buf)
 {
-	if (unlikely(RTE_MBUF_INDIRECT(buf)))
+	if (unlikely(RTE_MBUF_CLONED(buf)))
 		return rte_mbuf_from_indirect(buf)->pool;
 	return buf->pool;
 }
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index bc562dc8a9..6f1f7e3d8e 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -831,12 +831,6 @@ rte_mbuf_to_priv(struct rte_mbuf *m)
 #define RTE_MBUF_CLONED(mb)     ((mb)->ol_flags & IND_ATTACHED_MBUF)
 
 /**
- * Deprecated.
- * Use RTE_MBUF_CLONED().
- */
-#define RTE_MBUF_INDIRECT(mb)   RTE_MBUF_CLONED(mb)
-
-/**
  * Returns TRUE if given mbuf has an external buffer, or FALSE otherwise.
  *
  * External buffer is a user-provided anonymous buffer.
@@ -1629,7 +1623,7 @@ __rte_pktmbuf_free_direct(struct rte_mbuf *m)
 {
 	struct rte_mbuf *md;
 
-	RTE_ASSERT(RTE_MBUF_INDIRECT(m));
+	RTE_ASSERT(RTE_MBUF_CLONED(m));
 
 	md = rte_mbuf_from_indirect(m);
 
diff --git a/test/bpf/mbuf.h b/test/bpf/mbuf.h
index f24f908d72..b623d8694f 100644
--- a/test/bpf/mbuf.h
+++ b/test/bpf/mbuf.h
@@ -520,14 +520,21 @@ struct rte_mbuf {
 
 
 /**
- * Returns TRUE if given mbuf is indirect, or FALSE otherwise.
+ * Returns TRUE if given mbuf is cloned by mbuf indirection, or FALSE
+ * otherwise.
+ *
+ * If a mbuf has its data in another mbuf and references it by mbuf
+ * indirection, this mbuf can be defined as a cloned mbuf.
  */
-#define RTE_MBUF_INDIRECT(mb)   ((mb)->ol_flags & IND_ATTACHED_MBUF)
+#define RTE_MBUF_CLONED(mb)     ((mb)->ol_flags & IND_ATTACHED_MBUF)
 
 /**
  * Returns TRUE if given mbuf is direct, or FALSE otherwise.
+ *
+ * If a mbuf embeds its own data after the rte_mbuf structure, this mbuf
+ * can be defined as a direct mbuf.
  */
-#define RTE_MBUF_DIRECT(mb)     (!RTE_MBUF_INDIRECT(mb))
+#define RTE_MBUF_DIRECT(mb)     (!RTE_MBUF_CLONED(mb))
 
 /**
  * Private data in case of pktmbuf pool.
-- 
2.11.0

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

* [dpdk-dev] [PATCH 2/2] mbuf: remove experimental tag of external buffer attachment
  2019-01-14  5:20 [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro Yongseok Koh
@ 2019-01-14  5:20 ` Yongseok Koh
  2019-01-14  7:42   ` Andrew Rybchenko
  2019-01-14  7:40 ` [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro Andrew Rybchenko
  1 sibling, 1 reply; 8+ messages in thread
From: Yongseok Koh @ 2019-01-14  5:20 UTC (permalink / raw)
  To: konstantin.ananyev, olivier.matz, thomas; +Cc: dev

Remove the experimental tag of rte_pktmbuf_attach_extbuf() which was
introduced in 18.05.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 lib/librte_mbuf/rte_mbuf.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 6f1f7e3d8e..39df7e0a9b 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1489,13 +1489,6 @@ rte_pktmbuf_ext_shinfo_init_helper(void *buf_addr, uint16_t *buf_len,
  *   attached with appropriate free callback and its IO address.
  * - Smaller metadata is required to maintain shared data such as refcnt.
  *
- * @warning
- * @b EXPERIMENTAL: This API may change without prior notice.
- * Once external buffer is enabled by allowing experimental API,
- * ``RTE_MBUF_DIRECT()`` and ``RTE_MBUF_INDIRECT()`` are no longer
- * exclusive. A mbuf can be considered direct if it is neither indirect nor
- * having external buffer.
- *
  * @param m
  *   The pointer to the mbuf.
  * @param buf_addr
@@ -1507,7 +1500,7 @@ rte_pktmbuf_ext_shinfo_init_helper(void *buf_addr, uint16_t *buf_len,
  * @param shinfo
  *   User-provided memory for shared data of the external buffer.
  */
-static inline void __rte_experimental
+static inline void
 rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
 	rte_iova_t buf_iova, uint16_t buf_len,
 	struct rte_mbuf_ext_shared_info *shinfo)
-- 
2.11.0

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

* Re: [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro
  2019-01-14  5:20 [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro Yongseok Koh
  2019-01-14  5:20 ` [dpdk-dev] [PATCH 2/2] mbuf: remove experimental tag of external buffer attachment Yongseok Koh
@ 2019-01-14  7:40 ` Andrew Rybchenko
  2019-01-14  9:50   ` Thomas Monjalon
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Rybchenko @ 2019-01-14  7:40 UTC (permalink / raw)
  To: Yongseok Koh, konstantin.ananyev, olivier.matz, thomas; +Cc: dev

On 1/14/19 8:20 AM, Yongseok Koh wrote:
> RTE_MBUF_INDIRECT() is replaced with RTE_MBUF_CLONED() and removed.
> This macro was deprecated in release 18.05 when EXT_ATTACHED_MBUF was
> introduced.
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

<...>

> diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
> index 5a46f1acdc..c4ad072412 100644
> --- a/doc/guides/rel_notes/release_19_02.rst
> +++ b/doc/guides/rel_notes/release_19_02.rst
> @@ -210,6 +210,9 @@ API Changes
>     function from now on. Failed to do so will cause
>     ``rte_cryptodev_sym_session_create()`` function call return error.
>   
> +* mbuf: ``RTE_MBUF_INDIRECT()``, which was deprecated in 18.05, was replaced
> +  with ``RTE_MBUF_CLONED()`` and removed in 19.02.
> +

May be order in New Features should be applicable in API changes as well.

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

* Re: [dpdk-dev] [PATCH 2/2] mbuf: remove experimental tag of external buffer attachment
  2019-01-14  5:20 ` [dpdk-dev] [PATCH 2/2] mbuf: remove experimental tag of external buffer attachment Yongseok Koh
@ 2019-01-14  7:42   ` Andrew Rybchenko
  2019-01-14 15:22     ` Olivier Matz
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Rybchenko @ 2019-01-14  7:42 UTC (permalink / raw)
  To: Yongseok Koh, konstantin.ananyev, olivier.matz, thomas; +Cc: dev

On 1/14/19 8:20 AM, Yongseok Koh wrote:
> Remove the experimental tag of rte_pktmbuf_attach_extbuf() which was
> introduced in 18.05.
>
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* Re: [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro
  2019-01-14  7:40 ` [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro Andrew Rybchenko
@ 2019-01-14  9:50   ` Thomas Monjalon
  2019-01-14 15:23     ` Olivier Matz
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2019-01-14  9:50 UTC (permalink / raw)
  To: Andrew Rybchenko, Yongseok Koh; +Cc: konstantin.ananyev, olivier.matz, dev

14/01/2019 08:40, Andrew Rybchenko:
> On 1/14/19 8:20 AM, Yongseok Koh wrote:
> > RTE_MBUF_INDIRECT() is replaced with RTE_MBUF_CLONED() and removed.
> > This macro was deprecated in release 18.05 when EXT_ATTACHED_MBUF was
> > introduced.
> >
> > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> 
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> <...>
> 
> > diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
> > index 5a46f1acdc..c4ad072412 100644
> > --- a/doc/guides/rel_notes/release_19_02.rst
> > +++ b/doc/guides/rel_notes/release_19_02.rst
> > @@ -210,6 +210,9 @@ API Changes
> >     function from now on. Failed to do so will cause
> >     ``rte_cryptodev_sym_session_create()`` function call return error.
> >   
> > +* mbuf: ``RTE_MBUF_INDIRECT()``, which was deprecated in 18.05, was replaced
> > +  with ``RTE_MBUF_CLONED()`` and removed in 19.02.
> > +
> 
> May be order in New Features should be applicable in API changes as well.

Yes
Usually I take care of it when applying, but would be better to be fixed
in the patch itself :)

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

* Re: [dpdk-dev] [PATCH 2/2] mbuf: remove experimental tag of external buffer attachment
  2019-01-14  7:42   ` Andrew Rybchenko
@ 2019-01-14 15:22     ` Olivier Matz
  0 siblings, 0 replies; 8+ messages in thread
From: Olivier Matz @ 2019-01-14 15:22 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Yongseok Koh, konstantin.ananyev, thomas, dev

On Mon, Jan 14, 2019 at 10:42:21AM +0300, Andrew Rybchenko wrote:
> On 1/14/19 8:20 AM, Yongseok Koh wrote:
> > Remove the experimental tag of rte_pktmbuf_attach_extbuf() which was
> > introduced in 18.05.
> > 
> > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> 
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 

Acked-by: Olivier Matz <olivier.matz@6wind.com>

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

* Re: [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro
  2019-01-14  9:50   ` Thomas Monjalon
@ 2019-01-14 15:23     ` Olivier Matz
  2019-01-14 15:40       ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Olivier Matz @ 2019-01-14 15:23 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, Yongseok Koh, konstantin.ananyev, dev

On Mon, Jan 14, 2019 at 10:50:50AM +0100, Thomas Monjalon wrote:
> 14/01/2019 08:40, Andrew Rybchenko:
> > On 1/14/19 8:20 AM, Yongseok Koh wrote:
> > > RTE_MBUF_INDIRECT() is replaced with RTE_MBUF_CLONED() and removed.
> > > This macro was deprecated in release 18.05 when EXT_ATTACHED_MBUF was
> > > introduced.
> > >
> > > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> > 
> > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

Acked-by: Olivier Matz <olivier.matz@6wind.com>

> > 
> > <...>
> > 
> > > diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
> > > index 5a46f1acdc..c4ad072412 100644
> > > --- a/doc/guides/rel_notes/release_19_02.rst
> > > +++ b/doc/guides/rel_notes/release_19_02.rst
> > > @@ -210,6 +210,9 @@ API Changes
> > >     function from now on. Failed to do so will cause
> > >     ``rte_cryptodev_sym_session_create()`` function call return error.
> > >   
> > > +* mbuf: ``RTE_MBUF_INDIRECT()``, which was deprecated in 18.05, was replaced
> > > +  with ``RTE_MBUF_CLONED()`` and removed in 19.02.
> > > +
> > 
> > May be order in New Features should be applicable in API changes as well.
> 
> Yes
> Usually I take care of it when applying, but would be better to be fixed
> in the patch itself :)
> 
> 

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

* Re: [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro
  2019-01-14 15:23     ` Olivier Matz
@ 2019-01-14 15:40       ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2019-01-14 15:40 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: dev, Olivier Matz, Andrew Rybchenko, konstantin.ananyev

14/01/2019 16:23, Olivier Matz:
> On Mon, Jan 14, 2019 at 10:50:50AM +0100, Thomas Monjalon wrote:
> > 14/01/2019 08:40, Andrew Rybchenko:
> > > On 1/14/19 8:20 AM, Yongseok Koh wrote:
> > > > RTE_MBUF_INDIRECT() is replaced with RTE_MBUF_CLONED() and removed.
> > > > This macro was deprecated in release 18.05 when EXT_ATTACHED_MBUF was
> > > > introduced.
> > > >
> > > > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> > > 
> > > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks

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

end of thread, other threads:[~2019-01-14 15:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14  5:20 [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro Yongseok Koh
2019-01-14  5:20 ` [dpdk-dev] [PATCH 2/2] mbuf: remove experimental tag of external buffer attachment Yongseok Koh
2019-01-14  7:42   ` Andrew Rybchenko
2019-01-14 15:22     ` Olivier Matz
2019-01-14  7:40 ` [dpdk-dev] [PATCH 1/2] mbuf: remove deprecated macro Andrew Rybchenko
2019-01-14  9:50   ` Thomas Monjalon
2019-01-14 15:23     ` Olivier Matz
2019-01-14 15:40       ` Thomas Monjalon

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