This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via c6ab55e8bc2b797af290349b56c829e38839929b (commit) via f2da0136e11df9372ada5f01efdc4cf176680dea (commit) from e344e4364f771f32b86d822d0c447770588fe65d (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit c6ab55e8bc2b797af290349b56c829e38839929b Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Mon Aug 28 21:53:18 2017 -0700
linux-generic: pool: implementation for min and max headroom configuration
Implements pool min and max headroom configuration
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 39e01083..c9aca7d6 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -356,6 +356,10 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, break;
case ODP_POOL_PACKET: + if (params->pkt.headroom > CONFIG_PACKET_HEADROOM) { + ODP_ERR("Packet headroom size not supported."); + return ODP_POOL_INVALID; + } headroom = CONFIG_PACKET_HEADROOM; tailroom = CONFIG_PACKET_TAILROOM; num = params->pkt.num; @@ -862,6 +866,7 @@ int odp_pool_capability(odp_pool_capability_t *capa) capa->pkt.max_len = CONFIG_PACKET_MAX_SEGS * max_seg_len; capa->pkt.max_num = CONFIG_POOL_MAX_NUM; capa->pkt.min_headroom = CONFIG_PACKET_HEADROOM; + capa->pkt.max_headroom = CONFIG_PACKET_HEADROOM; capa->pkt.min_tailroom = CONFIG_PACKET_TAILROOM; capa->pkt.max_segs_per_pkt = CONFIG_PACKET_MAX_SEGS; capa->pkt.min_seg_len = max_seg_len; @@ -921,6 +926,7 @@ odp_pool_t odp_buffer_pool(odp_buffer_t buf) void odp_pool_param_init(odp_pool_param_t *params) { memset(params, 0, sizeof(odp_pool_param_t)); + params->pkt.headroom = CONFIG_PACKET_HEADROOM; }
uint64_t odp_pool_to_u64(odp_pool_t hdl)
commit f2da0136e11df9372ada5f01efdc4cf176680dea Author: Balasubramanian Manoharan bala.manoharan@linaro.org Date: Mon Aug 28 21:52:42 2017 -0700
api: pool: add min and max headroom configuration in pool
Adds minimum and maximum headroom configuration in pool
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h index 6fc5b6b4..221798ee 100644 --- a/include/odp/api/spec/pool.h +++ b/include/odp/api/spec/pool.h @@ -97,6 +97,13 @@ typedef struct odp_pool_capability_t { * packet input and user allocated packets.*/ uint32_t min_headroom;
+ /** Maximum packet level headroom length in bytes + * + * The maximum value of packet pool headroom parameter + * that can be configured. This value 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 +221,13 @@ 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. Each newly allocated + packet from the pool must have at least this much + headroom. The maximum value is defined by pool + capability pkt.max_headroom. + Use zero if headroom is not needed. */ + uint32_t headroom; } pkt;
/** Parameters for timeout pools */
-----------------------------------------------------------------------
Summary of changes: include/odp/api/spec/pool.h | 14 ++++++++++++++ platform/linux-generic/odp_pool.c | 6 ++++++ 2 files changed, 20 insertions(+)
hooks/post-receive