aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_event_vector_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic/include/odp_event_vector_internal.h')
-rw-r--r--platform/linux-generic/include/odp_event_vector_internal.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/linux-generic/include/odp_event_vector_internal.h b/platform/linux-generic/include/odp_event_vector_internal.h
index 55e33b913..39f9daf04 100644
--- a/platform/linux-generic/include/odp_event_vector_internal.h
+++ b/platform/linux-generic/include/odp_event_vector_internal.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020-2021, Nokia
+/* Copyright (c) 2020-2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -58,6 +58,14 @@ static inline odp_event_vector_hdr_t *_odp_packet_vector_hdr(odp_packet_vector_t
}
/**
+ * Return the event header
+ */
+static inline _odp_event_hdr_t *_odp_packet_vector_to_event_hdr(odp_packet_vector_t pktv)
+{
+ return (_odp_event_hdr_t *)(uintptr_t)&_odp_packet_vector_hdr(pktv)->event_hdr;
+}
+
+/**
* Free packet vector and contained packets
*/
static inline void _odp_packet_vector_free_full(odp_packet_vector_t pktv)