@@ -214,6 +214,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;
+
+ /** Headroom size in bytes. Number of bytes of
+ space preceding packet data to reserve for
+ use as headroom.
+ Must not exceed the implementation defined
+ ODP_PACKET_MAX_HEADROOM. */
+ uint32_t headroom;
} pkt;
/** Parameters for timeout pools */
@@ -346,7 +346,10 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params,
break;
case ODP_POOL_PACKET:
- headroom = CONFIG_PACKET_HEADROOM;
+ if (params->pkt.headroom < CONFIG_PACKET_HEADROOM)
+ headroom = params->pkt.headroom;
+ else
+ headroom = CONFIG_PACKET_HEADROOM;
tailroom = CONFIG_PACKET_TAILROOM;
num = params->pkt.num;
uarea_size = params->pkt.uarea_size;