DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: reshma.pattan@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out
Date: Thu, 12 Oct 2017 09:32:51 +0100	[thread overview]
Message-ID: <20171012083251.GB44304@bricha3-MOBL3.ger.corp.intel.com> (raw)
In-Reply-To: <1505228764-9738-1-git-send-email-pbhagavatula@caviumnetworks.com>

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@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.

/Bruce

      parent reply	other threads:[~2017-10-12  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 15:06 Pavan Nikhilesh
2017-09-12 15:06 ` [dpdk-dev] [PATCH 2/2] test/reorder: fix reorder drain test Pavan Nikhilesh
2017-10-12  8:28   ` Bruce Richardson
2017-10-11 21:04 ` [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out Thomas Monjalon
2017-10-12  8:32 ` Bruce Richardson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171012083251.GB44304@bricha3-MOBL3.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).