aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include/odp_config_internal.h
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@linaro.org>2016-05-26 19:03:30 +0100
committerZoltan Kiss <zoltan.kiss@linaro.org>2016-05-26 19:03:30 +0100
commitb97b756c4502acb632096dc0ea43a53e96de8dda (patch)
tree9239a276dc60a7b7921c2515eae1130819226ebe /platform/linux-dpdk/include/odp_config_internal.h
parent5646d6e0504713328ad610dde751eaac074da353 (diff)
Port "api: pool: add pool capability" series
The following patches were ported: 9ca19730 api: config: replace pool config with pool capability 64f8fa21 api: queue: replaced config api with capability structure 7a56ae3e api: config: removed config.h Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Diffstat (limited to 'platform/linux-dpdk/include/odp_config_internal.h')
-rw-r--r--platform/linux-dpdk/include/odp_config_internal.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/platform/linux-dpdk/include/odp_config_internal.h b/platform/linux-dpdk/include/odp_config_internal.h
new file mode 100644
index 000000000..96c63af14
--- /dev/null
+++ b/platform/linux-dpdk/include/odp_config_internal.h
@@ -0,0 +1,117 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_CONFIG_INTERNAL_H_
+#define ODP_CONFIG_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Maximum number of pools
+ */
+#define ODP_CONFIG_POOLS 16
+
+/*
+ * Maximum number of queues
+ */
+#define ODP_CONFIG_QUEUES 1024
+
+/*
+ * Maximum number of packet IO resources
+ */
+#define ODP_CONFIG_PKTIO_ENTRIES 64
+
+/*
+ * 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
+
+/*
+ * 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)
+
+/*
+ * Default packet headroom
+ *
+ * This defines the minimum number of headroom bytes that newly created packets
+ * 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
+ *
+ * This defines the minimum number of tailroom bytes that newly created packets
+ * have by default. The default apply to both ODP packet input and user
+ * allocated packets. Implementations are free to add to this as desired
+ * 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
+
+/*
+ * Maximum number of segments per packet
+ */
+#define ODP_CONFIG_PACKET_MAX_SEGS 6
+
+/*
+ * 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
+
+/*
+ * 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)
+
+/*
+ * Maximum packet buffer length
+ *
+ * This defines the maximum number of bytes that can be stored into a packet
+ * (maximum return value of odp_packet_buf_len(void)). 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)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif