[dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out

Bruce Richardson bruce.richardson at intel.com
Thu Oct 12 10:32:51 CEST 2017

On Tue, Sep 12, 2017 at 08:36:03PM +0530, Pavan Nikhilesh wrote:
> The ready buffers should be set to NULL when drained else it might
> result in double free (mempool put) when rte_reorder_free is called.
> Fixes: b70b56032bff ("reorder: new library")
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com> ---
> lib/librte_reorder/rte_reorder.c | 1 + 1 file changed, 1 insertion(+)
Rather than having an addition write for each entry going through the
reorder library, it should be possible to change free function so that
it only frees entries based on the index values.

In fact, a better solution to having reorder_free just blindly free the
mbufs would be to have reorder_free hand them back to the application,
or allow reorder_free to fail if the reorder buffer is non-empty. Making
such a change would be an ABI break, though.


More information about the dev mailing list