@@ -47,6 +47,9 @@ static inline uint64_t odp_queue_to_u64(odp_queue_t hdl)
return _odp_pri(hdl);
}
+typedef struct odp_buffer_hdr_t odp_buffer_hdr_t;
+typedef union queue_entry_u queue_entry_t;
+
/**
* @}
*/
@@ -18,6 +18,7 @@
extern "C" {
#endif
+#include <odp/plat/queue_types.h>
#include <odp/std_types.h>
#include <odp/atomic.h>
#include <odp/pool.h>
@@ -101,13 +102,8 @@ typedef union odp_buffer_bits_t {
};
} odp_buffer_bits_t;
-/* forward declaration */
-struct odp_buffer_hdr_t;
-union queue_entry_u;
-typedef union queue_entry_u queue_entry_t;
-
/* Common buffer header */
-typedef struct odp_buffer_hdr_t {
+struct odp_buffer_hdr_t {
struct odp_buffer_hdr_t *next; /* next buf in a list--keep 1st */
union { /* Multi-use secondary link */
struct odp_buffer_hdr_t *prev;
@@ -144,7 +140,7 @@ typedef struct odp_buffer_hdr_t {
queue_entry_t *target_qe; /* ordered queue target */
uint64_t sync; /* for ordered synchronization */
};
-} odp_buffer_hdr_t;
+};
/** @internal Compile time assert that the
* allocator field can handle any allocator id*/
@@ -86,10 +86,10 @@ struct queue_entry_s {
odp_atomic_u64_t sync_out;
};
-typedef union queue_entry_u {
+union queue_entry_u {
struct queue_entry_s s;
uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(struct queue_entry_s))];
-} queue_entry_t;
+};
queue_entry_t *get_qentry(uint32_t queue_id);
Fix: In file included from odp_classification.c:15: In file included from ./include/odp_packet_io_internal.h:23: In file included from ./include/odp_classification_datamodel.h:27: ./include/odp_queue_internal.h:92:3: error: redefinition of typedef 'queue_entry_t' is a C11 feature [-Werror,-Wtypedef-redefinition] } queue_entry_t; ^ ./include/odp_buffer_internal.h:107:29: note: previous definition is here typedef union queue_entry_u queue_entry_t; Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/include/odp/plat/queue_types.h | 3 +++ platform/linux-generic/include/odp_buffer_internal.h | 10 +++------- platform/linux-generic/include/odp_queue_internal.h | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-)