From d3d7a49a448e1f7ab284237cb8a82201be903362 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Thu, 29 Feb 2024 15:34:43 +0200 Subject: Port 10753512c "linux-gen: pool: add buffer_subtype_set()" Port original commit from linux-generic. Signed-off-by: Matias Elo Reviewed-by: Tuomas Taipale --- platform/linux-dpdk/include/odp_buffer_internal.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/linux-dpdk/include/odp_buffer_internal.h b/platform/linux-dpdk/include/odp_buffer_internal.h index dc65fd17d..cb7f50073 100644 --- a/platform/linux-dpdk/include/odp_buffer_internal.h +++ b/platform/linux-dpdk/include/odp_buffer_internal.h @@ -73,6 +73,13 @@ static inline odp_buffer_hdr_t *_odp_buf_hdr(odp_buffer_t buf) return (odp_buffer_hdr_t *)(uintptr_t)buf; } +static inline void _odp_buffer_subtype_set(odp_buffer_t buf, int subtype) +{ + odp_buffer_hdr_t *buf_hdr = _odp_buf_hdr(buf); + + buf_hdr->event_hdr.subtype = subtype; +} + #ifdef __cplusplus } #endif -- cgit v1.2.3