aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2019-10-25 11:13:59 +0300
committerPetri Savolainen <petri.savolainen@nokia.com>2019-11-05 14:34:30 +0200
commitff99ba52f99a608dc1a41f4d8a86ab5c2f8491ca (patch)
tree75e5932f337cf5056c525811849f645a496fcfb3 /platform
parent426ee8c61835c8faa5df0873ecc4ec7c8667c691 (diff)
linux-gen: ipc: remove unnecessary odp_packet_io_ipc_internal.h header
Copy the remaining necessary code from odp_packet_io_ipc_internal.h to ipc.c. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/Makefile.am1
-rw-r--r--platform/linux-generic/include/odp_packet_io_ipc_internal.h46
-rw-r--r--platform/linux-generic/odp_packet_io.c1
-rw-r--r--platform/linux-generic/pktio/ipc.c33
4 files changed, 32 insertions, 49 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index a3ec92af6..0d15e53d9 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -108,7 +108,6 @@ noinst_HEADERS = \
include/odp_packet_dpdk.h \
include/odp_packet_internal.h \
include/odp_packet_io_internal.h \
- include/odp_packet_io_ipc_internal.h \
include/odp_socket_common.h \
include/odp_packet_io_stats_common.h \
include/odp_packet_io_stats.h \
diff --git a/platform/linux-generic/include/odp_packet_io_ipc_internal.h b/platform/linux-generic/include/odp_packet_io_ipc_internal.h
deleted file mode 100644
index 8962f8936..000000000
--- a/platform/linux-generic/include/odp_packet_io_ipc_internal.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (c) 2015-2018, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <odp/api/packet_io.h>
-#include <odp_packet_io_internal.h>
-#include <odp/api/packet.h>
-#include <odp_packet_internal.h>
-#include <odp/api/shared_memory.h>
-
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-/* number of odp buffers in odp ring queue */
-#define PKTIO_IPC_ENTRIES 4096
-
-#define PKTIO_IPC_ENTRY_MASK (PKTIO_IPC_ENTRIES - 1)
-
-/* that struct is exported to shared memory, so that processes can find
- * each other.
- */
-struct pktio_info {
- struct {
- /* number of buffer*/
- int num;
- /* size of packet/segment in remote pool */
- uint32_t block_size;
- char pool_name[ODP_POOL_NAME_LEN];
- /* 1 if master finished creation of all shared objects */
- int init_done;
- } master;
- struct {
- void *base_addr;
- uint32_t block_size;
- char pool_name[ODP_POOL_NAME_LEN];
- /* pid of the slave process written to shm and
- * used by master to look up memory created by
- * slave
- */
- int pid;
- int init_done;
- } slave;
-} ODP_PACKED;
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 6e4f36569..33ba8fdb4 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -24,7 +24,6 @@
#include <odp_schedule_if.h>
#include <odp_classification_internal.h>
#include <odp_debug_internal.h>
-#include <odp_packet_io_ipc_internal.h>
#include <odp/api/time.h>
#include <odp/api/plat/time_inlines.h>
#include <odp_pcapng.h>
diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c
index 680bfa392..faabe8a51 100644
--- a/platform/linux-generic/pktio/ipc.c
+++ b/platform/linux-generic/pktio/ipc.c
@@ -5,7 +5,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <odp_packet_io_ipc_internal.h>
#include <odp_debug_internal.h>
#include <odp_packet_io_internal.h>
#include <odp_errno_define.h>
@@ -17,6 +16,7 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#include <unistd.h>
#define IPC_ODP_DEBUG_PRINT 0
@@ -26,6 +26,37 @@
ODP_DBG(fmt, ##__VA_ARGS__);\
} while (0)
+/* number of odp buffers in odp ring queue */
+#define PKTIO_IPC_ENTRIES 4096
+
+#define PKTIO_IPC_ENTRY_MASK (PKTIO_IPC_ENTRIES - 1)
+
+/* that struct is exported to shared memory, so that processes can find
+ * each other.
+ */
+struct pktio_info {
+ struct {
+ /* number of buffer*/
+ int num;
+ /* size of packet/segment in remote pool */
+ uint32_t block_size;
+ char pool_name[ODP_POOL_NAME_LEN];
+ /* 1 if master finished creation of all shared objects */
+ int init_done;
+ } master;
+ struct {
+ void *base_addr;
+ uint32_t block_size;
+ char pool_name[ODP_POOL_NAME_LEN];
+ /* pid of the slave process written to shm and
+ * used by master to look up memory created by
+ * slave
+ */
+ int pid;
+ int init_done;
+ } slave;
+} ODP_PACKED;
+
/* The maximum length of a ring name. */
#define _RING_NAMESIZE 32
/* If set - ring is visible from different processes.