If there is any error in packet or taildrop feature is enabled, HW can reject those packets and put them in error queue. Driver poll this error queue to free the buffers. DPAA driver has an issue while freeing these rejected buffers. In case of scatter gather packets, it is preparing the mbuf SG list by scanning the HW descriptors and once the mbuf SG list prepared, it free only first segment of the mbuf SG list by calling the API rte_pktmbuf_free_seg(), This will leak the memory of other segments and mempool can be empty. Also there is one more issue, external buffer's memory may not belong to mempool so driver itself free the external buffer after successfully send the packet to HW to transmit instead of let the HW to free it. So transmit function free all the external buffers. But driver has no check for external buffers while freeing the rejected buffers and this can do double free the memory which can corrupt the user pool and crashes and undefined behaviour of system can be seen. This patch fixes the above mentioned issue by checking each and every segment and freeing all the segments except external. Fixes: 9124e65dd3eb ("net/dpaa: enable Tx queue taildrop") Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh <g.singh@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%