numam-dpdk/drivers/net/nfp
Long Wu bb340f56fc net/nfp: fix memory leak in Rx
nfp_net_recv_pkts() should not return a value that less than 0 and the
inappropriate return value in receive loop also causes the memory leak.
Modify code to avoid return a value less than 0. Furthermore, When
nfp_net_recv_pkts() break out from the receive loop because of packet
problems, a rte_mbuf will not be freed and it will cause memory leak.
Free the rte_mbuf before break out.

Fixes: b812daadad ("nfp: add Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Long Wu <long.wu@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
2022-10-05 18:09:21 +02:00
..
flower net/nfp: add representor port Rx/Tx 2022-10-05 18:09:21 +02:00
nfpcore net/nfp: add flower ctrl VNIC 2022-10-05 18:09:21 +02:00
meson.build net/nfp: add flower representor framework 2022-10-05 18:09:21 +02:00
nfp_common.c net/nfp: move Rx/Tx functions to header file 2022-10-05 18:09:21 +02:00
nfp_common.h net/nfp: add flower PF setup 2022-10-05 18:09:21 +02:00
nfp_cpp_bridge.c net/nfp: add initial flower firmware support 2022-10-05 18:09:21 +02:00
nfp_cpp_bridge.h net/nfp: add initial flower firmware support 2022-10-05 18:09:21 +02:00
nfp_ctrl.h net/nfp: modify RSS logic 2022-06-17 15:32:41 +02:00
nfp_ethdev_vf.c net/nfp: move Rx/Tx functions to header file 2022-10-05 18:09:21 +02:00
nfp_ethdev.c net/nfp: move Rx/Tx functions to header file 2022-10-05 18:09:21 +02:00
nfp_logs.h net/nfp: use ethdev debug macro to control Rx/Tx log 2022-09-20 19:54:35 +02:00
nfp_rxtx.c net/nfp: fix memory leak in Rx 2022-10-05 18:09:21 +02:00
nfp_rxtx.h net/nfp: move Rx/Tx functions to header file 2022-10-05 18:09:21 +02:00
version.map version: 22.11-rc0 2022-07-21 12:13:48 +02:00