There seems to be an issue with the handling of completion event buffers: These are drawn from the same pool as the packet event buffers, but are re-typed as completion events. (see platform/linux-generic/odp_crypto.c:428) However, when these are freed and returned to the pool, the buffer type was not restored to packet event buffers: The code that allocates packet event buffers from the pool did not update the buffer type either, relying on all buffers in the pool already being initialized to be packet event buffers
This patch resets the buffer type at release time. Signed-off-by: Christophe Milard <christophe.mil...@linaro.org> --- platform/linux-generic/odp_pool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 35e79a0..6e65926 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -560,6 +560,9 @@ void odp_buffer_free(odp_buffer_t buf) odp_buffer_hdr_t *buf_hdr = odp_buf_to_hdr(buf); pool_entry_t *pool = odp_buf_to_pool(buf_hdr); + /* Reset packet type in case it was "casted" (e.g. crypto completions)*/ + buf_hdr->type = pool->s.params.type; + if (odp_unlikely(pool->s.low_wm_assert)) ret_buf(&pool->s, buf_hdr); else -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp