[API-NEXT,v4,1/2] api: pool: add min and max headroom in capability

Message ID 1504530018-8522-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [API-NEXT,v4,1/2] api: pool: add min and max headroom in capability
Related show

Commit Message

Github ODP bot Sept. 4, 2017, 1 p.m.
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>


Adds pool minimum and maximum headroom in pool capability

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

---
/** Email created from pull request 152 (bala-manoharan:pool_headroom)
 ** https://github.com/Linaro/odp/pull/152
 ** Patch: https://github.com/Linaro/odp/pull/152.patch
 ** Base sha: 91c0b58fc87ba0431241818758cea94438cd5498
 ** Merge commit sha: e06c8842c41c8550928bb58c658116fb7c2f338b
 **/
 include/odp/api/spec/pool.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Patch

diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h
index 6fc5b6b4..6fe50620 100644
--- a/include/odp/api/spec/pool.h
+++ b/include/odp/api/spec/pool.h
@@ -97,6 +97,14 @@  typedef struct odp_pool_capability_t {
 		 * packet input and user allocated packets.*/
 		uint32_t min_headroom;
 
+		/** Maximum packet level headroom length in bytes
+		 *
+		 * This is the maximum value for packet pool headroom that
+		 * can be configured. This value could be rounded up by the
+		 * implimenation and it applies to both ODP packet input and
+		 * user allocated packets.*/
+		uint32_t max_headroom;
+
 		/** Minimum packet level tailroom length in bytes
 		 *
 		 * The minimum number of tailroom bytes that newly created
@@ -214,6 +222,18 @@  typedef struct odp_pool_param_t {
 			    defined by pool capability pkt.max_uarea_size.
 			    Specify as 0 if no user area is needed. */
 			uint32_t uarea_size;
+
+			/** Minimum Headroom size in bytes. Minimum number of
+			    bytes of space preceding packet data to reserve for
+			    use as headroom. Each newly allocated packet from
+			    the pool must have at least this much headroom.
+			    Must not exceed the implementation defined
+			    'max_headroom' in odp_pool_capability().
+			    @note if application does not required headroom it
+			    may set min_headroom to zero and implementation may
+			    set headroom as zero or roundup to minimum headroom
+			    possible in the platform. */
+			uint32_t min_headroom;
 		} pkt;
 
 		/** Parameters for timeout pools */