DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] rte_ctrlmbuf_init() and CTRL_MBUF_FLAG are not used - shouldn't they be removed and deprecated ?
@ 2017-07-03  3:51 Kevin Wilson
  2017-07-03  7:42 ` Olivier Matz
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Wilson @ 2017-07-03  3:51 UTC (permalink / raw)
  To: dev

Hello,
With the most recent master tree we have:

git grep  rte_ctrlmbuf_init
doc/guides/prog_guide/mbuf_lib.rst:The rte_pktmbuf_init() and
rte_ctrlmbuf_init() functions initialize some fields in the mbuf
structure that
lib/librte_mbuf/rte_mbuf.c:rte_ctrlmbuf_init(struct rte_mempool *mp,
lib/librte_mbuf/rte_mbuf.h:void rte_ctrlmbuf_init(struct rte_mempool
*mp, void *opaque_arg,
lib/librte_mbuf/rte_mbuf_version.map:   rte_ctrlmbuf_init;

git grep  rte_is_ctrlmbuf
lib/librte_mbuf/rte_mbuf.h:rte_is_ctrlmbuf(struct rte_mbuf *m)

git grep CTRL_MBUF_FLAG
doc/guides/prog_guide/mbuf_lib.rst:or generic control buffers
(indicated by the CTRL_MBUF_FLAG).
lib/librte_mbuf/rte_mbuf.c:     m->ol_flags |= CTRL_MBUF_FLAG;
lib/librte_mbuf/rte_mbuf.h:#define CTRL_MBUF_FLAG       (1ULL << 63)
/**< Mbuf contains control data */
lib/librte_mbuf/rte_mbuf.h:     return !!(m->ol_flags & CTRL_MBUF_FLAG);

rte_ctrlmbuf_init() and CTRL_MBUF_FLAG and rte_is_ctrlmbuf() are not
used - shouldn't they be removed and deprecated ?

KW

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

* Re: [dpdk-dev] rte_ctrlmbuf_init() and CTRL_MBUF_FLAG are not used - shouldn't they be removed and deprecated ?
  2017-07-03  3:51 [dpdk-dev] rte_ctrlmbuf_init() and CTRL_MBUF_FLAG are not used - shouldn't they be removed and deprecated ? Kevin Wilson
@ 2017-07-03  7:42 ` Olivier Matz
  2017-11-25 11:43   ` Kevin Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Olivier Matz @ 2017-07-03  7:42 UTC (permalink / raw)
  To: Kevin Wilson; +Cc: dev

Hi,

On Mon, 3 Jul 2017 06:51:51 +0300, Kevin Wilson <wkevils@gmail.com> wrote:
> Hello,
> With the most recent master tree we have:
> 
> git grep  rte_ctrlmbuf_init
> doc/guides/prog_guide/mbuf_lib.rst:The rte_pktmbuf_init() and
> rte_ctrlmbuf_init() functions initialize some fields in the mbuf
> structure that
> lib/librte_mbuf/rte_mbuf.c:rte_ctrlmbuf_init(struct rte_mempool *mp,
> lib/librte_mbuf/rte_mbuf.h:void rte_ctrlmbuf_init(struct rte_mempool
> *mp, void *opaque_arg,
> lib/librte_mbuf/rte_mbuf_version.map:   rte_ctrlmbuf_init;
> 
> git grep  rte_is_ctrlmbuf
> lib/librte_mbuf/rte_mbuf.h:rte_is_ctrlmbuf(struct rte_mbuf *m)
> 
> git grep CTRL_MBUF_FLAG
> doc/guides/prog_guide/mbuf_lib.rst:or generic control buffers
> (indicated by the CTRL_MBUF_FLAG).
> lib/librte_mbuf/rte_mbuf.c:     m->ol_flags |= CTRL_MBUF_FLAG;
> lib/librte_mbuf/rte_mbuf.h:#define CTRL_MBUF_FLAG       (1ULL << 63)
> /**< Mbuf contains control data */
> lib/librte_mbuf/rte_mbuf.h:     return !!(m->ol_flags & CTRL_MBUF_FLAG);
> 
> rte_ctrlmbuf_init() and CTRL_MBUF_FLAG and rte_is_ctrlmbuf() are not
> used - shouldn't they be removed and deprecated ?

Yes, I'm in favor of removing it since a long time. This was
discussed and partially removed in 2014, because there was still a
user of it in examples/. But it looks that it's now unused since 2015.

Let's see if someone complains, and if no, we can plan to remove it
for 17.11.

Olivier

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

* Re: [dpdk-dev] rte_ctrlmbuf_init() and CTRL_MBUF_FLAG are not used - shouldn't they be removed and deprecated ?
  2017-07-03  7:42 ` Olivier Matz
@ 2017-11-25 11:43   ` Kevin Wilson
  2017-12-01 16:38     ` Olivier MATZ
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Wilson @ 2017-11-25 11:43 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev

Hi all,

>Let's see if someone complains, and if no, we can plan to remove it
>for 17.11.

Well, unless I missed it, I did not encounter any complaints, and
17.11 was already released.
And the status is of course the same (meaning that in the DPDK tree it
is not used).
Maybe now that 17.11 was just released several days ago, it is a good
time to start deprecation
process for these control MBUF stuff ? I know for sure that for DPDK
newbies who read the programmer's guide
and encounter it, this is a bit confusing (like in

"2.3.3. Network Packet Buffer Management (librte_mbuf)"
in
 http://dpdk.org/doc/guides/prog_guide/overview.html#network-packet-buffer-management-librte-mbuf)
...
...
"This library provides an API to allocate/free mbufs, manipulate
control message buffers (ctrlmbuf) which
are generic message buffers, and packet buffers (pktmbuf) which are
used to carry network packets."
...
...
and of course also confusing those who delve into the code.

Regards,
KW

On Mon, Jul 3, 2017 at 9:42 AM, Olivier Matz <olivier.matz@6wind.com> wrote:
> Hi,
>
> On Mon, 3 Jul 2017 06:51:51 +0300, Kevin Wilson <wkevils@gmail.com> wrote:
>> Hello,
>> With the most recent master tree we have:
>>
>> git grep  rte_ctrlmbuf_init
>> doc/guides/prog_guide/mbuf_lib.rst:The rte_pktmbuf_init() and
>> rte_ctrlmbuf_init() functions initialize some fields in the mbuf
>> structure that
>> lib/librte_mbuf/rte_mbuf.c:rte_ctrlmbuf_init(struct rte_mempool *mp,
>> lib/librte_mbuf/rte_mbuf.h:void rte_ctrlmbuf_init(struct rte_mempool
>> *mp, void *opaque_arg,
>> lib/librte_mbuf/rte_mbuf_version.map:   rte_ctrlmbuf_init;
>>
>> git grep  rte_is_ctrlmbuf
>> lib/librte_mbuf/rte_mbuf.h:rte_is_ctrlmbuf(struct rte_mbuf *m)
>>
>> git grep CTRL_MBUF_FLAG
>> doc/guides/prog_guide/mbuf_lib.rst:or generic control buffers
>> (indicated by the CTRL_MBUF_FLAG).
>> lib/librte_mbuf/rte_mbuf.c:     m->ol_flags |= CTRL_MBUF_FLAG;
>> lib/librte_mbuf/rte_mbuf.h:#define CTRL_MBUF_FLAG       (1ULL << 63)
>> /**< Mbuf contains control data */
>> lib/librte_mbuf/rte_mbuf.h:     return !!(m->ol_flags & CTRL_MBUF_FLAG);
>>
>> rte_ctrlmbuf_init() and CTRL_MBUF_FLAG and rte_is_ctrlmbuf() are not
>> used - shouldn't they be removed and deprecated ?
>
> Yes, I'm in favor of removing it since a long time. This was
> discussed and partially removed in 2014, because there was still a
> user of it in examples/. But it looks that it's now unused since 2015.
>
> Let's see if someone complains, and if no, we can plan to remove it
> for 17.11.
>
> Olivier

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

* Re: [dpdk-dev] rte_ctrlmbuf_init() and CTRL_MBUF_FLAG are not used - shouldn't they be removed and deprecated ?
  2017-11-25 11:43   ` Kevin Wilson
@ 2017-12-01 16:38     ` Olivier MATZ
  2017-12-08 15:49       ` [dpdk-dev] [RFC] mbuf: remove control mbuf Olivier Matz
  0 siblings, 1 reply; 8+ messages in thread
From: Olivier MATZ @ 2017-12-01 16:38 UTC (permalink / raw)
  To: Kevin Wilson; +Cc: dev

Hi Kevin,

On Sat, Nov 25, 2017 at 01:43:17PM +0200, Kevin Wilson wrote:
> Hi all,
> 
> >Let's see if someone complains, and if no, we can plan to remove it
> >for 17.11.
> 
> Well, unless I missed it, I did not encounter any complaints, and
> 17.11 was already released.
> And the status is of course the same (meaning that in the DPDK tree it
> is not used).
> Maybe now that 17.11 was just released several days ago, it is a good
> time to start deprecation
> process for these control MBUF stuff ? I know for sure that for DPDK
> newbies who read the programmer's guide
> and encounter it, this is a bit confusing (like in
> 
> "2.3.3. Network Packet Buffer Management (librte_mbuf)"
> in
>  http://dpdk.org/doc/guides/prog_guide/overview.html#network-packet-buffer-management-librte-mbuf)
> ...
> ...
> "This library provides an API to allocate/free mbufs, manipulate
> control message buffers (ctrlmbuf) which
> are generic message buffers, and packet buffers (pktmbuf) which are
> used to carry network packets."
> ...
> ...
> and of course also confusing those who delve into the code.
> 

I agree.
I'll send a RFC soon, and a deprecation notice for 18.02, planning
a removal for 18.05.

Thanks for spotting it again.

Olivier

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

* [dpdk-dev] [RFC] mbuf: remove control mbuf
  2017-12-01 16:38     ` Olivier MATZ
@ 2017-12-08 15:49       ` Olivier Matz
  2018-04-03 13:39         ` [dpdk-dev] [PATCH] " Olivier Matz
  0 siblings, 1 reply; 8+ messages in thread
From: Olivier Matz @ 2017-12-08 15:49 UTC (permalink / raw)
  To: dev; +Cc: wkevils, konstantin.ananyev

The rte_ctrlmbuf structure is not used by any example application
in dpdk. Remove it, as announced on the mailing list.

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

This RFC targets 18.05.
If no opposition, I'll send a deprecation notice for it.


 doc/guides/prog_guide/glossary.rst   |  3 --
 doc/guides/prog_guide/mbuf_lib.rst   | 11 +++--
 doc/guides/prog_guide/overview.rst   |  4 +-
 doc/guides/prog_guide/source_org.rst |  2 +-
 lib/librte_mbuf/Makefile             |  2 +-
 lib/librte_mbuf/rte_mbuf.c           | 15 -------
 lib/librte_mbuf/rte_mbuf.h           | 86 ------------------------------------
 lib/librte_mbuf/rte_mbuf_version.map |  1 -
 8 files changed, 9 insertions(+), 115 deletions(-)

diff --git a/doc/guides/prog_guide/glossary.rst b/doc/guides/prog_guide/glossary.rst
index 4cbed4c60..a49319423 100644
--- a/doc/guides/prog_guide/glossary.rst
+++ b/doc/guides/prog_guide/glossary.rst
@@ -68,9 +68,6 @@ CPU
 CRC
    Cyclic Redundancy Check
 
-ctrlmbuf
-   An *mbuf* carrying control data.
-
 Data Plane
    In contrast to the control plane, the data plane in a network architecture
    are the layers involved when forwarding packets.  These layers must be
diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst
index 6e73fc5a8..b82f88764 100644
--- a/doc/guides/prog_guide/mbuf_lib.rst
+++ b/doc/guides/prog_guide/mbuf_lib.rst
@@ -37,9 +37,8 @@ The mbuf library provides the ability to allocate and free buffers (mbufs)
 that may be used by the DPDK application to store message buffers.
 The message buffers are stored in a mempool, using the :ref:`Mempool Library <Mempool_Library>`.
 
-A rte_mbuf struct can carry network packet buffers
-or generic control buffers (indicated by the CTRL_MBUF_FLAG).
-This can be extended to other types.
+A rte_mbuf struct generally carries network packet buffers, but it can actually
+be any data (control data, events, ...).
 The rte_mbuf header structure is kept as small as possible and currently uses
 just two cache lines, with the most frequently used fields being on the first
 of the two cache lines.
@@ -95,13 +94,13 @@ Buffers Stored in Memory Pools
 The Buffer Manager uses the :ref:`Mempool Library <Mempool_Library>` to allocate buffers.
 Therefore, it ensures that the packet header is interleaved optimally across the channels and ranks for L3 processing.
 An mbuf contains a field indicating the pool that it originated from.
-When calling rte_ctrlmbuf_free(m) or rte_pktmbuf_free(m), the mbuf returns to its original pool.
+When calling rte_pktmbuf_free(m), the mbuf returns to its original pool.
 
 Constructors
 ------------
 
-Packet and control mbuf constructors are provided by the API.
-The rte_pktmbuf_init() and rte_ctrlmbuf_init() functions initialize some fields in the mbuf structure that
+Packet mbuf constructors are provided by the API.
+The rte_pktmbuf_init() function initializes some fields in the mbuf structure that
 are not modified by the user once created (mbuf type, origin pool, buffer start address, and so on).
 This function is given as a callback function to the rte_mempool_create() function at pool creation time.
 
diff --git a/doc/guides/prog_guide/overview.rst b/doc/guides/prog_guide/overview.rst
index 9986e3cbc..af411fd3b 100644
--- a/doc/guides/prog_guide/overview.rst
+++ b/doc/guides/prog_guide/overview.rst
@@ -157,8 +157,8 @@ The mbuf library provides the facility to create and destroy buffers
 that may be used by the DPDK application to store message buffers.
 The message buffers are created at startup time and stored in a mempool, using the DPDK mempool library.
 
-This library provides an API to allocate/free mbufs, manipulate control message buffers (ctrlmbuf) which are generic message buffers,
-and packet buffers (pktmbuf) which are used to carry network packets.
+This library provides an API to allocate/free mbufs, manipulate
+packet buffers which are used to carry network packets.
 
 Network Packet Buffer Management is described in :ref:`Mbuf Library <Mbuf_Library>`.
 
diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst
index 7aab4b45e..06c9d8fe9 100644
--- a/doc/guides/prog_guide/source_org.rst
+++ b/doc/guides/prog_guide/source_org.rst
@@ -73,7 +73,7 @@ The lib directory contains::
     +-- librte_kni          # Kernel NIC interface
     +-- librte_kvargs       # Argument parsing library
     +-- librte_lpm          # Longest prefix match library
-    +-- librte_mbuf         # Packet and control mbuf manipulation
+    +-- librte_mbuf         # Packet buffer manipulation
     +-- librte_mempool      # Memory pool manager (fixed sized objects)
     +-- librte_meter        # QoS metering library
     +-- librte_net          # Various IP-related headers
diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
index f6be35366..aa879a13e 100644
--- a/lib/librte_mbuf/Makefile
+++ b/lib/librte_mbuf/Makefile
@@ -39,7 +39,7 @@ LDLIBS += -lrte_eal -lrte_mempool
 
 EXPORT_MAP := rte_mbuf_version.map
 
-LIBABIVER := 3
+LIBABIVER := 4
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c rte_mbuf_ptype.c
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 7543662f7..2f0dec1e3 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -60,21 +60,6 @@
 #include <rte_memcpy.h>
 
 /*
- * ctrlmbuf constructor, given as a callback function to
- * rte_mempool_obj_iter() or rte_mempool_create()
- */
-void
-rte_ctrlmbuf_init(struct rte_mempool *mp,
-		__attribute__((unused)) void *opaque_arg,
-		void *_m,
-		__attribute__((unused)) unsigned i)
-{
-	struct rte_mbuf *m = _m;
-	rte_pktmbuf_init(mp, opaque_arg, _m, i);
-	m->ol_flags |= CTRL_MBUF_FLAG;
-}
-
-/*
  * pktmbuf pool constructor, given as a callback function to
  * rte_mempool_create(), or called directly if using
  * rte_mempool_create_empty()/rte_mempool_populate()
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index dd08cb72b..2c48ef9ae 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -343,9 +343,6 @@ extern "C" {
 
 #define IND_ATTACHED_MBUF    (1ULL << 62) /**< Indirect attached mbuf */
 
-/* Use final bit of flags to indicate a control mbuf */
-#define CTRL_MBUF_FLAG       (1ULL << 63) /**< Mbuf contains control data */
-
 /** Alignment constraint of mbuf private area. */
 #define RTE_MBUF_PRIV_ALIGN 8
 
@@ -930,89 +927,6 @@ __rte_mbuf_raw_free(struct rte_mbuf *m)
 	rte_mbuf_raw_free(m);
 }
 
-/* Operations on ctrl mbuf */
-
-/**
- * The control mbuf constructor.
- *
- * This function initializes some fields in an mbuf structure that are
- * not modified by the user once created (mbuf type, origin pool, buffer
- * start address, and so on). This function is given as a callback function
- * to rte_mempool_obj_iter() or rte_mempool_create() at pool creation time.
- *
- * @param mp
- *   The mempool from which the mbuf is allocated.
- * @param opaque_arg
- *   A pointer that can be used by the user to retrieve useful information
- *   for mbuf initialization. This pointer is the opaque argument passed to
- *   rte_mempool_obj_iter() or rte_mempool_create().
- * @param m
- *   The mbuf to initialize.
- * @param i
- *   The index of the mbuf in the pool table.
- */
-void rte_ctrlmbuf_init(struct rte_mempool *mp, void *opaque_arg,
-		void *m, unsigned i);
-
-/**
- * Allocate a new mbuf (type is ctrl) from mempool *mp*.
- *
- * This new mbuf is initialized with data pointing to the beginning of
- * buffer, and with a length of zero.
- *
- * @param mp
- *   The mempool from which the mbuf is allocated.
- * @return
- *   - The pointer to the new mbuf on success.
- *   - NULL if allocation failed.
- */
-#define rte_ctrlmbuf_alloc(mp) rte_pktmbuf_alloc(mp)
-
-/**
- * Free a control mbuf back into its original mempool.
- *
- * @param m
- *   The control mbuf to be freed.
- */
-#define rte_ctrlmbuf_free(m) rte_pktmbuf_free(m)
-
-/**
- * A macro that returns the pointer to the carried data.
- *
- * The value that can be read or assigned.
- *
- * @param m
- *   The control mbuf.
- */
-#define rte_ctrlmbuf_data(m) ((char *)((m)->buf_addr) + (m)->data_off)
-
-/**
- * A macro that returns the length of the carried data.
- *
- * The value that can be read or assigned.
- *
- * @param m
- *   The control mbuf.
- */
-#define rte_ctrlmbuf_len(m) rte_pktmbuf_data_len(m)
-
-/**
- * Tests if an mbuf is a control mbuf
- *
- * @param m
- *   The mbuf to be tested
- * @return
- *   - True (1) if the mbuf is a control mbuf
- *   - False(0) otherwise
- */
-static inline int
-rte_is_ctrlmbuf(struct rte_mbuf *m)
-{
-	return !!(m->ol_flags & CTRL_MBUF_FLAG);
-}
-
-/* Operations on pkt mbuf */
-
 /**
  * The packet mbuf constructor.
  *
diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map
index 6e2ea8456..43bed8c95 100644
--- a/lib/librte_mbuf/rte_mbuf_version.map
+++ b/lib/librte_mbuf/rte_mbuf_version.map
@@ -1,7 +1,6 @@
 DPDK_2.0 {
 	global:
 
-	rte_ctrlmbuf_init;
 	rte_get_rx_ol_flag_name;
 	rte_get_tx_ol_flag_name;
 	rte_mbuf_sanity_check;
-- 
2.11.0

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

* [dpdk-dev] [PATCH] mbuf: remove control mbuf
  2017-12-08 15:49       ` [dpdk-dev] [RFC] mbuf: remove control mbuf Olivier Matz
@ 2018-04-03 13:39         ` Olivier Matz
  2018-04-03 14:42           ` Jerin Jacob
  0 siblings, 1 reply; 8+ messages in thread
From: Olivier Matz @ 2018-04-03 13:39 UTC (permalink / raw)
  To: dev

The rte_ctrlmbuf structure is not used by any example application
in dpdk. Remove it, as announced on the mailing list.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 doc/guides/prog_guide/glossary.rst     |  3 --
 doc/guides/prog_guide/mbuf_lib.rst     | 11 ++---
 doc/guides/prog_guide/overview.rst     |  4 +-
 doc/guides/prog_guide/source_org.rst   |  2 +-
 doc/guides/rel_notes/deprecation.rst   | 13 -----
 doc/guides/rel_notes/release_18_05.rst | 15 +++++-
 lib/librte_mbuf/Makefile               |  2 +-
 lib/librte_mbuf/rte_mbuf.c             | 15 ------
 lib/librte_mbuf/rte_mbuf.h             | 86 ----------------------------------
 lib/librte_mbuf/rte_mbuf_version.map   |  1 -
 10 files changed, 23 insertions(+), 129 deletions(-)

diff --git a/doc/guides/prog_guide/glossary.rst b/doc/guides/prog_guide/glossary.rst
index e101bc022..dda45bd18 100644
--- a/doc/guides/prog_guide/glossary.rst
+++ b/doc/guides/prog_guide/glossary.rst
@@ -41,9 +41,6 @@ CPU
 CRC
    Cyclic Redundancy Check
 
-ctrlmbuf
-   An *mbuf* carrying control data.
-
 Data Plane
    In contrast to the control plane, the data plane in a network architecture
    are the layers involved when forwarding packets.  These layers must be
diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst
index 210a9af9f..0d3223b08 100644
--- a/doc/guides/prog_guide/mbuf_lib.rst
+++ b/doc/guides/prog_guide/mbuf_lib.rst
@@ -10,9 +10,8 @@ The mbuf library provides the ability to allocate and free buffers (mbufs)
 that may be used by the DPDK application to store message buffers.
 The message buffers are stored in a mempool, using the :ref:`Mempool Library <Mempool_Library>`.
 
-A rte_mbuf struct can carry network packet buffers
-or generic control buffers (indicated by the CTRL_MBUF_FLAG).
-This can be extended to other types.
+A rte_mbuf struct generally carries network packet buffers, but it can actually
+be any data (control data, events, ...).
 The rte_mbuf header structure is kept as small as possible and currently uses
 just two cache lines, with the most frequently used fields being on the first
 of the two cache lines.
@@ -68,13 +67,13 @@ Buffers Stored in Memory Pools
 The Buffer Manager uses the :ref:`Mempool Library <Mempool_Library>` to allocate buffers.
 Therefore, it ensures that the packet header is interleaved optimally across the channels and ranks for L3 processing.
 An mbuf contains a field indicating the pool that it originated from.
-When calling rte_ctrlmbuf_free(m) or rte_pktmbuf_free(m), the mbuf returns to its original pool.
+When calling rte_pktmbuf_free(m), the mbuf returns to its original pool.
 
 Constructors
 ------------
 
-Packet and control mbuf constructors are provided by the API.
-The rte_pktmbuf_init() and rte_ctrlmbuf_init() functions initialize some fields in the mbuf structure that
+Packet mbuf constructors are provided by the API.
+The rte_pktmbuf_init() function initializes some fields in the mbuf structure that
 are not modified by the user once created (mbuf type, origin pool, buffer start address, and so on).
 This function is given as a callback function to the rte_mempool_create() function at pool creation time.
 
diff --git a/doc/guides/prog_guide/overview.rst b/doc/guides/prog_guide/overview.rst
index 2663fe0e8..c01f37e3c 100644
--- a/doc/guides/prog_guide/overview.rst
+++ b/doc/guides/prog_guide/overview.rst
@@ -130,8 +130,8 @@ The mbuf library provides the facility to create and destroy buffers
 that may be used by the DPDK application to store message buffers.
 The message buffers are created at startup time and stored in a mempool, using the DPDK mempool library.
 
-This library provides an API to allocate/free mbufs, manipulate control message buffers (ctrlmbuf) which are generic message buffers,
-and packet buffers (pktmbuf) which are used to carry network packets.
+This library provides an API to allocate/free mbufs, manipulate
+packet buffers which are used to carry network packets.
 
 Network Packet Buffer Management is described in :ref:`Mbuf Library <Mbuf_Library>`.
 
diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst
index a8f5832bc..b640b0111 100644
--- a/doc/guides/prog_guide/source_org.rst
+++ b/doc/guides/prog_guide/source_org.rst
@@ -46,7 +46,7 @@ The lib directory contains::
     +-- librte_kni          # Kernel NIC interface
     +-- librte_kvargs       # Argument parsing library
     +-- librte_lpm          # Longest prefix match library
-    +-- librte_mbuf         # Packet and control mbuf manipulation
+    +-- librte_mbuf         # Packet buffer manipulation
     +-- librte_mempool      # Memory pool manager (fixed sized objects)
     +-- librte_meter        # QoS metering library
     +-- librte_net          # Various IP-related headers
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 84e153461..61b8ac705 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -76,19 +76,6 @@ Deprecation Notices
     customize objects population and allocate contiguous
     block of objects if underlying driver supports it.
 
-* mbuf: The control mbuf API will be removed in v18.05. The impacted
-  functions and macros are:
-
-  - ``rte_ctrlmbuf_init()``
-  - ``rte_ctrlmbuf_alloc()``
-  - ``rte_ctrlmbuf_free()``
-  - ``rte_ctrlmbuf_data()``
-  - ``rte_ctrlmbuf_len()``
-  - ``rte_is_ctrlmbuf()``
-  - ``CTRL_MBUF_FLAG``
-
-  The packet mbuf API should be used as a replacement.
-
 * mbuf: The opaque ``mbuf->hash.sched`` field will be updated to support generic
   definition in line with the ethdev TM and MTR APIs. Currently, this field
   is defined in librte_sched in a non-generic way. The new generic format
diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index 4d0276f1d..9b9a74885 100644
--- a/doc/guides/rel_notes/release_18_05.rst
+++ b/doc/guides/rel_notes/release_18_05.rst
@@ -72,6 +72,19 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* mbuf: The control mbuf API has been removed in v18.05. The impacted
+  functions and macros are:
+
+  - ``rte_ctrlmbuf_init()``
+  - ``rte_ctrlmbuf_alloc()``
+  - ``rte_ctrlmbuf_free()``
+  - ``rte_ctrlmbuf_data()``
+  - ``rte_ctrlmbuf_len()``
+  - ``rte_is_ctrlmbuf()``
+  - ``CTRL_MBUF_FLAG``
+
+  The packet mbuf API should be used as a replacement.
+
 
 ABI Changes
 -----------
@@ -163,7 +176,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_kvargs.so.1
      librte_latencystats.so.1
      librte_lpm.so.2
-     librte_mbuf.so.3
+   + librte_mbuf.so.4
      librte_mempool.so.3
    + librte_meter.so.2
      librte_metrics.so.1
diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
index 367568ae3..8749a00fe 100644
--- a/lib/librte_mbuf/Makefile
+++ b/lib/librte_mbuf/Makefile
@@ -12,7 +12,7 @@ LDLIBS += -lrte_eal -lrte_mempool
 
 EXPORT_MAP := rte_mbuf_version.map
 
-LIBABIVER := 3
+LIBABIVER := 4
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c rte_mbuf_ptype.c rte_mbuf_pool_ops.c
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 091d388d3..3f4c83305 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -33,21 +33,6 @@
 #include <rte_memcpy.h>
 
 /*
- * ctrlmbuf constructor, given as a callback function to
- * rte_mempool_obj_iter() or rte_mempool_create()
- */
-void
-rte_ctrlmbuf_init(struct rte_mempool *mp,
-		__attribute__((unused)) void *opaque_arg,
-		void *_m,
-		__attribute__((unused)) unsigned i)
-{
-	struct rte_mbuf *m = _m;
-	rte_pktmbuf_init(mp, opaque_arg, _m, i);
-	m->ol_flags |= CTRL_MBUF_FLAG;
-}
-
-/*
  * pktmbuf pool constructor, given as a callback function to
  * rte_mempool_create(), or called directly if using
  * rte_mempool_create_empty()/rte_mempool_populate()
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 62740254d..06eceba37 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -330,9 +330,6 @@ extern "C" {
 
 #define IND_ATTACHED_MBUF    (1ULL << 62) /**< Indirect attached mbuf */
 
-/* Use final bit of flags to indicate a control mbuf */
-#define CTRL_MBUF_FLAG       (1ULL << 63) /**< Mbuf contains control data */
-
 /** Alignment constraint of mbuf private area. */
 #define RTE_MBUF_PRIV_ALIGN 8
 
@@ -915,89 +912,6 @@ __rte_mbuf_raw_free(struct rte_mbuf *m)
 	rte_mbuf_raw_free(m);
 }
 
-/* Operations on ctrl mbuf */
-
-/**
- * The control mbuf constructor.
- *
- * This function initializes some fields in an mbuf structure that are
- * not modified by the user once created (mbuf type, origin pool, buffer
- * start address, and so on). This function is given as a callback function
- * to rte_mempool_obj_iter() or rte_mempool_create() at pool creation time.
- *
- * @param mp
- *   The mempool from which the mbuf is allocated.
- * @param opaque_arg
- *   A pointer that can be used by the user to retrieve useful information
- *   for mbuf initialization. This pointer is the opaque argument passed to
- *   rte_mempool_obj_iter() or rte_mempool_create().
- * @param m
- *   The mbuf to initialize.
- * @param i
- *   The index of the mbuf in the pool table.
- */
-void rte_ctrlmbuf_init(struct rte_mempool *mp, void *opaque_arg,
-		void *m, unsigned i);
-
-/**
- * Allocate a new mbuf (type is ctrl) from mempool *mp*.
- *
- * This new mbuf is initialized with data pointing to the beginning of
- * buffer, and with a length of zero.
- *
- * @param mp
- *   The mempool from which the mbuf is allocated.
- * @return
- *   - The pointer to the new mbuf on success.
- *   - NULL if allocation failed.
- */
-#define rte_ctrlmbuf_alloc(mp) rte_pktmbuf_alloc(mp)
-
-/**
- * Free a control mbuf back into its original mempool.
- *
- * @param m
- *   The control mbuf to be freed.
- */
-#define rte_ctrlmbuf_free(m) rte_pktmbuf_free(m)
-
-/**
- * A macro that returns the pointer to the carried data.
- *
- * The value that can be read or assigned.
- *
- * @param m
- *   The control mbuf.
- */
-#define rte_ctrlmbuf_data(m) ((char *)((m)->buf_addr) + (m)->data_off)
-
-/**
- * A macro that returns the length of the carried data.
- *
- * The value that can be read or assigned.
- *
- * @param m
- *   The control mbuf.
- */
-#define rte_ctrlmbuf_len(m) rte_pktmbuf_data_len(m)
-
-/**
- * Tests if an mbuf is a control mbuf
- *
- * @param m
- *   The mbuf to be tested
- * @return
- *   - True (1) if the mbuf is a control mbuf
- *   - False(0) otherwise
- */
-static inline int
-rte_is_ctrlmbuf(struct rte_mbuf *m)
-{
-	return !!(m->ol_flags & CTRL_MBUF_FLAG);
-}
-
-/* Operations on pkt mbuf */
-
 /**
  * The packet mbuf constructor.
  *
diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map
index d418dcb82..2e056d994 100644
--- a/lib/librte_mbuf/rte_mbuf_version.map
+++ b/lib/librte_mbuf/rte_mbuf_version.map
@@ -1,7 +1,6 @@
 DPDK_2.0 {
 	global:
 
-	rte_ctrlmbuf_init;
 	rte_get_rx_ol_flag_name;
 	rte_get_tx_ol_flag_name;
 	rte_mbuf_sanity_check;
-- 
2.11.0

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

* Re: [dpdk-dev] [PATCH] mbuf: remove control mbuf
  2018-04-03 13:39         ` [dpdk-dev] [PATCH] " Olivier Matz
@ 2018-04-03 14:42           ` Jerin Jacob
  2018-04-11 21:54             ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Jerin Jacob @ 2018-04-03 14:42 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev

-----Original Message-----
> Date: Tue, 3 Apr 2018 15:39:13 +0200
> From: Olivier Matz <olivier.matz@6wind.com>
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] mbuf: remove control mbuf
> X-Mailer: git-send-email 2.11.0
> 
> The rte_ctrlmbuf structure is not used by any example application
> in dpdk. Remove it, as announced on the mailing list.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

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

* Re: [dpdk-dev] [PATCH] mbuf: remove control mbuf
  2018-04-03 14:42           ` Jerin Jacob
@ 2018-04-11 21:54             ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2018-04-11 21:54 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, Jerin Jacob

> > The rte_ctrlmbuf structure is not used by any example application
> > in dpdk. Remove it, as announced on the mailing list.
> > 
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied, thanks

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

end of thread, other threads:[~2018-04-11 21:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03  3:51 [dpdk-dev] rte_ctrlmbuf_init() and CTRL_MBUF_FLAG are not used - shouldn't they be removed and deprecated ? Kevin Wilson
2017-07-03  7:42 ` Olivier Matz
2017-11-25 11:43   ` Kevin Wilson
2017-12-01 16:38     ` Olivier MATZ
2017-12-08 15:49       ` [dpdk-dev] [RFC] mbuf: remove control mbuf Olivier Matz
2018-04-03 13:39         ` [dpdk-dev] [PATCH] " Olivier Matz
2018-04-03 14:42           ` Jerin Jacob
2018-04-11 21:54             ` 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).