aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include/odp_buffer_internal.h
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-05-14 16:12:05 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-05-15 16:54:34 +0300
commitc484446b4930b5398e958f855917d54a97e6f2c7 (patch)
treee7ae88da5eed03264fa40422ecaef5a4e2bf8790 /platform/linux-dpdk/include/odp_buffer_internal.h
parentd295255c83cea92e93b1f4e9aa977fa36cfe2d98 (diff)
Port 49c671e8, 11207ff1, 3abbe8b7, f49289a7v1.19.0.1_DPDK_17.1
Fix build issues from the latest merge. These commits needed porting: 49c671e8 odp: pktio: add pcapng capture capabilities 11207ff1 linux-gen: use inlined event type function 3abbe8b7 linux-gen: event: inline event_type function f49289a7 linux-gen: buffer: remove buffer_inlines header file Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>i Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-dpdk/include/odp_buffer_internal.h')
-rw-r--r--platform/linux-dpdk/include/odp_buffer_internal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/platform/linux-dpdk/include/odp_buffer_internal.h b/platform/linux-dpdk/include/odp_buffer_internal.h
index f96a80e99..5af9b527e 100644
--- a/platform/linux-dpdk/include/odp_buffer_internal.h
+++ b/platform/linux-dpdk/include/odp_buffer_internal.h
@@ -96,6 +96,31 @@ static inline odp_buffer_hdr_t *mbuf_to_buf_hdr(struct rte_mbuf *mbuf)
return (odp_buffer_hdr_t *)(uintptr_t)mbuf;
}
+static inline odp_buffer_t buf_from_buf_hdr(odp_buffer_hdr_t *hdr)
+{
+ return (odp_buffer_t)hdr;
+}
+
+static inline odp_buffer_hdr_t *buf_hdl_to_hdr(odp_buffer_t buf)
+{
+ return (odp_buffer_hdr_t *)(uintptr_t)buf;
+}
+
+static inline odp_event_type_t _odp_buffer_event_type(odp_buffer_t buf)
+{
+ return buf_hdl_to_hdr(buf)->event_type;
+}
+
+static inline void _odp_buffer_event_type_set(odp_buffer_t buf, int ev)
+{
+ buf_hdl_to_hdr(buf)->event_type = ev;
+}
+
+static inline odp_event_t event_from_buf_hdr(odp_buffer_hdr_t *hdr)
+{
+ return (odp_event_t)hdr;
+}
+
#ifdef __cplusplus
}
#endif