net/mlx5: fix redundant free of Tx buffer
authorYongseok Koh <yskoh@mellanox.com>
Wed, 31 May 2017 17:48:45 +0000 (10:48 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 12 Jun 2017 09:41:27 +0000 (10:41 +0100)
commitc80711c3fbfdae1449ad1cbc6b31067087bd9561
tree538f1501ba7cc63ee1d1f2710be9a501e13d6d5b
parent70aee77ec6284d18ae30486b545b0527c2082bce
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 <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_txq.c