aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include/odp
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2022-11-07 10:22:45 +0200
committerMatias Elo <matias.elo@nokia.com>2022-11-17 14:09:14 +0200
commit9c648009d1e2061762cd03e8720162e1a9a59a52 (patch)
tree00b196ca5d292e1fcc95df1512f26c6e8c340a6d /platform/linux-dpdk/include/odp
parent74c616400f239d2adedf1929568875874b8e0000 (diff)
Port 5fb9fc0af "linux-gen: buffer: inline odp_buffer_user_area() implementation"
Port original commit from linux-generic. Unused internal _odp_buffer_type functions have been removed. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/include/odp')
l---------platform/linux-dpdk/include/odp/api/plat/buffer_inline_types.h1
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/buffer_inlines.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/platform/linux-dpdk/include/odp/api/plat/buffer_inline_types.h b/platform/linux-dpdk/include/odp/api/plat/buffer_inline_types.h
new file mode 120000
index 000000000..4ef8ae6f2
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/buffer_inline_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/buffer_inline_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/buffer_inlines.h b/platform/linux-dpdk/include/odp/api/plat/buffer_inlines.h
index 8e506e764..3984a5570 100644
--- a/platform/linux-dpdk/include/odp/api/plat/buffer_inlines.h
+++ b/platform/linux-dpdk/include/odp/api/plat/buffer_inlines.h
@@ -13,6 +13,7 @@
#include <odp/api/abi/buffer.h>
+#include <odp/api/plat/buffer_inline_types.h>
#include <odp/api/plat/debug_inlines.h>
#include <odp/api/plat/event_inline_types.h>
@@ -29,6 +30,7 @@
/** @cond _ODP_HIDE_FROM_DOXYGEN_ */
extern const _odp_event_inline_offset_t _odp_event_inline_offset;
+extern const _odp_buffer_inline_offset_t _odp_buffer_inline_offset;
#ifndef _ODP_NO_INLINE
/* Inline functions by default */
@@ -38,6 +40,7 @@ extern const _odp_event_inline_offset_t _odp_event_inline_offset;
#define odp_buffer_addr __odp_buffer_addr
#define odp_buffer_size __odp_buffer_size
#define odp_buffer_pool __odp_buffer_pool
+ #define odp_buffer_user_area __odp_buffer_user_area
#define odp_buffer_free __odp_buffer_free
#define odp_buffer_free_multi __odp_buffer_free_multi
#else
@@ -71,6 +74,11 @@ _ODP_INLINE odp_pool_t odp_buffer_pool(odp_buffer_t buf)
return (odp_pool_t)(uintptr_t)_odp_event_hdr_field(buf, void *, pool);
}
+_ODP_INLINE void *odp_buffer_user_area(odp_buffer_t buf)
+{
+ return _odp_buffer_get(buf, void *, uarea_addr);
+}
+
_ODP_INLINE void odp_buffer_free(odp_buffer_t buf)
{
struct rte_mbuf *mbuf = (struct rte_mbuf *)buf;