aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/odp_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic/odp_event.c')
-rw-r--r--platform/linux-generic/odp_event.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/platform/linux-generic/odp_event.c b/platform/linux-generic/odp_event.c
index 5398442d6..b78881cb4 100644
--- a/platform/linux-generic/odp_event.c
+++ b/platform/linux-generic/odp_event.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2015-2018, Linaro Limited
- * Copyright (c) 2020, Nokia
+ * Copyright (c) 2020-2021, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -15,6 +15,7 @@
#include <odp_ipsec_internal.h>
#include <odp_debug_internal.h>
#include <odp_packet_internal.h>
+#include <odp_event_internal.h>
#include <odp_event_vector_internal.h>
/* Inlined API functions */
@@ -24,8 +25,7 @@
odp_event_subtype_t odp_event_subtype(odp_event_t event)
{
- if (_odp_buffer_event_type(odp_buffer_from_event(event)) !=
- ODP_EVENT_PACKET)
+ if (_odp_event_type(event) != ODP_EVENT_PACKET)
return ODP_EVENT_NO_SUBTYPE;
return odp_packet_subtype(odp_packet_from_event(event));
@@ -34,8 +34,7 @@ odp_event_subtype_t odp_event_subtype(odp_event_t event)
odp_event_type_t odp_event_types(odp_event_t event,
odp_event_subtype_t *subtype)
{
- odp_buffer_t buf = odp_buffer_from_event(event);
- odp_event_type_t event_type = _odp_buffer_event_type(buf);
+ odp_event_type_t event_type = _odp_event_type(event);
*subtype = event_type == ODP_EVENT_PACKET ?
odp_packet_subtype(odp_packet_from_event(event)) :
@@ -75,6 +74,9 @@ void odp_event_free(odp_event_t event)
case ODP_EVENT_IPSEC_STATUS:
_odp_ipsec_status_free(_odp_ipsec_status_from_event(event));
break;
+ case ODP_EVENT_DMA_COMPL:
+ odp_dma_compl_free(odp_dma_compl_from_event(event));
+ break;
default:
ODP_ABORT("Invalid event type: %d\n", odp_event_type(event));
}
@@ -100,13 +102,10 @@ uint64_t odp_event_to_u64(odp_event_t hdl)
int odp_event_is_valid(odp_event_t event)
{
- odp_buffer_t buf;
-
if (event == ODP_EVENT_INVALID)
return 0;
- buf = odp_buffer_from_event(event);
- if (_odp_buffer_is_valid(buf) == 0)
+ if (_odp_event_is_valid(event) == 0)
return 0;
switch (odp_event_type(event)) {
@@ -121,6 +120,8 @@ int odp_event_is_valid(odp_event_t event)
case ODP_EVENT_IPSEC_STATUS:
/* Fall through */
case ODP_EVENT_PACKET_VECTOR:
+ /* Fall through */
+ case ODP_EVENT_DMA_COMPL:
break;
default:
return 0;