net/ena: cleanup if refilling of Rx descriptors fails
authorMichal Krawczyk <mk@semihalf.com>
Mon, 10 Apr 2017 14:28:10 +0000 (16:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
commit2732e07ad1e54c648c8ca5bc6965af5bf607ba10
tree98dbf0603f23f02c8bc498a76fc7ddacebd5d8df
parentec78af6bc0556cf2a1133185ca33fb835b38afe0
net/ena: cleanup if refilling of Rx descriptors fails

If wrong number of descriptors for refilling was passed to the Rx
repopulate function, there was memory leak which caused memory pool to
run out of resources in longer go.

In case of fail when refilling Rx descriptors, all additional mbufs
have to be released.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
drivers/net/ena/ena_ethdev.c