@@ -18,23 +18,23 @@
extern "C" {
#endif
-
-#include <odp/plat/buffer_types.h>
+#include <odp/std_types.h>
+#include <odp/plat/strong_types.h>
/** @addtogroup odp_packet ODP PACKET
* Operations on a packet.
* @{
*/
-typedef odp_buffer_t odp_packet_t;
+typedef odp_handle_t odp_packet_t;
-#define ODP_PACKET_INVALID ODP_BUFFER_INVALID
+#define ODP_PACKET_INVALID _odp_cast_scalar(odp_packet_t, 0xffffffff)
#define ODP_PACKET_OFFSET_INVALID (0x0fffffff)
-typedef odp_buffer_t odp_packet_seg_t;
+typedef odp_handle_t odp_packet_seg_t;
-#define ODP_PACKET_SEG_INVALID ODP_BUFFER_INVALID
+#define ODP_PACKET_SEG_INVALID _odp_cast_scalar(odp_packet_seg_t, 0xffffffff)
/**
* @}
@@ -193,10 +193,10 @@ void *odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len,
if (addr != NULL && seg != NULL) {
odp_buffer_bits_t seghandle;
- seghandle.handle = pkt;
+ seghandle.handle = (odp_buffer_t)pkt;
seghandle.seg = (pkt_hdr->headroom + offset) /
pkt_hdr->buf_hdr.segsize;
- *seg = seghandle.handle;
+ *seg = (odp_packet_seg_t)seghandle.handle;
}
return addr;
@@ -325,9 +325,9 @@ odp_packet_seg_t odp_packet_last_seg(odp_packet_t pkt)
odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
odp_buffer_bits_t seghandle;
- seghandle.handle = pkt;
+ seghandle.handle = (odp_buffer_t)pkt;
seghandle.seg = pkt_hdr->buf_hdr.segcount - 1;
- return seghandle.handle;
+ return (odp_packet_seg_t)seghandle.handle;
}
odp_packet_seg_t odp_packet_next_seg(odp_packet_t pkt, odp_packet_seg_t seg)
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- platform/linux-generic/include/odp/plat/packet_types.h | 12 ++++++------ platform/linux-generic/odp_packet.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-)