From patchwork Fri Jan 20 09:19:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 92033 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp670331qgi; Fri, 20 Jan 2017 00:20:06 -0800 (PST) X-Received: by 10.107.51.68 with SMTP id z65mr11836750ioz.53.1484900406806; Fri, 20 Jan 2017 00:20:06 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 137si1477390ith.64.2017.01.20.00.20.06; Fri, 20 Jan 2017 00:20:06 -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 B29BA60A40; Fri, 20 Jan 2017 08:20:05 +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, 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 07A906065E; Fri, 20 Jan 2017 08:20:02 +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 72BEF62CF3; Fri, 20 Jan 2017 08:19:47 +0000 (UTC) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by lists.linaro.org (Postfix) with ESMTPS id 3841E62D38 for ; Fri, 20 Jan 2017 08:19:46 +0000 (UTC) Received: by mail-lf0-f44.google.com with SMTP id k86so52342035lfi.0 for ; Fri, 20 Jan 2017 00:19:46 -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=3on7DtKq4CrP+TmuS6iZFymGfgcuWaeNwiLiVZ0XlBs=; b=uVznJUxGl+OES8mhjOWRWpVqHBTZkUKYhiOcOhqLS8uDECSX/oSlBmKdd9ApDhN55a GkD1/ldubGeX2oJvDPdyxMQEkHY5YP2rsIA8glE9QrGPQY7A6e0Q0raNvlIU68VB8sHE TFgilgz/K/423uWfKMjTN1XuhltpmmDPMLDgML3xI3oDCIiUxNIEMcb/EQ1EWChGgZCL wr8uoiozGnwq4Hrb48I1SHzqheyV3D9fka4cLmSoFnOST73qQ7H3Jkzf2IuLb+K0WRPZ S40lWfXy2LDpUstSPA75sd5UDWaArVprQoSyM//F/l0oueT1Y+GW0EAU1LM05UpQPoCl 35/g== X-Gm-Message-State: AIkVDXJkiuzCVUxk55ltqsr2yAznE9f+pa24TKWFkR+4qiymqEdpWqwFVXLQ7mCS0K5W0k/MOFg= X-Received: by 10.25.27.147 with SMTP id b141mr4707071lfb.183.1484900384966; Fri, 20 Jan 2017 00:19:44 -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 k127sm2962153lfg.10.2017.01.20.00.19.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jan 2017 00:19:44 -0800 (PST) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Fri, 20 Jan 2017 10:19:03 +0100 Message-Id: <1484903943-1876-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [lng-odp] [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 f889834..3797f20 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -547,7 +547,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); @@ -562,7 +562,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);