netdev-dpdk: fix mbuf leaks master
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 8 Mar 2016 01:50:48 +0000 (09:50 +0800)
committerDaniele Di Proietto <diproiettod@vmware.com>
Thu, 10 Mar 2016 01:28:21 +0000 (17:28 -0800)
commitb00b4a81490f2d6f7c546f31098383ef12a13436
tree942e27768d13caf0106538cc024bfd5da680007e
parentf76def2592cc5cb449a3360430ee9cc0f208765d
netdev-dpdk: fix mbuf leaks

mbufs could be chained (by the "next" field of rte_mbuf struct), when
an mbuf is not big enough to hold a big packet, say when TSO is enabled.

rte_pktmbuf_free_seg() frees the head mbuf only, leading mbuf leaks.
This patch fix it by invoking the right API rte_pktmbuf_free(), to
free all mbufs in the chain.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
AUTHORS
lib/netdev-dpdk.c