b0074a7ba1
When using SG list to TX with external and direct buffers,
HW free the direct buffers and driver free the 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 2 more memory leak 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 which 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 even after transmit packets for software
buffer cleanup. This can cause the buffer leak issue.
Fixes:
|
||
---|---|---|
.. | ||
base | ||
mc | ||
dpaa2_ethdev.c | ||
dpaa2_ethdev.h | ||
dpaa2_flow.c | ||
dpaa2_mux.c | ||
dpaa2_pmd_logs.h | ||
dpaa2_ptp.c | ||
dpaa2_recycle.c | ||
dpaa2_rxtx.c | ||
dpaa2_sparser.c | ||
dpaa2_sparser.h | ||
dpaa2_tm.c | ||
dpaa2_tm.h | ||
meson.build | ||
rte_pmd_dpaa2.h | ||
version.map |