summaryrefslogtreecommitdiff
path: root/lib/librte_mbuf
diff options
context:
space:
mode:
authorOlivier Matz <olivier.matz@6wind.com>2018-04-03 15:39:13 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-04-11 23:40:40 +0200
commitd27a6261875d203424e93d7316a0e92852f367b5 (patch)
treebdfb26e720882652dc947a6dd1d17660e1d6d178 /lib/librte_mbuf
parent6f0841b7701bd7f962d2fa982f6a827760f65907 (diff)
downloaddpdk-d27a6261875d203424e93d7316a0e92852f367b5.zip
dpdk-d27a6261875d203424e93d7316a0e92852f367b5.tar.gz
dpdk-d27a6261875d203424e93d7316a0e92852f367b5.tar.xz
mbuf: remove control mbuf
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>
Diffstat (limited to 'lib/librte_mbuf')
-rw-r--r--lib/librte_mbuf/Makefile2
-rw-r--r--lib/librte_mbuf/rte_mbuf.c15
-rw-r--r--lib/librte_mbuf/rte_mbuf.h86
-rw-r--r--lib/librte_mbuf/rte_mbuf_version.map1
4 files changed, 1 insertions, 103 deletions
diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile
index 367568a..8749a00 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 091d388..3f4c833 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 6274025..06eceba 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 d418dcb..2e056d9 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;