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: 1daff5260f
("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>
This commit is contained in:
parent
a467e8f37a
commit
ec78af6bc0
@ -1576,13 +1576,13 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
|
||||
recv_idx++;
|
||||
}
|
||||
|
||||
desc_in_use += 1;
|
||||
rx_ring->next_to_clean = next_to_clean;
|
||||
|
||||
desc_in_use = desc_in_use - completed + 1;
|
||||
/* Burst refill to save doorbells, memory barriers, const interval */
|
||||
if (ring_size - desc_in_use > ENA_RING_DESCS_RATIO(ring_size))
|
||||
ena_populate_rx_queue(rx_ring, ring_size - desc_in_use);
|
||||
|
||||
rx_ring->next_to_clean = next_to_clean;
|
||||
|
||||
return recv_idx;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user