mbuf: add function returning buffer address
authorYongseok Koh <yskoh@mellanox.com>
Mon, 14 Jan 2019 21:16:21 +0000 (13:16 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 15 Jan 2019 01:40:40 +0000 (02:40 +0100)
commitc277b34c1b3b787d4b89bb4d0663c1871effbe55
tree41850844ec36b4302614741fb6b02fa93da1ab6c
parentb6ec9ce9e32ac9e86ece11180bac94284158d2ee
mbuf: add function returning buffer address

This patch introduces two new functions - rte_mbuf_buf_addr() and
rte_mbuf_data_addr_default().

rte_mbuf_buf_addr() reutrns the buffer address of given mbuf which comes
after mbuf structure and private data.

rte_mbuf_data_addr_default() returns the default address of mbuf data
taking the headroom into account.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/librte_mbuf/rte_mbuf.h