From patchwork Tue Jul 4 22:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 107030 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp57754qge; Tue, 4 Jul 2017 15:02:25 -0700 (PDT) X-Received: by 10.237.54.225 with SMTP id f88mr50123678qtb.240.1499205745063; Tue, 04 Jul 2017 15:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499205745; cv=none; d=google.com; s=arc-20160816; b=yM4SU9z1qBs/G79hpj94gsLUNRESm8XrQrOHv9MMKd5wlMQhfHY6KFAoLHxAtS6PTT a/1PxJh3Eh7y8rLAzFh2aJaeyuAc/+sHAJd02Hc4dPj2pbJ5IcTTcJGHFcss9IzHvu9V dE3a29eMXEK1a3YwLirtlzu845vq+mtOB1jw2XZ+qg2CSlNMcH+IMYx/azjQxwxOWP9Y IdDhdyJYlMCQOH2rH991TN6ImN2dpXk7wBjwaRkeT4q6F1JVRDJFGTLVjLmaGm4lAOHa Na/CDUY99KCWNOHu6XQQ4vfArQR8nntKrdTdpchOMGT09BcDF9NHcY6YU+nzT5R2XG4x exhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=Q8Iv4ut4e3igQ8498b+2OpzfgG3xYuAFpfad23SORNA=; b=c5TWW5a9N0zlsjVxFinyfRKcPSzVQm+HF2Nq2zQKP1EQVV9Dg7TiHjovklcR+jrN7A C8BNKi8Xff/sQ3+F5cJRS0Cn99gTDVO7aRRBaZx2cvKFh4E+Di7d5USUOIZ3ofdpZ1MB +90I8PXJXCcMjvBxDcEskBak7hw1Yjwe2XeKulGyO8CH1UFJBWFyLqAWZpkOw36SFXwU wyOaGri0xNWNL1E3KL10P64MU6CkIiz+fW+PyiMQPGGOm62Wlk07FWq4ZKbOUFqYHGud C9P3OKD5rJpoPfKw3p+CkB/oKRI++ILoP1lTut1n5Xx04XyoPOxkaDr67eV8//SvstQK 4OSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k16si19345181qkk.171.2017.07.04.15.02.24; Tue, 04 Jul 2017 15:02:25 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 5BF2D60C13; Tue, 4 Jul 2017 22:02:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9198460C1B; Tue, 4 Jul 2017 22:00:30 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AFA2E60C1B; Tue, 4 Jul 2017 22:00:24 +0000 (UTC) Received: from forward2h.cmail.yandex.net (forward2h.cmail.yandex.net [87.250.230.17]) by lists.linaro.org (Postfix) with ESMTPS id 09F976067C for ; Tue, 4 Jul 2017 22:00:17 +0000 (UTC) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [77.88.29.85]) by forward2h.cmail.yandex.net (Yandex) with ESMTP id EB34B20BF6 for ; Wed, 5 Jul 2017 01:00:14 +0300 (MSK) Received: from smtp2p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2p.mail.yandex.net (Yandex) with ESMTP id AA2031A8003E for ; Wed, 5 Jul 2017 01:00:14 +0300 (MSK) Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id b3wfOILtJj-0DPq7guc; Wed, 05 Jul 2017 01:00:13 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 5 Jul 2017 01:00:04 +0300 Message-Id: <1499205607-30786-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499205607-30786-1-git-send-email-odpbot@yandex.ru> References: <1499205607-30786-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 67 Subject: [lng-odp] [PATCH v1 4/7] linux-gen: ipc remove base_addr_offset X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov base_addr_offset is not used in this version, remove it. Signed-off-by: Maxim Uvarov --- /** 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 --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);