patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Hunt, David" <david.hunt@intel.com>
To: Reshma Pattan <reshma.pattan@intel.com>, dev@dpdk.org
Cc: stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] app/test: fix reorder test failure
Date: Thu, 3 May 2018 17:03:29 +0100	[thread overview]
Message-ID: <e5652b73-eb0b-b7de-8106-c13fd471fb20@intel.com> (raw)
In-Reply-To: <1525362123-22326-1-git-send-email-reshma.pattan@intel.com>



On 3/5/2018 4:42 PM, Reshma Pattan wrote:
> Inside test_reorder_insert()
> rte_mempool_get_bulk() and rte_mempool_put_bulk() are used
> to allocate and free the mbufs and then rte_reorder_free()
> is called which again freeing the mbufs using rte_pktmbuf_free().
>
> The mixed use of rte_mempool_put_bulk() and rte_pktmbuf_free()
> causing duplicate mbufs to be created when rte_mempool_get_bulk()
> is called next in test_reorder_drain().
>
> Since reorder library is taking care of freeing the mbufs
> using rte_pktmbuf_free() change UT to allocate mbufs using
> rte_pktmbuf_alloc().
>
> Do not mix and match the bulk get/put APIs with
> alloc/free APIs which can cause undefined behavior.
>
> Fixes: d0c9b58d71 ("app/test: new reorder unit test")
>
--snip--

Could I also suggest the following text for the commit message:

app/test: fix reorder test failure

mbufs are being freed twice in error, once in rte_mempool_put_bulk()
and then in rte_reorder_free(). Refactor the code so that we use
rte_reorder_free() to free mbufs in the reorder buffer, and
use rte_pktmbuf_free() to free any unused or drained mbufs.

Rgds,
Dave.

  parent reply	other threads:[~2018-05-03 16:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 15:42 Reshma Pattan
2018-05-03 15:49 ` Hunt, David
2018-05-03 15:53   ` Pattan, Reshma
2018-05-03 15:58     ` Hunt, David
2018-05-03 16:03 ` Hunt, David [this message]
2018-05-03 16:30 ` [dpdk-stable] [PATCH v2] " Reshma Pattan
2018-05-03 16:36   ` [dpdk-stable] [PATCH v3] " Reshma Pattan
2018-05-03 17:02     ` Hunt, David
2018-05-04 10:47     ` [dpdk-stable] [PATCH v4] " Reshma Pattan
2018-05-13 21:17       ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2018-05-03 16:35 ` [dpdk-stable] [PATCH v3] " Reshma Pattan
  -- strict thread matches above, loose matches on Subject: below --
2018-05-03 15:32 [dpdk-stable] [PATCH] " Reshma Pattan

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=e5652b73-eb0b-b7de-8106-c13fd471fb20@intel.com \
    --to=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    /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).