diff mbox series

[v1,4/7] linux-gen: ipc remove base_addr_offset

Message ID 1499205607-30786-5-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v1,1/7] linux-gen: pktio: ipc fix send return code on tx | expand

Commit Message

Github ODP bot July 4, 2017, 10 p.m. UTC
From: Maxim Uvarov <maxim.uvarov@linaro.org>


base_addr_offset is not used in this version, remove it.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 67 (muvarov:master_ipc_fixes)
 ** https://github.com/Linaro/odp/pull/67
 ** Patch: https://github.com/Linaro/odp/pull/67.patch
 ** Base sha: ceeab69f3af67701adb524c7b9757d19cefb1110
 ** Merge commit sha: 6f88e14c89b861d66bb7043b22f9b299b1f73ddf
 **/
 platform/linux-generic/include/odp_packet_io_ipc_internal.h | 8 --------
 platform/linux-generic/pktio/ipc.c                          | 7 ++-----
 2 files changed, 2 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp_packet_io_ipc_internal.h b/platform/linux-generic/include/odp_packet_io_ipc_internal.h
index 7cd29488..9d8943a6 100644
--- a/platform/linux-generic/include/odp_packet_io_ipc_internal.h
+++ b/platform/linux-generic/include/odp_packet_io_ipc_internal.h
@@ -30,19 +30,11 @@  struct pktio_info {
 		int num;
 		/* size of packet/segment in remote pool */
 		uint32_t block_size;
-		/* offset from shared memory block start
-		 * to pool *base_addr in remote process.
-		 * (odp-linux pool specific) */
-		size_t base_addr_offset;
 		char pool_name[ODP_POOL_NAME_LEN];
 		/* 1 if master finished creation of all shared objects */
 		int init_done;
 	} master;
 	struct {
-		/* offset from shared memory block start
-		 * to pool *base_addr in remote process.
-		 * (odp-linux pool specific) */
-		size_t base_addr_offset;
 		void *base_addr;
 		uint32_t block_size;
 		char pool_name[ODP_POOL_NAME_LEN];
diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c
index 6b631098..54e42227 100644
--- a/platform/linux-generic/pktio/ipc.c
+++ b/platform/linux-generic/pktio/ipc.c
@@ -59,8 +59,7 @@  static int _ipc_master_start(pktio_entry_t *pktio_entry)
 
 	pktio_entry->s.ipc.remote_pool_shm = shm;
 	pktio_entry->s.ipc.pool_base = odp_shm_addr(shm);
-	pktio_entry->s.ipc.pool_mdata_base = (char *)odp_shm_addr(shm) +
-					     pinfo->slave.base_addr_offset;
+	pktio_entry->s.ipc.pool_mdata_base = (char *)odp_shm_addr(shm);
 
 	odp_atomic_store_u32(&pktio_entry->s.ipc.ready, 1);
 
@@ -153,7 +152,6 @@  static int _ipc_init_master(pktio_entry_t *pktio_entry,
 	}
 
 	memcpy(pinfo->master.pool_name, pool_name, strlen(pool_name));
-	pinfo->slave.base_addr_offset = 0;
 	pinfo->slave.base_addr = 0;
 	pinfo->slave.pid = 0;
 	pinfo->slave.init_done = 0;
@@ -297,8 +295,7 @@  static int _ipc_slave_start(pktio_entry_t *pktio_entry)
 	shm = _ipc_map_remote_pool(pinfo->master.pool_name,
 				   pid);
 	pktio_entry->s.ipc.remote_pool_shm = shm;
-	pktio_entry->s.ipc.pool_mdata_base = (char *)odp_shm_addr(shm) +
-					     pinfo->master.base_addr_offset;
+	pktio_entry->s.ipc.pool_mdata_base = (char *)odp_shm_addr(shm);
 	pktio_entry->s.ipc.pkt_size = pinfo->master.block_size;
 
 	_ipc_export_pool(pinfo, pktio_entry->s.ipc.pool);