patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Yongseok Koh <yskoh@mellanox.com>
Cc: ferruh.yigit@intel.com, dev@dpdk.org, adrien.mazarguil@6wind.com,
	stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix redundant free of Tx buffer
Date: Thu, 1 Jun 2017 10:08:03 +0200	[thread overview]
Message-ID: <20170601080803.GN31330@autoinstall.dev.6wind.com> (raw)
In-Reply-To: <20170531174845.35951-1-yskoh@mellanox.com>

On Wed, May 31, 2017 at 10:48:45AM -0700, Yongseok Koh wrote:
> SW completion ring of Tx (txq->elts) stores individual mbufs even if a
> multi-segmented packet is sent. rte_pktmbuf_free_seg() must be used when
> cleaning up the completion ring. Otherwise, chained mbufs are redundantly
> freed and finally it would cause a crash.
> 
> CC: stable@dpdk.org
> Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_txq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
> index 6c1387e56..bf72468d5 100644
> --- a/drivers/net/mlx5/mlx5_txq.c
> +++ b/drivers/net/mlx5/mlx5_txq.c
> @@ -117,7 +117,7 @@ txq_free_elts(struct txq_ctrl *txq_ctrl)
>  		struct rte_mbuf *elt = (*elts)[elts_tail];
>  
>  		assert(elt != NULL);
> -		rte_pktmbuf_free(elt);
> +		rte_pktmbuf_free_seg(elt);
>  #ifndef NDEBUG
>  		/* Poisoning. */
>  		memset(&(*elts)[elts_tail],
> -- 
> 2.11.0
 
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

-- 
Nélio Laranjeiro
6WIND

  reply	other threads:[~2017-06-01  8:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 17:48 Yongseok Koh
2017-06-01  8:08 ` Nélio Laranjeiro [this message]
2017-06-01 10:33   ` Ferruh Yigit

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=20170601080803.GN31330@autoinstall.dev.6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=yskoh@mellanox.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).