aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2022-06-23 10:52:49 +0300
committerMatias Elo <matias.elo@nokia.com>2022-06-30 16:53:06 +0300
commit103c6a1aec9a31405d6c76c70012e67206bace33 (patch)
tree3800c20ca9257b2bb6c71bfe9387f397558b412f
parent78b6f7f4f346e97eeda3d9fb22781c2630b5d9a7 (diff)
Port ed2d85f67 "linux-gen: event: inline odp_event_flow_id()"
Port original commit from linux-generic. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
-rw-r--r--platform/linux-dpdk/include/odp_buffer_internal.h9
-rw-r--r--platform/linux-dpdk/odp_event.c8
2 files changed, 3 insertions, 14 deletions
diff --git a/platform/linux-dpdk/include/odp_buffer_internal.h b/platform/linux-dpdk/include/odp_buffer_internal.h
index 3b99961c1..817eddf98 100644
--- a/platform/linux-dpdk/include/odp_buffer_internal.h
+++ b/platform/linux-dpdk/include/odp_buffer_internal.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2013-2018, Linaro Limited
- * Copyright (c) 2021, Nokia
+ * Copyright (c) 2021-2022, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -82,13 +82,6 @@ static inline odp_buffer_hdr_t *_odp_buf_hdr(odp_buffer_t buf)
return (odp_buffer_hdr_t *)(uintptr_t)buf;
}
-static inline uint32_t event_flow_id(odp_event_t ev)
-{
- odp_buffer_hdr_t *buf_hdr = (odp_buffer_hdr_t *)(uintptr_t)ev;
-
- return buf_hdr->event_hdr.flow_id;
-}
-
static inline void event_flow_id_set(odp_event_t ev, uint32_t flow_id)
{
odp_buffer_hdr_t *buf_hdr = (odp_buffer_hdr_t *)(uintptr_t)ev;
diff --git a/platform/linux-dpdk/odp_event.c b/platform/linux-dpdk/odp_event.c
index bbc9a7b57..cdedc5486 100644
--- a/platform/linux-dpdk/odp_event.c
+++ b/platform/linux-dpdk/odp_event.c
@@ -34,7 +34,8 @@
const _odp_event_inline_offset_t
_odp_event_inline_offset ODP_ALIGNED_CACHE = {
.event_type = offsetof(_odp_event_hdr_t, event_type),
- .base_data = offsetof(_odp_event_hdr_t, mb.buf_addr)
+ .base_data = offsetof(_odp_event_hdr_t, mb.buf_addr),
+ .flow_id = offsetof(_odp_event_hdr_t, flow_id)
};
#include <odp/visibility_end.h>
@@ -59,11 +60,6 @@ odp_event_type_t odp_event_types(odp_event_t event,
return event_type;
}
-uint32_t odp_event_flow_id(odp_event_t event)
-{
- return event_flow_id(event);
-}
-
void odp_event_flow_id_set(odp_event_t event, uint32_t flow_id)
{
event_flow_id_set(event, flow_id);