> -----Original Message-----
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Bill
> Fischofer
> Sent: Wednesday, November 30, 2016 2:48 AM
> To: lng-odp@lists.linaro.org
> Subject: [lng-odp] [API-NEXT PATCH] linux-generic: pool: reset origin_qe
> on buffer allocation
> 
> Resolve bug https://bugs.linaro.org/show_bug.cgi?id=2622 by
> re-initializing origin_qe to NULL when a buffer is allocated. This step
> was omitted in the switch to ring pool allocation introduced in
> commit ID c8cf1d87783d4b4c628f219803b78731b8d4ade4
> 
> Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org>
> ---
>  platform/linux-generic/odp_pool.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-
> generic/odp_pool.c
> index 4be3827..0b3d694 100644
> --- a/platform/linux-generic/odp_pool.c
> +++ b/platform/linux-generic/odp_pool.c
> @@ -648,9 +648,12 @@ int buffer_alloc_multi(pool_t *pool, odp_buffer_t
> buf[],
>               cache->num = cache_num - num_ch;
>       }
> 
> -     if (buf_hdr) {
> -             for (i = 0; i < num_ch; i++)
> -                     buf_hdr[i] = buf_hdl_to_hdr(buf[i]);
> +     for (i = 0; i < num_ch; i++) {
> +             odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf[i]);
> +
> +             hdr->origin_qe = NULL;
> +             if (buf_hdr)
> +                     buf_hdr[i] = hdr;
>       }
> 
>       return num_ch + num_deq;
> --
> 2.7.4

The new ordered queue implementation removes origin_qe altogether. So, this 
change is not needed as soon as the new implementation is merged.

-Petri




Reply via email to