@@ -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)
/**
* @}
@@ -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 <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)
+#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
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 | 30 ++++++++++++++--------------- platform/linux-generic/include/odp/config.h | 17 +++++++++++++++- 2 files changed, 31 insertions(+), 16 deletions(-)