X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_mbuf%2Frte_mbuf.h;h=a50b05c648c794d8a65737549209531e485a503d;hb=41dbdb68723b;hp=8e6b4d2923c8ae377c727926ef30516822a3b4a8;hpb=242b46b814725df6215c0df5f751e9d814f12af9;p=dpdk.git diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 8e6b4d2923..a50b05c648 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -728,6 +728,24 @@ rte_mbuf_to_baddr(struct rte_mbuf *md) return buffer_addr; } +/** + * Return the starting address of the private data area embedded in + * the given mbuf. + * + * Note that no check is made to ensure that a private data area + * actually exists in the supplied mbuf. + * + * @param m + * The pointer to the mbuf. + * @return + * The starting address of the private data area of the given mbuf. + */ +static inline void * __rte_experimental +rte_mbuf_to_priv(struct rte_mbuf *m) +{ + return RTE_PTR_ADD(m, sizeof(struct rte_mbuf)); +} + /** * Returns TRUE if given mbuf is cloned by mbuf indirection, or FALSE * otherwise. @@ -1020,14 +1038,6 @@ rte_mbuf_raw_free(struct rte_mbuf *m) rte_mempool_put(m->pool, m); } -/* compat with older versions */ -__rte_deprecated -static inline void -__rte_mbuf_raw_free(struct rte_mbuf *m) -{ - rte_mbuf_raw_free(m); -} - /** * The packet mbuf constructor. * @@ -1146,7 +1156,7 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone */ -struct rte_mempool * __rte_experimental +struct rte_mempool * rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n, unsigned int cache_size, uint16_t priv_size, uint16_t data_room_size, int socket_id, const char *ops_name); @@ -1640,14 +1650,6 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m) return NULL; } -/* deprecated, replaced by rte_pktmbuf_prefree_seg() */ -__rte_deprecated -static inline struct rte_mbuf * -__rte_pktmbuf_prefree_seg(struct rte_mbuf *m) -{ - return rte_pktmbuf_prefree_seg(m); -} - /** * Free a segment of a packet mbuf into its original mempool. *