net/iavf: fix mbuf leak
authorQiming Chen <chenqiming_huawei@163.com>
Sat, 11 Sep 2021 01:47:09 +0000 (09:47 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 15 Sep 2021 01:22:28 +0000 (03:22 +0200)
commita38df1edd6324f922ca46a043e87b2489f7bc17e
treed4aca3d57f391dd9cfca476dc6d9681d42e90810
parentda9cdcd1f37220e87db23993d6352637d71df25b
net/iavf: fix mbuf leak

A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_rxtx.c