@@ -84,13 +84,7 @@ struct ODP_ALIGNED_CACHE odp_buffer_hdr_t {
struct odp_buffer_hdr_t *burst[BUFFER_BURST_SIZE];
/* --- Mostly read only data --- */
-
- /* User context pointer or u64 */
- union {
- uint64_t buf_u64;
- void *buf_ctx;
- const void *buf_cctx; /* const alias for ctx */
- };
+ const void *user_ptr;
/* Reference count */
odp_atomic_u32_t ref_cnt;
@@ -35,7 +35,7 @@ const _odp_packet_inline_offset_t ODP_ALIGNED_CACHE _odp_packet_inline = {
.pool = offsetof(odp_packet_hdr_t, buf_hdr.pool_ptr),
.input = offsetof(odp_packet_hdr_t, input),
.segcount = offsetof(odp_packet_hdr_t, buf_hdr.segcount),
- .user_ptr = offsetof(odp_packet_hdr_t, buf_hdr.buf_ctx),
+ .user_ptr = offsetof(odp_packet_hdr_t, buf_hdr.user_ptr),
.user_area = offsetof(odp_packet_hdr_t, buf_hdr.uarea_addr),
.l2_offset = offsetof(odp_packet_hdr_t, p.l2_offset),
.l3_offset = offsetof(odp_packet_hdr_t, p.l3_offset),
@@ -265,7 +265,7 @@ static inline void packet_seg_copy_md(odp_packet_hdr_t *dst,
dst->timestamp = src->timestamp;
/* buffer header side packet metadata */
- dst->buf_hdr.buf_u64 = src->buf_hdr.buf_u64;
+ dst->buf_hdr.user_ptr = src->buf_hdr.user_ptr;
dst->buf_hdr.uarea_addr = src->buf_hdr.uarea_addr;
/* segmentation data is not copied:
@@ -1258,9 +1258,9 @@ int odp_packet_input_index(odp_packet_t pkt)
return odp_pktio_index(packet_hdr(pkt)->input);
}
-void odp_packet_user_ptr_set(odp_packet_t pkt, const void *ctx)
+void odp_packet_user_ptr_set(odp_packet_t pkt, const void *ptr)
{
- packet_hdr(pkt)->buf_hdr.buf_cctx = ctx;
+ packet_hdr(pkt)->buf_hdr.user_ptr = ptr;
}
int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset)
@@ -1931,7 +1931,7 @@ int _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, odp_packet_t dstpkt)
dsthdr->input = srchdr->input;
dsthdr->dst_queue = srchdr->dst_queue;
- dsthdr->buf_hdr.buf_u64 = srchdr->buf_hdr.buf_u64;
+ dsthdr->buf_hdr.user_ptr = srchdr->buf_hdr.user_ptr;
if (dsthdr->buf_hdr.uarea_addr != NULL &&
srchdr->buf_hdr.uarea_addr != NULL) {
memcpy(dsthdr->buf_hdr.uarea_addr, srchdr->buf_hdr.uarea_addr,