Message ID | 1439486903-14811-2-git-send-email-zoltan.kiss@linaro.org |
---|---|
State | Superseded |
Headers | show |
On Thu, Aug 13, 2015 at 12:28 PM, Zoltan Kiss <zoltan.kiss@linaro.org> wrote: > Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> > --- > platform/linux-generic/odp_pool.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/platform/linux-generic/odp_pool.c > b/platform/linux-generic/odp_pool.c > index 14221fd..2cc8441 100644 > --- a/platform/linux-generic/odp_pool.c > +++ b/platform/linux-generic/odp_pool.c > @@ -140,6 +140,14 @@ 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); > Checkpatch flags this: CHECK: Unnecessary parentheses around function pointer (params->pkt.uarea_init) #25: FILE: platform/linux-generic/odp_pool.c:147: + (params->pkt.uarea_init)(pkt, params->pkt.uarea_init_arg); > + } > +} > + > /** > * Pool creation > */ > @@ -360,6 +368,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; > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 14221fd..2cc8441 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -140,6 +140,14 @@ 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 +368,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> --- platform/linux-generic/odp_pool.c | 10 ++++++++++ 1 file changed, 10 insertions(+)