@@ -140,6 +140,15 @@ int odp_pool_term_local(void)
return 0;
}
+static void packet_uarea_init(odp_pool_param_t *params, odp_buffer_hdr_t *tmp)
+{
+ if (params->type == ODP_POOL_PACKET && params->pkt.uarea_init) {
+ odp_packet_t pkt = _odp_packet_from_buffer(odp_hdr_to_buf(tmp));
+
+ params->pkt.uarea_init(pkt, params->pkt.uarea_init_arg);
+ }
+}
+
/**
* Pool creation
*/
@@ -360,6 +369,8 @@ odp_pool_t odp_pool_create(const char *name, odp_pool_param_t *params)
}
}
+ packet_uarea_init(params, tmp);
+
/* Push buffer onto pool's freelist */
ret_buf(&pool->s, tmp);
buf -= buf_stride;
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> --- v4: - fix function pointer call - add newline after declarations platform/linux-generic/odp_pool.c | 11 +++++++++++ 1 file changed, 11 insertions(+)