0bf99a02cc
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:
|
||
---|---|---|
.. | ||
fmlib | ||
dpaa_ethdev.c | ||
dpaa_ethdev.h | ||
dpaa_flow.c | ||
dpaa_flow.h | ||
dpaa_fmc.c | ||
dpaa_rxtx.c | ||
dpaa_rxtx.h | ||
meson.build | ||
rte_pmd_dpaa.h | ||
version.map |