numam-dpdk/drivers/net
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
..
af_packet bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
af_xdp dev: hide driver object 2022-09-23 16:14:34 +02:00
ark dev: hide driver object 2022-09-23 16:14:34 +02:00
atlantic eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
avp dev: hide driver object 2022-09-23 16:14:34 +02:00
axgbe net/axgbe: support segmented Tx 2022-10-04 16:57:50 +02:00
bnx2x dev: hide driver object 2022-09-23 16:14:34 +02:00
bnxt ethdev: increase queue rate parameter from 16b to 32b 2022-10-04 13:52:05 +02:00
bonding net/bonding: fix double slave link status query 2022-08-25 19:04:09 +02:00
cnxk ethdev: increase queue rate parameter from 16b to 32b 2022-10-04 13:52:05 +02:00
cxgbe ethdev: remove deprecated flow action physical port 2022-09-27 10:26:51 +02:00
dpaa net/dpaa: fix buffer freeing on SG Tx 2022-10-07 17:19:03 +02:00
dpaa2 net/dpaa2: fix buffer freeing on SG Tx 2022-10-07 17:19:03 +02:00
e1000 dev: hide driver object 2022-09-23 16:14:34 +02:00
ena dev: hide driver object 2022-09-23 16:14:34 +02:00
enetc version: 22.11-rc0 2022-07-21 12:13:48 +02:00
enetfec net/enetfec: fix buffer leak 2022-10-07 17:19:03 +02:00
enic dev: hide driver object 2022-09-23 16:14:34 +02:00
failsafe ethdev: remove Rx header split port offload 2022-10-04 11:20:04 +02:00
fm10k ethdev: remove Rx header split port offload 2022-10-04 11:20:04 +02:00
hinic bus/pci: make driver-only headers private 2022-09-23 16:14:34 +02:00
hns3 net/hns3: support Rx/Tx descriptor dump 2022-10-06 18:38:48 +02:00
i40e ethdev: remove Rx header split port offload 2022-10-04 11:20:04 +02:00
iavf security: hide session structure 2022-10-04 22:37:54 +02:00
ice net/ice: check illegal packet sizes 2022-09-30 10:28:29 +02:00
igc net/igc: remove unnecessary PHY ID checks 2022-09-07 20:33:26 +02:00
ionic bus/pci: make driver-only headers private 2022-09-23 16:14:34 +02:00
ipn3ke bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
ixgbe ethdev: increase queue rate parameter from 16b to 32b 2022-10-04 13:52:05 +02:00
kni bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
liquidio eal: deprecate RTE_FUNC_PTR_* macros 2022-09-23 16:14:34 +02:00
mana net/mana: support Rx interrupts 2022-10-06 10:49:00 +02:00
memif net/memif: fix crash with different number of Rx/Tx queues 2022-10-04 16:50:40 +02:00
mlx4 net/mlx4: fix Verbs FD leak in secondary process 2022-10-02 09:13:48 +02:00
mlx5 net/mlx5: fix meter profile delete after disable 2022-10-02 09:13:55 +02:00
mvneta ethdev: remove Rx header split port offload 2022-10-04 11:20:04 +02:00
mvpp2 ethdev: remove Rx header split port offload 2022-10-04 11:20:04 +02:00
netvsc dev: hide driver object 2022-09-23 16:14:34 +02:00
nfb version: 22.11-rc0 2022-07-21 12:13:48 +02:00
nfp net/nfp: fix memory leak in Rx 2022-10-05 18:09:21 +02:00
ngbe net/ngbe: use renamed IEEE 1588 offload flags 2022-10-04 01:43:15 +02:00
null bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
octeon_ep net/octeon_ep: fix build for non-x86 2022-09-26 09:14:08 +02:00
octeontx ethdev: remove deprecated Flow Director configuration 2022-08-31 15:24:23 +02:00
pcap bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
pfe bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
qede net/qede/base: fix 32-bit build with GCC 12 2022-10-06 12:28:05 +02:00
ring net/ring: support power monitor 2022-10-04 17:11:02 +02:00
sfc net/sfc: clarify Rx buffer size calculation 2022-09-28 11:51:39 +02:00
softnic net/softnic: fix file descriptor leak 2022-10-04 01:08:39 +02:00
tap net/tap: add persist option 2022-10-04 16:40:24 +02:00
thunderx ethdev: remove Rx header split port offload 2022-10-04 11:20:04 +02:00
txgbe ethdev: increase queue rate parameter from 16b to 32b 2022-10-04 13:52:05 +02:00
vdev_netvsc dev: hide driver object 2022-09-23 16:14:34 +02:00
vhost bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
virtio net/virtio: fix crash when configured twice 2022-09-29 10:13:22 +02:00
vmxnet3 dev: hide driver object 2022-09-23 16:14:34 +02:00
meson.build net/mana: add basic driver with build environment 2022-10-06 10:49:00 +02:00