From patchwork Mon Feb 23 18:35:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44909 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0AE1B21570 for ; Mon, 23 Feb 2015 18:35:42 +0000 (UTC) Received: by wesu56 with SMTP id u56sf13424530wes.1 for ; Mon, 23 Feb 2015 10:35:41 -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=Px3alLTFOvSopK+K8UUzHbGFVUtR6emaNjZcN/xY8q8=; b=LBU7PJHhU7Y/FpMU/fHLQw94Ja7MkULo3gSWoCkjO0+d+nXxCk1QI7tEjCZxXiouQi MQb4lx6Kit0AfrbkgEZKrRujrp3hGd1SJr/c342z9r/doTAv2Zu6S9TpVjdO9RkXIfd2 AYONMoCQUviX7wexPXQ7MZhDWE7qphY+ldbr+KkcouHgPAFwLb0PT9mXZ7XxqpmPQjV/ 0OzFIeXXFCyOpRUANDadvo84yPbcyaQut84BjZoE9/vhWFU/47t2wqcE8/dBv7zzKKSL fTVUnHq+nlcZJJhVfigds20KQ4uQZPgJOJKGEjDkzvpMWWqBz6YBDGLGs9kVmohjNo8D etLQ== X-Gm-Message-State: ALoCoQkAGbUnbzGFvSeHFj+sSVJ8YXI4JveypOegp0z55Ut2ZHUG0+ClV4JMRQMTbxq88VZij5bp X-Received: by 10.152.45.7 with SMTP id i7mr1555341lam.9.1424716541017; Mon, 23 Feb 2015 10:35:41 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.165 with SMTP id uf5ls575775lac.60.gmail; Mon, 23 Feb 2015 10:35:40 -0800 (PST) X-Received: by 10.152.179.135 with SMTP id dg7mr11339026lac.58.1424716540715; Mon, 23 Feb 2015 10:35:40 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id v2si24210142lag.68.2015.02.23.10.35.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 10:35:40 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labpn19 with SMTP id pn19so20404774lab.4 for ; Mon, 23 Feb 2015 10:35:40 -0800 (PST) X-Received: by 10.112.211.200 with SMTP id ne8mr10888273lbc.73.1424716540608; Mon, 23 Feb 2015 10:35:40 -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 h5csp1441200lbj; Mon, 23 Feb 2015 10:35:39 -0800 (PST) X-Received: by 10.140.149.23 with SMTP id 23mr819757qhv.10.1424716539120; Mon, 23 Feb 2015 10:35:39 -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 z32si21713255qgd.1.2015.02.23.10.35.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 23 Feb 2015 10:35:39 -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 1YPxqw-0001yD-9I; Mon, 23 Feb 2015 18:35:34 +0000 Received: from mail-qc0-f174.google.com ([209.85.216.174]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YPxqr-0001we-8U for lng-odp@lists.linaro.org; Mon, 23 Feb 2015 18:35:29 +0000 Received: by qcxr5 with SMTP id r5so12554104qcx.13 for ; Mon, 23 Feb 2015 10:35:24 -0800 (PST) X-Received: by 10.140.232.71 with SMTP id d68mr28071786qhc.52.1424716524054; Mon, 23 Feb 2015 10:35:24 -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 o5sm28093898qat.4.2015.02.23.10.35.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Feb 2015 10:35:23 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 23 Feb 2015 13:35:15 -0500 Message-Id: <1424716517-17175-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH v2 1/3] 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.52 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 ODP_SHM_NUM_BLOCKS was defined down in the implementation, move it out to the config.h 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..f767021 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. + * + * Limits how many blocks are available for calls to odp_shm_reserve() + */ +#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;