From patchwork Tue Sep 15 16:47:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 53688 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 36B1522A0D for ; Tue, 15 Sep 2015 16:48:17 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf59206267lbb.2 for ; Tue, 15 Sep 2015 09:48:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to: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=1tr8aKIM3e6kfOd6ImtqIIjf4OgR/3/EUhANFMlNvoE=; b=dIVpkJ9kT9Z3m6drxCjdN7LWvMulKaIyQw+XWi/6bR5jyv0iACpzuzv6H2AZA/rRhM p70ObPPDhHVVj3uwum2Vf1ROAFr7Q3lkAa2yGlzvKtto0dmGi0Ig8E843JvvfhTyo3F+ /jBz1PV7rYQro0Tu2IDpt/8pGwK0MuzLOiwVYVWMx0bHmvMdLbR5PSxNOEhgoZzuw+98 xAgDb03h87RPIIPxbhCsAtIwwftH8ct6tnJ1Ul7Md2fknduvUzzp6KOJ4dOhBGxAFIkc WMp7tbQylK2Nm4UKwkiENYAQK8cg2eh8bZLZg6y3rzttod7hj1AH64GE2J8KPmGeVGKO GIOA== X-Gm-Message-State: ALoCoQnMG31Z624QNBaU7MPmd8TEqPxoVCk2O2boEoGkWvw6iB9qFqaSf68sjhQKeT2iVblOfA+f X-Received: by 10.112.139.65 with SMTP id qw1mr4461290lbb.24.1442335696145; Tue, 15 Sep 2015 09:48:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.101 with SMTP id 5ls880754lal.59.gmail; Tue, 15 Sep 2015 09:48:16 -0700 (PDT) X-Received: by 10.112.128.227 with SMTP id nr3mr22976849lbb.42.1442335695980; Tue, 15 Sep 2015 09:48:15 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id x3si14815393lae.20.2015.09.15.09.48.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 09:48:15 -0700 (PDT) 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 lagj9 with SMTP id j9so113377078lag.2 for ; Tue, 15 Sep 2015 09:48:15 -0700 (PDT) X-Received: by 10.112.199.70 with SMTP id ji6mr22881097lbc.73.1442335695854; Tue, 15 Sep 2015 09:48:15 -0700 (PDT) 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.59.35 with SMTP id w3csp1917146lbq; Tue, 15 Sep 2015 09:48:15 -0700 (PDT) X-Received: by 10.140.202.204 with SMTP id x195mr33900702qha.7.1442335694865; Tue, 15 Sep 2015 09:48:14 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s18si17651285qkl.93.2015.09.15.09.48.13; Tue, 15 Sep 2015 09:48:14 -0700 (PDT) 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; Received: by lists.linaro.org (Postfix, from userid 109) id 9BD8061FCD; Tue, 15 Sep 2015 16:48:13 +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_H2, 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 E00F361CF9; Tue, 15 Sep 2015 16:48:08 +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 90A2761CBC; Tue, 15 Sep 2015 16:48:01 +0000 (UTC) Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by lists.linaro.org (Postfix) with ESMTPS id 6D5546198C for ; Tue, 15 Sep 2015 16:48:00 +0000 (UTC) Received: by qgx61 with SMTP id 61so148286337qgx.3 for ; Tue, 15 Sep 2015 09:48:00 -0700 (PDT) X-Received: by 10.140.232.210 with SMTP id d201mr35554108qhc.94.1442335680127; Tue, 15 Sep 2015 09:48:00 -0700 (PDT) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id q21sm8290523qki.35.2015.09.15.09.47.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Sep 2015 09:47:59 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 15 Sep 2015 12:47:54 -0400 Message-Id: <1442335674-10706-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Subject: [lng-odp] [PATCH] api: split documentation from definitions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" 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.mailfrom=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 Defines in config.h should be defined by the platform appropriately and then possibly be exposed by APIs. Start the clean up process by moving the API Doxygen documentation away from the per platform definition. Signed-off-by: Mike Holmes --- include/odp/api/config.h | 30 ++++++++++++++--------------- platform/linux-generic/include/odp/config.h | 17 +++++++++++++++- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/include/odp/api/config.h b/include/odp/api/config.h index 302eaf5..40789a1 100644 --- a/include/odp/api/config.h +++ b/include/odp/api/config.h @@ -24,52 +24,53 @@ extern "C" { */ /** + * @def ODP_CONFIG_MAX_THREADS * Maximum number of threads */ -#define ODP_CONFIG_MAX_THREADS 128 /** + * @def ODP_CONFIG_POOLS * Maximum number of pools */ -#define ODP_CONFIG_POOLS 16 /** + * @def ODP_CONFIG_QUEUES * Maximum number of queues */ -#define ODP_CONFIG_QUEUES 1024 /** + * @def ODP_CONFIG_SCHED_PRIOS * Number of scheduling priorities */ -#define ODP_CONFIG_SCHED_PRIOS 8 /** + * @def ODP_CONFIG_SCHED_GRPS * Number of scheduling groups */ -#define ODP_CONFIG_SCHED_GRPS 16 /** + * @def ODP_CONFIG_PKTIO_ENTRIES * Maximum number of packet IO resources */ -#define ODP_CONFIG_PKTIO_ENTRIES 64 /** + * @def ODP_CONFIG_BUFFER_ALIGN_MIN * Minimum buffer alignment * * This defines the minimum supported buffer alignment. Requests for values * below this will be rounded up to this value. */ -#define ODP_CONFIG_BUFFER_ALIGN_MIN 16 /** + * @def ODP_CONFIG_BUFFER_ALIGN_MAX * Maximum buffer alignment * * This defines the maximum supported buffer alignment. Requests for values * above this will fail. */ -#define ODP_CONFIG_BUFFER_ALIGN_MAX (4*1024) /** + * @def ODP_CONFIG_PACKET_HEADROOM * Default packet headroom * * This defines the minimum number of headroom bytes that newly created packets @@ -81,9 +82,9 @@ extern "C" { * The default value (66) allows a 1500-byte packet to be received into a single * segment with Ethernet offset alignment and room for some header expansion. */ -#define ODP_CONFIG_PACKET_HEADROOM 66 /** + * @def ODP_CONFIG_PACKET_TAILROOM * Default packet tailroom * * This defines the minimum number of tailroom bytes that newly created packets @@ -92,27 +93,27 @@ extern "C" { * without restriction. Note that most implementations will automatically * consider any unused portion of the last segment of a packet as tailroom */ -#define ODP_CONFIG_PACKET_TAILROOM 0 /** + * @def ODP_CONFIG_PACKET_SEG_LEN_MIN * Minimum packet segment length * * This defines the minimum packet segment buffer length in bytes. The user * defined segment length (seg_len in odp_pool_param_t) will be rounded up into * this value. */ -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598) /** + * @def ODP_CONFIG_PACKET_SEG_LEN_MAX * Maximum packet segment length * * This defines the maximum packet segment buffer length in bytes. The user * defined segment length (seg_len in odp_pool_param_t) must not be larger than * this. */ -#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024) /** + * @def ODP_CONFIG_PACKET_BUF_LEN_MAX * Maximum packet buffer length * * This defines the maximum number of bytes that can be stored into a packet @@ -124,13 +125,12 @@ extern "C" { * - The value MUST be an integral number of segments * - The value SHOULD be large enough to accommodate jumbo packets (9K) */ -#define ODP_CONFIG_PACKET_BUF_LEN_MAX (ODP_CONFIG_PACKET_SEG_LEN_MIN*6) -/** Maximum number of shared memory blocks. +/** @def ODP_CONFIG_SHM_BLOCKS + * Maximum number of shared memory blocks. * * This the the number of separate SHM areas that can be reserved concurrently */ -#define ODP_CONFIG_SHM_BLOCKS (ODP_CONFIG_POOLS + 48) /** * @} diff --git a/platform/linux-generic/include/odp/config.h b/platform/linux-generic/include/odp/config.h index 6fecd38..15476da 100644 --- a/platform/linux-generic/include/odp/config.h +++ b/platform/linux-generic/include/odp/config.h @@ -7,7 +7,7 @@ /** * @file * - * ODP configuration + * ODP platform specific configuration for public API definitions */ #ifndef ODP_PLAT_CONFIG_H_ @@ -19,6 +19,21 @@ extern "C" { #include +#define ODP_CONFIG_MAX_THREADS 128 +#define ODP_CONFIG_POOLS 16 +#define ODP_CONFIG_QUEUES 1024 +#define ODP_CONFIG_SCHED_PRIOS 8 +#define ODP_CONFIG_SCHED_GRPS 16 +#define ODP_CONFIG_PKTIO_ENTRIES 64 +#define ODP_CONFIG_BUFFER_ALIGN_MIN 1 +#define ODP_CONFIG_BUFFER_ALIGN_MAX (4 * 1024) +#define ODP_CONFIG_PACKET_HEADROOM 66 +#define ODP_CONFIG_PACKET_TAILROOM 0 +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598) +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64 * 1024) +#define ODP_CONFIG_PACKET_BUF_LEN_MAX (ODP_CONFIG_PACKET_SEG_LEN_MIN * 6) +#define ODP_CONFIG_SHM_BLOCKS (ODP_CONFIG_POOLS + 48) + #ifdef __cplusplus } #endif