Go to file
Gagandeep Singh 8716c0ec06 net/dpaa: fix buffer freeing on SG Tx
When using SG list to TX with external and direct buffers,
HW free direct buffers and driver free external buffers.

Software scans the complete SG mbuf list to find the external
buffers to free, but this is wrong as hardware can free the
direct buffers if any present in the list and same can be
re-allocated for other purpose in multi thread or high speed
running traffic environment with new data in it. So the software
which is scanning the SG mbuf list, if that list has any direct
buffer present then that direct buffer's next pointer can give
wrong pointer value, if already freed by hardware which
can do the mempool corruption or memory leak.

In this patch instead of relying on user given SG mbuf list
we are storing the buffers in an internal list which will
be scanned by driver after transmit to free non-direct
buffers.

This patch also fixes below issues.

Driver is freeing complete SG list by checking external buffer
flag in first segment only, but external buffer can be attached
to any of the segment. Because of this, driver either can double
free buffers or there can be memory leak.

In case of indirect buffers, driver is modifying the original
buffer list to free the indirect buffers but this original buffer
list is being used by driver even after transmit packets for
non-direct buffer cleanup. This can cause the buffer leak issue.

Fixes: f191d5abda ("net/dpaa: support external buffers in Tx")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2022-10-07 17:19:03 +02:00
.ci ci: add RISC-V cross compilation 2022-06-08 11:26:34 +02:00
.github/workflows test: invoke all telemetry commands 2022-08-25 16:23:17 +02:00
app test/service: fix spurious failures by extending timeout 2022-10-06 21:41:14 +02:00
buildtools build: add definitions for use as Meson subproject 2022-06-07 20:49:20 +02:00
config eal/loongarch: support LoongArch architecture 2022-10-06 12:45:05 +02:00
devtools eal/loongarch: support LoongArch architecture 2022-10-06 12:45:05 +02:00
doc doc: add kernel version information in DPAA guide 2022-10-07 17:19:03 +02:00
drivers net/dpaa: fix buffer freeing on SG Tx 2022-10-07 17:19:03 +02:00
examples drivers/bus: set device NUMA node to unknown by default 2022-10-06 21:26:55 +02:00
kernel kni: use dedicated function to set MAC address 2022-06-08 19:17:21 +02:00
lib ethdev: support congestion management 2022-10-07 11:50:28 +02:00
license lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
usertools usertools: add options for hugetlbfs mount point owner 2022-06-27 02:24:12 +02:00
.editorconfig devtools: clarify that lines up to 100 characters are ok 2021-11-25 11:51:24 +01:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add eventdev feature matrices 2021-11-26 16:29:25 +01:00
.travis.yml version: 22.11-rc0 2022-07-21 12:13:48 +02:00
ABI_VERSION version: 22.11-rc0 2022-07-21 12:13:48 +02:00
MAINTAINERS net/mana: add basic driver with build environment 2022-10-06 10:49:00 +02:00
Makefile build: create dummy Makefile 2020-09-07 23:51:57 +02:00
meson_options.txt replace Mellanox with NVIDIA 2022-10-03 16:01:56 +02:00
meson.build eal/loongarch: support LoongArch architecture 2022-10-06 12:45:05 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
VERSION version: 22.11-rc0 2022-07-21 12:13:48 +02:00

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