From patchwork Tue Oct 18 11:56:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 77989 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp823194qge; Tue, 18 Oct 2016 04:03:28 -0700 (PDT) X-Received: by 10.200.45.246 with SMTP id q51mr2038387qta.108.1476788608604; Tue, 18 Oct 2016 04:03:28 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c12si20530147qke.248.2016.10.18.04.03.28; Tue, 18 Oct 2016 04:03:28 -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=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 3D5BB6088F; Tue, 18 Oct 2016 11:03:28 +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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 B6E2D615C8; Tue, 18 Oct 2016 10:58:25 +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 432A8615C2; Tue, 18 Oct 2016 10:58:19 +0000 (UTC) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by lists.linaro.org (Postfix) with ESMTPS id 34CCE60DEF for ; Tue, 18 Oct 2016 10:57:38 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id l131so20154713lfl.2 for ; Tue, 18 Oct 2016 03:57:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/NvHp46EwWis722sODEDrU84pBGJiJdWgjxVawV00G4=; b=gDcmy+I1403DQPb7CMffRpFKFYYV7h8/SpD251Cw5IfXVA1/HDg4BQcw4XUD62HSV4 o4Fx0flj/EXrHiWxU3hff0nd+XVjg/YsE7gnKrpJbtiUVDBrl7++RA1RmuR/hVIce3xX WOWD6rO2NHEOR1SLr7ds72PK3yA6/zL1h4kgQwxEUCAJ4f9mNW+vMnvOQg59iU5XY0YA yaANdUAkRf9xOsA/GPpljtWHhOncC21kB14VxJIMwH7ElUlifHdfX5NWfOiQNP/+SPCa IqbYXxO7R/ObSGBUPVS62TCyzPvL1oFRwG1Ln+2TOZ9V/V2WMw0ZLuSyHIMp4QpRVl42 kZIg== X-Gm-Message-State: AA6/9RmUBo030M3EydeakaT643JmWBhJFIRAo2RuvdL6Sl8yOvqZ5VPhFokIPMOfxlAwiHfEdwo= X-Received: by 10.25.151.149 with SMTP id z143mr21076208lfd.38.1476788255747; Tue, 18 Oct 2016 03:57:35 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id 204sm3879424ljj.47.2016.10.18.03.57.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Oct 2016 03:57:35 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Tue, 18 Oct 2016 13:56:38 +0200 Message-Id: <1476791808-29363-7-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476791808-29363-1-git-send-email-christophe.milard@linaro.org> References: <1476791808-29363-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2 06/16] linux-gen: shm: new ODP_SHM_SINGLE_VA flag implementation 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" This flag guarentess the unicity the the block address on all ODP threads. The patch just exposes the _ODP_ISHM_SINGLE_VA flag of the internal memory allocator, ishm. Signed-off-by: Christophe Milard --- platform/linux-generic/odp_shared_memory.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index 609b324..0513047 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -43,6 +43,7 @@ odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align, /* set internal ishm flags according to API flags: */ flgs |= (flags & ODP_SHM_PROC) ? _ODP_ISHM_LINK : 0; + flgs |= (flags & ODP_SHM_SINGLE_VA) ? _ODP_ISHM_SINGLE_VA : 0; block_index = _odp_ishm_reserve(name, size, -1, align, flgs, flags); if (block_index >= 0)