diff mbox

[RFC,11/17] Split out platform-specific part of odp_packet_io.h

Message ID 1398685276-4610-12-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_io.h                            |    5 ++--
 .../linux-generic/include/plat/odp_packet_io.h     |   26 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_packet_io.h
diff mbox

Patch

diff --git a/include/odp_packet_io.h b/include/odp_packet_io.h
index 0002b1e..96391ef 100644
--- a/include/odp_packet_io.h
+++ b/include/odp_packet_io.h
@@ -24,12 +24,13 @@  extern "C" {
 #include <odp_queue.h>
 
 #include <odp_pktio_types.h>
+#include <plat/odp_packet_io.h>
 
 /** ODP packet IO handle */
-typedef uint32_t odp_pktio_t;
+typedef plat_odp_pktio_t odp_pktio_t;
 
 /** Invalid packet IO handle */
-#define ODP_PKTIO_INVALID 0
+#define ODP_PKTIO_INVALID PLAT_ODP_PKTIO_INVALID
 
 /**
  * Open an ODP packet IO instance
diff --git a/platform/linux-generic/include/plat/odp_packet_io.h b/platform/linux-generic/include/plat/odp_packet_io.h
new file mode 100644
index 0000000..7358611
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_packet_io.h
@@ -0,0 +1,26 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP Packet IO
+ */
+
+#ifndef ODP_PACKET_IO_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#include <odp_std_types.h>
+
+/** ODP packet IO handle */
+typedef uint32_t plat_odp_pktio_t;
+
+/** Invalid packet IO handle */
+#define PLAT_ODP_PKTIO_INVALID 0
+
+#endif