net/ena: fix delayed cleanup of Rx descriptors
authorMichal Krawczyk <mk@semihalf.com>
Mon, 10 Apr 2017 14:28:09 +0000 (16:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
commitec78af6bc0556cf2a1133185ca33fb835b38afe0
tree99042aa6ceaa07ab8ca3ddb22c4a6dbaa1785212
parenta467e8f37a3eec98210c0c3ec04bf6e9506ddd81
net/ena: fix delayed cleanup of Rx descriptors

On RX path, after receiving bunch of packets, variable tracking
available descriptors in HW queue was not updated.

To fix this issue, variable tracking used descriptors must be updated
after receiving packets - it must be reduced by the amount of received
descriptors in current batch.

Additionally, variable next_to_clean in rx_ring must be updated before
entering ena_populate_rx_queue() to keep it up to date with the current
ring state.

Fixes: 1daff5260ff8 ("net/ena: use unmasked head and tail")
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