diff mbox

[API-NEXT,v2] api: split documentation from definitions

Message ID 1442433776-3205-1-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Sept. 16, 2015, 8:02 p.m. UTC
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 <mike.holmes@linaro.org>
---
 include/odp/api/config.h                    | 21 ---------------------
 platform/linux-generic/include/odp/config.h | 27 ++++++++++++++++++++++++++-
 2 files changed, 26 insertions(+), 22 deletions(-)

Comments

Savolainen, Petri (Nokia - FI/Espoo) Sept. 17, 2015, 8:36 a.m. UTC | #1
> -----Original Message-----

> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> EXT Mike Holmes

> Sent: Wednesday, September 16, 2015 11:03 PM

> To: lng-odp@lists.linaro.org

> Subject: [lng-odp] [API-NEXT PATCH v2] api: split documentation from

> definitions

> 

> 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 <mike.holmes@linaro.org>

> ---

>  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" {

>  /**



Otherwise OK, but now all @def tags are missing from the public config.h

E.g. @def ODP_CONFIG_POOLS in this case..

-Petri


>   * Maximum number of pools

>   */

> -#define ODP_CONFIG_POOLS        16
diff mbox

Patch

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 <odp/api/config.h>
 
+#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