@@ -18,21 +18,20 @@
extern "C" {
#endif
-
-
#include <odp_std_types.h>
-
-
-
-
+#include <plat/odp_buffer.h>
/**
* ODP buffer
*/
-typedef uint32_t odp_buffer_t;
+typedef plat_odp_buffer_t odp_buffer_t;
-#define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */
+#define ODP_BUFFER_INVALID PLAT_ODP_BUFFER_INVALID /**< Invalid buffer */
+#define ODP_BUFFER_TYPE_INVALID PLAT_ODP_BUFFER_TYPE_INVALID /**< Buffer type invalid */
+#define ODP_BUFFER_TYPE_RAW PLAT_ODP_BUFFER_TYPE_RAW /**< Raw buffer */
+#define ODP_BUFFER_TYPE_PACKET PLAT_ODP_BUFFER_TYPE_PACKET /**< Packet buffer */
+#define ODP_BUFFER_TYPE_TIMER PLAT_ODP_BUFFER_TYPE_TIMER /**< Timer buffer */
/**
* Buffer start address
@@ -61,10 +60,6 @@ size_t odp_buffer_size(odp_buffer_t buf);
*/
int odp_buffer_type(odp_buffer_t buf);
-#define ODP_BUFFER_TYPE_INVALID (-1) /**< Buffer type invalid */
-#define ODP_BUFFER_TYPE_RAW 0 /**< Raw buffer */
-#define ODP_BUFFER_TYPE_PACKET 1 /**< Packet buffer */
-#define ODP_BUFFER_TYPE_TIMER 2 /**< Timer buffer */
/**
* Tests if buffer is part of a scatter/gather list
new file mode 100644
@@ -0,0 +1,30 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP buffer descriptor
+ */
+
+#ifndef ODP_BUFFER_H_
+#error This file should be included only into corresponding top level header
+#else
+
+/**
+ * ODP buffer
+ */
+typedef uint32_t plat_odp_buffer_t;
+
+#define PLAT_ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */
+
+#define PLAT_ODP_BUFFER_TYPE_INVALID (-1) /**< Buffer type invalid */
+#define PLAT_ODP_BUFFER_TYPE_RAW 0 /**< Raw buffer */
+#define PLAT_ODP_BUFFER_TYPE_PACKET 1 /**< Packet buffer */
+#define PLAT_ODP_BUFFER_TYPE_TIMER 2 /**< Timer buffer */
+
+#endif
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> --- include/odp_buffer.h | 19 +++++--------- platform/linux-generic/include/plat/odp_buffer.h | 30 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_buffer.h