diff options
-rw-r--r-- | platform/linux-generic/Makefile.am | 1 | ||||
-rw-r--r-- | platform/linux-generic/include/odp_packet_io_ipc_internal.h | 46 | ||||
-rw-r--r-- | platform/linux-generic/odp_packet_io.c | 1 | ||||
-rw-r--r-- | platform/linux-generic/pktio/ipc.c | 33 |
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. |