aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp/api
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2023-08-08 11:02:27 +0300
committerGitHub <noreply@github.com>2023-08-08 11:02:27 +0300
commitde97121a2e3afa072f7c51a0570f4b3bed0236c2 (patch)
tree1f34d2767951f54d11f0b9c8d48b0db04490d2c1 /platform/linux-generic/include/odp/api
parent2b359fc1759726826cf4e2afddbd0b7e39fab4c7 (diff)
parent1200684b94bf18ae98ba63fb49e9cda546b4832a (diff)
Merge ODP v1.41.1.0v1.41.1.0_DPDK_22.11
Merge ODP linux-generic v1.41.1.0 into linux-dpdk.
Diffstat (limited to 'platform/linux-generic/include/odp/api')
-rw-r--r--platform/linux-generic/include/odp/api/plat/event_inlines.h29
-rw-r--r--platform/linux-generic/include/odp/api/plat/packet_inline_types.h7
-rw-r--r--platform/linux-generic/include/odp/api/plat/packet_inlines.h2
-rw-r--r--platform/linux-generic/include/odp/api/plat/time_inlines.h4
4 files changed, 36 insertions, 6 deletions
diff --git a/platform/linux-generic/include/odp/api/plat/event_inlines.h b/platform/linux-generic/include/odp/api/plat/event_inlines.h
index 37c015b21..4e3368ff0 100644
--- a/platform/linux-generic/include/odp/api/plat/event_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/event_inlines.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2018, Linaro Limited
- * Copyright (c) 2022, Nokia
+ * Copyright (c) 2022-2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -8,11 +8,17 @@
#ifndef ODP_PLAT_EVENT_INLINES_H_
#define ODP_PLAT_EVENT_INLINES_H_
+#include <odp/api/buffer_types.h>
+#include <odp/api/dma.h>
#include <odp/api/event_types.h>
#include <odp/api/packet_types.h>
+#include <odp/api/timer_types.h>
+#include <odp/api/plat/buffer_inline_types.h>
#include <odp/api/plat/event_inline_types.h>
+#include <odp/api/plat/event_vector_inline_types.h>
#include <odp/api/plat/packet_inline_types.h>
+#include <odp/api/plat/timer_inline_types.h>
/** @cond _ODP_HIDE_FROM_DOXYGEN_ */
@@ -21,6 +27,7 @@
#define _ODP_INLINE static inline
#define odp_event_type __odp_event_type
#define odp_event_type_multi __odp_event_type_multi
+ #define odp_event_user_area __odp_event_user_area
#define odp_event_subtype __odp_event_subtype
#define odp_event_types __odp_event_types
#define odp_event_flow_id __odp_event_flow_id
@@ -59,6 +66,26 @@ _ODP_INLINE int odp_event_type_multi(const odp_event_t event[], int num,
return i;
}
+_ODP_INLINE void *odp_event_user_area(odp_event_t event)
+{
+ const odp_event_type_t type = __odp_event_type_get(event);
+
+ switch (type) {
+ case ODP_EVENT_BUFFER:
+ return _odp_buffer_get((odp_buffer_t)event, void *, uarea_addr);
+ case ODP_EVENT_PACKET:
+ return _odp_pkt_get((odp_packet_t)event, void *, user_area);
+ case ODP_EVENT_PACKET_VECTOR:
+ return _odp_event_vect_get((odp_packet_vector_t)event, void *, uarea_addr);
+ case ODP_EVENT_TIMEOUT:
+ return _odp_timeout_hdr_field((odp_timeout_t)event, void *, uarea_addr);
+ case ODP_EVENT_DMA_COMPL:
+ return odp_dma_compl_user_area((odp_dma_compl_t)event);
+ default:
+ return NULL;
+ }
+}
+
_ODP_INLINE odp_event_subtype_t odp_event_subtype(odp_event_t event)
{
if (__odp_event_type_get(event) != ODP_EVENT_PACKET)
diff --git a/platform/linux-generic/include/odp/api/plat/packet_inline_types.h b/platform/linux-generic/include/odp/api/plat/packet_inline_types.h
index 6773b73ad..5186efed0 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_inline_types.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_inline_types.h
@@ -123,7 +123,7 @@ typedef union {
uint32_t all_flags;
struct {
- uint32_t reserved1: 6;
+ uint32_t reserved1: 5;
/*
* Init flags
@@ -142,6 +142,7 @@ typedef union {
uint32_t l4_chksum: 1; /* L4 chksum override */
uint32_t ts_set: 1; /* Set Tx timestamp */
uint32_t tx_compl: 1; /* Tx completion event requested */
+ uint32_t free_ctrl: 1; /* Don't free option */
uint32_t tx_aging: 1; /* Packet aging at Tx requested */
uint32_t shaper_len_adj: 8; /* Adjustment for traffic mgr */
@@ -159,8 +160,8 @@ typedef union {
/* Flag groups */
struct {
- uint32_t reserved2: 6;
- uint32_t other: 19; /* All other flags */
+ uint32_t reserved2: 5;
+ uint32_t other: 20; /* All other flags */
uint32_t error: 7; /* All error flags */
} all;
diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
index f03c88e10..960dbc5fc 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
@@ -18,7 +18,7 @@
#include <odp/api/hints.h>
#include <odp/api/packet_types.h>
#include <odp/api/pool_types.h>
-#include <odp/api/time.h>
+#include <odp/api/time_types.h>
#include <odp/api/plat/debug_inlines.h>
#include <odp/api/plat/packet_io_inlines.h>
diff --git a/platform/linux-generic/include/odp/api/plat/time_inlines.h b/platform/linux-generic/include/odp/api/plat/time_inlines.h
index 2ffb94c66..f8f4bee89 100644
--- a/platform/linux-generic/include/odp/api/plat/time_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/time_inlines.h
@@ -8,12 +8,14 @@
#ifndef ODP_PLAT_TIME_INLINES_H_
#define ODP_PLAT_TIME_INLINES_H_
-#include <stdint.h>
#include <odp/api/align.h>
#include <odp/api/hints.h>
+#include <odp/api/time_types.h>
#include <odp/api/abi/cpu_time.h>
+#include <stdint.h>
+
/** @cond _ODP_HIDE_FROM_DOXYGEN_ */
#define _ODP_TIMESPEC_SIZE 16