diff mbox

[RFC,10/17] Split out platform-specific part of odp_packet.h

Message ID 1398685276-4610-11-git-send-email-taras.kondratiuk@linaro.org
State RFC
Headers show

Commit Message

Taras Kondratiuk April 28, 2014, 11:41 a.m. UTC
---
 include/odp_packet.h                             |    8 +++---
 platform/linux-generic/include/plat/odp_packet.h |   32 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 4 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_packet.h
diff mbox

Patch

diff --git a/include/odp_packet.h b/include/odp_packet.h
index 4a16e11..e34e143 100644
--- a/include/odp_packet.h
+++ b/include/odp_packet.h
@@ -19,18 +19,18 @@  extern "C" {
 #endif
 
 #include <odp_buffer.h>
-
+#include <plat/odp_packet.h>
 
 /**
  * ODP packet descriptor
  */
-typedef uint32_t odp_packet_t;
+typedef plat_odp_packet_t odp_packet_t;
 
 /** Invalid packet */
-#define ODP_PACKET_INVALID ODP_BUFFER_INVALID
+#define ODP_PACKET_INVALID PLAT_ODP_PACKET_INVALID
 
 /** Invalid offset */
-#define ODP_PACKET_OFFSET_INVALID ((size_t)-1)
+#define ODP_PACKET_OFFSET_INVALID PLAT_ODP_PACKET_OFFSET_INVALID
 
 
 /**
diff --git a/platform/linux-generic/include/plat/odp_packet.h b/platform/linux-generic/include/plat/odp_packet.h
new file mode 100644
index 0000000..55ec326
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_packet.h
@@ -0,0 +1,32 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP packet descriptor
+ */
+
+#ifndef ODP_PACKET_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#include <odp_buffer.h>
+
+/**
+ * ODP packet descriptor
+ */
+typedef uint32_t plat_odp_packet_t;
+
+/** Invalid packet */
+#define PLAT_ODP_PACKET_INVALID ODP_BUFFER_INVALID
+
+/** Invalid offset */
+#define PLAT_ODP_PACKET_OFFSET_INVALID ((size_t)-1)
+
+
+#endif