Completed odp_pool_param_t definition with packet pool parameters.
Parameter definition is close to what we are using already.

* seg_len: Defines minimum segment buffer length.
           With this parameter user can:
           * trade-off between pool memory usage and SW performance (linear 
memory access)
           * avoid segmentation in packet head (e.g. if legacy app cannot handle
             segmentation in the middle of the packet headers)
           * seg_len < ODP_CONFIG_PACKET_SEG_LEN_MIN is rounded up to 
ODP_CONFIG_PACKET_SEG_LEN_MIN
           * seg_len > ODP_CONFIG_PACKET_SEG_LEN_MAX is not valid

* seg_align: Defines minimum segment buffer alignment. With this parameter,
             user can force buffer alignment to match e.g. aligment requirements
             of data structures stored in or algorithms accessing the packet
             headroom. When user don't have specific alignment requirement 0
             should be used for default.

* seg_num: Number of segments. This is also the maximum number of packets.

Signed-off-by: Petri Savolainen <petri.savolai...@linaro.org>
---
 include/odp/api/pool.h | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h
index d09d92e..a1d7494 100644
--- a/include/odp/api/pool.h
+++ b/include/odp/api/pool.h
@@ -61,13 +61,29 @@ typedef struct odp_pool_param_t {
                                             of 8. */
                        uint32_t num;   /**< Number of buffers in the pool */
                } buf;
-/* Reserved for packet and timeout specific params
                struct {
-                       uint32_t seg_size;
-                       uint32_t seg_align;
-                       uint32_t num;
+                       uint32_t seg_len;   /**< Minimum packet segment buffer
+                                                length in bytes. It includes
+                                                possible head-/tailroom bytes.
+                                                The maximum value is defined by
+                                                ODP_CONFIG_PACKET_SEG_LEN_MAX.
+                                                Use 0 for default length. */
+                       uint32_t seg_align; /**< Minimum packet segment buffer
+                                                alignment in bytes. Valid
+                                                values are powers of two. The
+                                                maximum value is defined by
+                                                ODP_CONFIG_PACKET_SEG_ALIGN_MAX
+                                                . Use 0 for default alignment.
+                                                Default will always be a
+                                                multiple of 8.
+                                            */
+                       uint32_t seg_num;   /**< Number of packet segments in
+                                                the pool. This is also the
+                                                maximum number of packets,
+                                                since each packet consist of
+                                                at least one segment.
+                                            */
                } pkt;
-*/
                struct {
                        uint32_t __res1; /* Keep struct identical to buf, */
                        uint32_t __res2; /* until pool implementation is fixed*/
-- 
2.2.2


_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to