From patchwork Tue Feb 24 19:27:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44990 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C84C02029F for ; Tue, 24 Feb 2015 19:28:22 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf16631492wiw.0 for ; Tue, 24 Feb 2015 11:28:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=WqwEeF1fyqAJFowpdZzUz2HPvFB68Uz9A0o8cFfbwOg=; b=VCPQl6lkXp083XDyja7KZKkE7jOhxtZikH3+jluoU76vmrVfpVWLwz5Z2mq3vKzEbn LKUPMDqr3p+8sVIO8a+GFtOof2y9WmQit8eFUqSD+60uJUQ4HVF8QJ/Pv781WKPn1ZC3 dVXDtpsLjn4CUoNVaM1EAUV9wcmIHhXP54kvMpOds2zJZahDc6WI8RjnHOBb5KQcD0kT SDCL4B75EOAdXuWyCD3HyUx04Tfp6Yg8QPQQqgDFvTn5gZUOeMRH60uvWXlEhp8HGjsw pYebgCR7AT2LTjy261v22tnjpPqwAKEbmR7o1FuxTzUMHL1SlI6nfiBD1tsxrEKW0XhI HSFw== X-Gm-Message-State: ALoCoQmf680CPgnT+JclrZqkW6ML+4YOmEpKeWbpPmDzEYlZDhN6eIzfhEbrPNaLzk+bYHz2bzlK X-Received: by 10.180.89.194 with SMTP id bq2mr2349436wib.4.1424806102167; Tue, 24 Feb 2015 11:28:22 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.104 with SMTP id r8ls123739lar.48.gmail; Tue, 24 Feb 2015 11:28:22 -0800 (PST) X-Received: by 10.112.16.101 with SMTP id f5mr15383761lbd.75.1424806101995; Tue, 24 Feb 2015 11:28:21 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id s6si15751630lal.32.2015.02.24.11.28.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 11:28:21 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lamq1 with SMTP id q1so28038631lam.5 for ; Tue, 24 Feb 2015 11:28:21 -0800 (PST) X-Received: by 10.152.115.136 with SMTP id jo8mr12136842lab.32.1424806101746; Tue, 24 Feb 2015 11:28:21 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2126428lbj; Tue, 24 Feb 2015 11:28:21 -0800 (PST) X-Received: by 10.140.144.147 with SMTP id 141mr38967790qhq.91.1424806100062; Tue, 24 Feb 2015 11:28:20 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id v52si40114981qge.21.2015.02.24.11.28.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 11:28:20 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQL9U-0003BK-TJ; Tue, 24 Feb 2015 19:28:16 +0000 Received: from mail-qc0-f182.google.com ([209.85.216.182]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQL9L-00036q-3Y for lng-odp@lists.linaro.org; Tue, 24 Feb 2015 19:28:07 +0000 Received: by qcvx3 with SMTP id x3so5756632qcv.5 for ; Tue, 24 Feb 2015 11:28:01 -0800 (PST) X-Received: by 10.140.235.65 with SMTP id g62mr40072946qhc.30.1424806081878; Tue, 24 Feb 2015 11:28:01 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id 68sm30076533qgz.8.2015.02.24.11.28.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Feb 2015 11:28:01 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 24 Feb 2015 14:27:51 -0500 Message-Id: <1424806074-26864-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH v3 1/4] api: config: move ODP_SHM_NUM_BLOCKS to config.h X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Mike Holmes --- include/odp/api/config.h | 6 ++++++ platform/linux-generic/odp_shared_memory.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/odp/api/config.h b/include/odp/api/config.h index 8f1139d..8989fed 100644 --- a/include/odp/api/config.h +++ b/include/odp/api/config.h @@ -121,6 +121,12 @@ extern "C" { */ #define ODP_CONFIG_PACKET_BUF_LEN_MAX (ODP_CONFIG_PACKET_SEG_LEN_MIN*6) +/** Maximum number of shared memory blocks. + * + * This the the number of separate SHM areas that can be reserved concurrently + */ +#define ODP_SHM_NUM_BLOCKS 32 + /** * @} */ diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index dbaec22..9b6e92b 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -26,10 +27,6 @@ #include #include - -#define ODP_SHM_NUM_BLOCKS 32 - - typedef struct { char name[ODP_SHM_NAME_LEN]; uint64_t size;