From patchwork Thu Feb 26 18:56:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 45197 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7AE8320674 for ; Thu, 26 Feb 2015 18:57:19 +0000 (UTC) Received: by wghk14 with SMTP id k14sf9816860wgh.0 for ; Thu, 26 Feb 2015 10:57:18 -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=DMT63u2rIgD8f0UVqFitqnCN/zLF/GjzxjYY5r/zr9I=; b=PQtJH5SW4EW+Zi64SPyw7rAq8mX5bF2Tz5tvxjFM/hsHa0iaIA2IpvpsZfbA2kVPF4 XZRfeElMBR0Ay+csI9CHM524/PfQ6kvMaChUc9ndExyq0P7dV36ghGDwsCN2mc4DY77k G00b561lBEDlYtRm3g0jWSzYNkpgh5hzNEv8PSpzmSPSbw9Qf24XqdmYPkP4w2jawiTH 9Xu5njgMWdwQxCgGhDaO7QiyDXP48MMogNmRSlTTwNvgXNtdn4SuVbcxDMKQk/dNlv9Z kbaruD37RQa2Ud8tSd6UCptRDnDubXmanCqPj3XEuQVamtR/jrHuu28y6MhXxNI8H1Dr ipsQ== X-Gm-Message-State: ALoCoQlmKYWhMDalUZ/z1IvHEoSZf5dBYuPChLox3foHYaovbMC8QsAvXV5pcpDYYO7QhIA37HiP X-Received: by 10.180.89.194 with SMTP id bq2mr1565626wib.4.1424977038743; Thu, 26 Feb 2015 10:57:18 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.71 with SMTP id i7ls74211lai.44.gmail; Thu, 26 Feb 2015 10:57:18 -0800 (PST) X-Received: by 10.152.4.227 with SMTP id n3mr6048362lan.72.1424977038578; Thu, 26 Feb 2015 10:57:18 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id an5si1293879lbd.63.2015.02.26.10.57.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2015 10:57:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbiw7 with SMTP id w7so12778822lbi.9 for ; Thu, 26 Feb 2015 10:57:18 -0800 (PST) X-Received: by 10.112.188.165 with SMTP id gb5mr9285251lbc.35.1424977038457; Thu, 26 Feb 2015 10:57:18 -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 h5csp3491870lbj; Thu, 26 Feb 2015 10:57:17 -0800 (PST) X-Received: by 10.140.145.3 with SMTP id 3mr21767977qhr.42.1424977036978; Thu, 26 Feb 2015 10:57:16 -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 78si1587066qha.113.2015.02.26.10.57.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Feb 2015 10:57:16 -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 1YR3cW-00087C-Uj; Thu, 26 Feb 2015 18:57:12 +0000 Received: from mail-qc0-f169.google.com ([209.85.216.169]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YR3cR-00084z-E5 for lng-odp@lists.linaro.org; Thu, 26 Feb 2015 18:57:07 +0000 Received: by qcvp6 with SMTP id p6so10079040qcv.9 for ; Thu, 26 Feb 2015 10:57:02 -0800 (PST) X-Received: by 10.140.237.140 with SMTP id i134mr21717420qhc.70.1424977022193; Thu, 26 Feb 2015 10:57:02 -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 q5sm1064652qat.6.2015.02.26.10.57.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Feb 2015 10:57:01 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 26 Feb 2015 13:56:53 -0500 Message-Id: <1424977016-9990-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH v4 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.217.174 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 Reviewed-by: Bill Fischofer --- 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 9f6ce1e..de80140 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;