From patchwork Fri Oct 7 10:35:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 77326 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp246726qge; Fri, 7 Oct 2016 02:39:14 -0700 (PDT) X-Received: by 10.55.19.106 with SMTP id d103mr17929436qkh.258.1475833154864; Fri, 07 Oct 2016 02:39:14 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b142si9789815qkc.79.2016.10.07.02.39.14; Fri, 07 Oct 2016 02:39:14 -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 796F860A49; Fri, 7 Oct 2016 09:39:14 +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, RCVD_IN_DNSWL_LOW, 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 839D9617C7; Fri, 7 Oct 2016 09:36:47 +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 95A46617B0; Fri, 7 Oct 2016 09:36:30 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by lists.linaro.org (Postfix) with ESMTPS id 855EE617BB for ; Fri, 7 Oct 2016 09:36:20 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id b75so36554686lfg.3 for ; Fri, 07 Oct 2016 02:36:20 -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=CTLP2IB//zNwHxyrW7rzNZk29dUbCgAiSdI4Akv/vxs=; b=MXmHXCYPaP42NwttzhjsHUdbVs1zEELUDffDEGGaSUdzZUNv7jyeAUCDZkYL+gR+c5 kd5tBjII9e8C928PLg+1uVfb2aK93+Xkce49kJ6XJD3ovU2epk43vOXe3oJKBmWgV0Ii 6ybm1Di83iQhrd3dfPpf1BahJbybYNOeyJXxccTj1LQheK6n7ml+W5Dnh7r4cJfJD5T8 2bT+kFzidFDfGuTpTyuTyQfOfu94WvmGpXMC39uQMaD/Y6Hz5rrsIF2QHXRUU+dogtwR Ygiy3M8EoqaE8xw0p+QyeB0xf1Kp9D4NlHXW/oA7thgfdYbbyKTRWm4RgR8DLjX5lbWg EVHA== X-Gm-Message-State: AA6/9RnVnBUt+6DtrUBNP4RXGckkdpwG8fz4/cuohicxb61pte1pXU2OTeF5XiEZWoEDwoXeoLo= X-Received: by 10.25.23.228 with SMTP id 97mr8267605lfx.123.1475832979288; Fri, 07 Oct 2016 02:36:19 -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 5sm3465255ljb.22.2016.10.07.02.36.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Oct 2016 02:36:18 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Fri, 7 Oct 2016 12:35:10 +0200 Message-Id: <1475836517-60484-8-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475836517-60484-1-git-send-email-christophe.milard@linaro.org> References: <1475836517-60484-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 07/14] linux-gen: shm: new ODP_SHM_LOCK 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" The flag locks the allocated memory (prevent swapping) The patch just exposes the _ODP_ISHM_LOCK 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 0513047..30ef9d9 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -44,6 +44,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; + flgs |= (flags & ODP_SHM_LOCK) ? _ODP_ISHM_LOCK : 0; block_index = _odp_ishm_reserve(name, size, -1, align, flgs, flags); if (block_index >= 0)