From patchwork Wed Sep 16 20:02:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 53760 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 2FAB322A0D for ; Wed, 16 Sep 2015 20:03:15 +0000 (UTC) Received: by lbot4 with SMTP id t4sf24253064lbo.0 for ; Wed, 16 Sep 2015 13:03:14 -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=AsJytcJK3yrPgd2b2YJltIsXcobxlZa2i3ihMkwAk7I=; b=KMTfT7Ivg9rbgCV2VDgTU6ccGxLGnVe1OVBJZcVvNzXMDMboklDiiDEC8BeyI4li2a tbrW7chelg/psZgYElruKxjgwNOjwl2fahfYRH3/3/olo3sT4/ntzuN2KvSXZVwaD7eF NaT3utB/AUtaKSl1o9fhlIhzyFTwF5fDyhIFBoZxgjrxDaEV+iQ8N/81h0BtRAg0Ejcr k/lBQjDF1jXQzgDyzSWTEVZ3a0b7vxruUKGEPKYhuqfca6bu1uTbKId003lr15YbQo9x lhxmoIj24llJ1XZURJtKkjksJiZtFg+ULf3D3qMJtCkZeY5I+Vlm9IzepP8gSogRbS3w MrHQ== X-Gm-Message-State: ALoCoQm/LMvMzZ4tkzT+m4FsH14sp1yKjOYNdCHeaCxUHAdhdW63p7ZPS//CxlOfcRYjvNgDcW/f X-Received: by 10.112.158.202 with SMTP id ww10mr5941256lbb.13.1442433794190; Wed, 16 Sep 2015 13:03:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.66 with SMTP id z2ls895511lag.76.gmail; Wed, 16 Sep 2015 13:03:14 -0700 (PDT) X-Received: by 10.112.142.227 with SMTP id rz3mr16693931lbb.71.1442433794030; Wed, 16 Sep 2015 13:03:14 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id c5si17034633laf.85.2015.09.16.13.03.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 13:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lamp12 with SMTP id p12so135213560lam.0 for ; Wed, 16 Sep 2015 13:03:13 -0700 (PDT) X-Received: by 10.112.180.230 with SMTP id dr6mr20915870lbc.72.1442433793859; Wed, 16 Sep 2015 13:03:13 -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 w3csp2664433lbq; Wed, 16 Sep 2015 13:03:12 -0700 (PDT) X-Received: by 10.140.235.147 with SMTP id g141mr45380219qhc.22.1442433792858; Wed, 16 Sep 2015 13:03:12 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 202si23445455qhd.7.2015.09.16.13.03.11; Wed, 16 Sep 2015 13:03:12 -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 91EED61FFE; Wed, 16 Sep 2015 20:03:11 +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 3D57F61FF4; Wed, 16 Sep 2015 20:03:04 +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 0D1BD61FFC; Wed, 16 Sep 2015 20:03:01 +0000 (UTC) Received: from mail-qg0-f44.google.com (mail-qg0-f44.google.com [209.85.192.44]) by lists.linaro.org (Postfix) with ESMTPS id 8E5FA61FEF for ; Wed, 16 Sep 2015 20:02:59 +0000 (UTC) Received: by qgev79 with SMTP id v79so181426085qge.0 for ; Wed, 16 Sep 2015 13:02:59 -0700 (PDT) X-Received: by 10.140.217.146 with SMTP id n140mr44682539qhb.27.1442433779294; Wed, 16 Sep 2015 13:02:59 -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 63sm10664485qgt.12.2015.09.16.13.02.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Sep 2015 13:02:58 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 16 Sep 2015 16:02:56 -0400 Message-Id: <1442433776-3205-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v2] 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.47 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 | 21 --------------------- platform/linux-generic/include/odp/config.h | 27 ++++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/include/odp/api/config.h b/include/odp/api/config.h index bf88be8..cbf14d8 100644 --- a/include/odp/api/config.h +++ b/include/odp/api/config.h @@ -26,27 +26,22 @@ extern "C" { /** * Maximum number of pools */ -#define ODP_CONFIG_POOLS 16 /** * Maximum number of queues */ -#define ODP_CONFIG_QUEUES 1024 /** * Number of scheduling priorities */ -#define ODP_CONFIG_SCHED_PRIOS 8 /** * Number of scheduling groups */ -#define ODP_CONFIG_SCHED_GRPS 16 /** * Maximum number of packet IO resources */ -#define ODP_CONFIG_PKTIO_ENTRIES 64 /** * Minimum buffer alignment @@ -54,7 +49,6 @@ extern "C" { * 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 /** * Maximum buffer alignment @@ -62,7 +56,6 @@ extern "C" { * This defines the maximum supported buffer alignment. Requests for values * above this will fail. */ -#define ODP_CONFIG_BUFFER_ALIGN_MAX (4*1024) /** * Default packet headroom @@ -71,12 +64,7 @@ extern "C" { * have by default. The default apply to both ODP packet input and user * allocated packets. Implementations may reserve a larger than minimum headroom * size e.g. due to HW or a protocol specific alignment requirement. - * - * @internal In linux-generic implementation: - * 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 /** * Default packet tailroom @@ -87,7 +75,6 @@ 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 /** * Minimum packet segment length @@ -96,7 +83,6 @@ extern "C" { * 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) /** * Maximum packet segment length @@ -105,7 +91,6 @@ extern "C" { * 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) /** * Maximum packet buffer length @@ -114,18 +99,12 @@ extern "C" { * (maximum return value of odp_packet_buf_len()). Attempts to allocate * (including default head- and tailrooms) or extend packets to sizes larger * than this limit will fail. - * - * @internal In linux-generic implementation: - * - 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. * * 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..76018a6 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,31 @@ 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) +/* + * @internal In linux-generic implementation: + * 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 +#define ODP_CONFIG_PACKET_TAILROOM 0 +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598) +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64 * 1024) +/* + * @internal In linux-generic implementation: + * - 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) +#define ODP_CONFIG_SHM_BLOCKS (ODP_CONFIG_POOLS + 48) + #ifdef __cplusplus } #endif