From: Yongseok Koh Date: Wed, 31 May 2017 17:48:45 +0000 (-0700) Subject: net/mlx5: fix redundant free of Tx buffer X-Git-Tag: spdx-start~3086 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c80711c3fbfdae1449ad1cbc6b31067087bd9561;p=dpdk.git net/mlx5: fix redundant free of Tx buffer 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. Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path") CC: stable@dpdk.org Signed-off-by: Yongseok Koh Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 6c1387e568..bf72468d56 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],