From patchwork Thu Jan 19 14:56:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 91904 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp281069obz; Thu, 19 Jan 2017 05:57:42 -0800 (PST) X-Received: by 10.237.53.124 with SMTP id b57mr8283826qte.7.1484834262353; Thu, 19 Jan 2017 05:57:42 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o12si2654554qto.176.2017.01.19.05.57.42; Thu, 19 Jan 2017 05:57:42 -0800 (PST) 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 sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DB0B060F1D; Thu, 19 Jan 2017 13:57:41 +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, URIBL_BLOCKED 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 9B41060A7D; Thu, 19 Jan 2017 13:57:38 +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 1BCFC60CDF; Thu, 19 Jan 2017 13:57:36 +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 F305960942 for ; Thu, 19 Jan 2017 13:57:34 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id v186so37104533lfa.1 for ; Thu, 19 Jan 2017 05:57:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UNdYL1RlJ7YZDL5K9u/9LFaHVMCeq/0EQIVfEGcgXVw=; b=r4nrfSiGpILeWdG35s67frM6yRKmeLg01wQvHXVT4BNMKyYKxVHvxt9/7sNDSANMxR aWdUg1nAHlV/TQ84LvlKa+dDsaUuApVZ69k7Mnw4LmRPrg5+jeRxJIc+aTLL0nWXxIkw H1nhBzzs4aF3eADozR2cgtuvduw4/EDVtUy/aG2iTO6Rg9o6Lwc4gpXwva9GJO+mJ8Dg PRNbRDi9iXjmTAA0aEjOk6L+2s2AROhnNiPSuGBdIrgyHCy5y+jMQfylFLcwsBwVcHiA xhnDv0NvhZq+pjCtjN4z4787yNlz5GLxyIMKrEMcBhAGUMgipXFwLFIU0/7OiXxwxeH4 6aPA== X-Gm-Message-State: AIkVDXIyBTf8uM0BP2pfFLLpuwmdyC8/1sMm1aoTD5+knh4C+NFfeadozQ2sRYykcAdlXAsHH9s= X-Received: by 10.25.199.21 with SMTP id x21mr3057786lff.84.1484834253729; Thu, 19 Jan 2017 05:57:33 -0800 (PST) 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 j87sm1880285lfi.25.2017.01.19.05.57.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 05:57:33 -0800 (PST) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Thu, 19 Jan 2017 15:56:44 +0100 Message-Id: <1484837804-3627-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [API-NEXT PATCH] linux-gen: _ishm: fix normal page fallback 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" Fixing failure due to lack of huge pages. Signed-off-by: Christophe Milard --- platform/linux-generic/_ishm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index 4c2578b..32c0737 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -548,7 +548,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align, addr = alloc_fragment(len, block_index, align, &fragment); if (!addr) { ODP_ERR("alloc_fragment failed.\n"); - if (new_block->filename[0]) { + if (!new_block->external_fd) { close(*fd); *fd = -1; delete_file(new_block); @@ -563,7 +563,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align, if (mapped_addr == NULL) { if (flags & _ODP_ISHM_SINGLE_VA) free_fragment(fragment); - if (new_block->filename[0]) { + if (!new_block->external_fd) { close(*fd); *fd = -1; delete_file(new_block);