aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic/include')
-rw-r--r--platform/linux-generic/include/odp/api/plat/buffer_inlines.h2
-rw-r--r--platform/linux-generic/include/odp/api/plat/packet_inlines.h2
-rw-r--r--platform/linux-generic/include/odp/api/plat/packet_vector_inlines.h2
-rw-r--r--platform/linux-generic/include/odp_event_internal.h5
-rw-r--r--platform/linux-generic/include/odp_packet_internal.h8
5 files changed, 10 insertions, 9 deletions
diff --git a/platform/linux-generic/include/odp/api/plat/buffer_inlines.h b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h
index 9466ff73d..576eb846e 100644
--- a/platform/linux-generic/include/odp/api/plat/buffer_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h
@@ -46,7 +46,7 @@ _ODP_INLINE void *odp_buffer_addr(odp_buffer_t buf)
_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);
+ return _odp_event_hdr_field(buf, odp_pool_t, pool);
}
/** @endcond */
diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
index 0fc46e056..950ede8d7 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
@@ -127,7 +127,7 @@ _ODP_INLINE uint32_t odp_packet_tailroom(odp_packet_t pkt)
_ODP_INLINE odp_pool_t odp_packet_pool(odp_packet_t pkt)
{
- return (odp_pool_t)(uintptr_t)_odp_pkt_get(pkt, void *, pool);
+ return _odp_pkt_get(pkt, odp_pool_t, pool);
}
_ODP_INLINE odp_pktio_t odp_packet_input(odp_packet_t pkt)
diff --git a/platform/linux-generic/include/odp/api/plat/packet_vector_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_vector_inlines.h
index 63fa6869b..c8da1b77a 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_vector_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_vector_inlines.h
@@ -59,7 +59,7 @@ _ODP_INLINE uint32_t odp_packet_vector_tbl(odp_packet_vector_t pktv, odp_packet_
_ODP_INLINE odp_pool_t odp_packet_vector_pool(odp_packet_vector_t pktv)
{
- return (odp_pool_t)(uintptr_t)_odp_event_vect_get(pktv, void *, pool);
+ return _odp_event_vect_get(pktv, odp_pool_t, pool);
}
_ODP_INLINE uint32_t odp_packet_vector_size(odp_packet_vector_t pktv)
diff --git a/platform/linux-generic/include/odp_event_internal.h b/platform/linux-generic/include/odp_event_internal.h
index 60788fd52..5a29e926e 100644
--- a/platform/linux-generic/include/odp_event_internal.h
+++ b/platform/linux-generic/include/odp_event_internal.h
@@ -19,6 +19,7 @@ extern "C" {
#include <odp/api/debug.h>
#include <odp/api/event.h>
+#include <odp/api/pool_types.h>
#include <odp/api/std_types.h>
#include <odp_config_internal.h>
@@ -47,8 +48,8 @@ typedef struct _odp_event_hdr_t {
/* Initial buffer data pointer */
uint8_t *base_data;
- /* Pool pointer */
- void *pool_ptr;
+ /* Pool handle */
+ odp_pool_t pool;
/* --- Mostly read only data --- */
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index f9fdb2c3b..253650b6d 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -221,7 +221,7 @@ static inline void packet_subtype_set(odp_packet_t pkt, int ev)
*/
static inline void packet_init(odp_packet_hdr_t *pkt_hdr, uint32_t len)
{
- pool_t *pool = pkt_hdr->event_hdr.pool_ptr;
+ pool_t *pool = _odp_pool_entry(pkt_hdr->event_hdr.pool);
uint32_t seg_len;
int num = pkt_hdr->seg_count;
@@ -337,8 +337,8 @@ static inline void _odp_packet_copy_md(odp_packet_hdr_t *dst_hdr,
if (src_hdr->uarea_addr) {
if (uarea_copy) {
- const pool_t *src_pool = src_hdr->event_hdr.pool_ptr;
- const pool_t *dst_pool = dst_hdr->event_hdr.pool_ptr;
+ const pool_t *src_pool = _odp_pool_entry(src_hdr->event_hdr.pool);
+ const pool_t *dst_pool = _odp_pool_entry(dst_hdr->event_hdr.pool);
const uint32_t src_uarea_size = src_pool->param_uarea_size;
const uint32_t dst_uarea_size = dst_pool->param_uarea_size;
@@ -351,7 +351,7 @@ static inline void _odp_packet_copy_md(odp_packet_hdr_t *dst_hdr,
/* If user area exists, packets should always be from the same pool, so
* user area pointers can simply be swapped. */
- ODP_ASSERT(dst_hdr->event_hdr.pool_ptr == src_hdr->event_hdr.pool_ptr);
+ ODP_ASSERT(dst_hdr->event_hdr.pool == src_hdr->event_hdr.pool);
src_hdr->uarea_addr = dst_hdr->uarea_addr;
dst_hdr->uarea_addr = src_uarea;