net/gve: always attempt Rx refill on DQ
PATCH 1/1 net/gve: always attempt Rx refill on DQ
Before this patch, gve_rx_refill_dqo() is only called if the number of packets received in a cycle is non-zero. However, in a memory-constrained scenario, this doesn't behave well, as this could be a potential source of lockup, if there is no memory and all buffers have been received before memory is freed up for the driver to use.
This patch moves the gve_rx_refill_dqo() call to occur regardless of whether packets have been received so that in the case that enough memory is freed, the driver can recover.
--- .mailmap | 1 + drivers/net/gve/gve_rx_dqo.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-)
.mailmap +1 -0
@@ -1174,6 +1174,7 @@ Prashant Bhole <[email protected]> Prashant Upadhyaya <[email protected]> <[email protected]> Prateek Agarwal <[email protected]> Prathisna Padmasanan <[email protected]> +Praveen Kaligineedi <[email protected]> Praveen Shetty <[email protected]> Pravin Pathak <[email protected]> Prince Takkar <[email protected]>
drivers/net/gve/gve_rx_dqo.c +2 -4
@@ -195,14 +195,12 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)if (nb_rx >0 ) { rxq->rx_tail = rx_id; -if (rx_id_bufq != rxq->next_avail) - rxq->next_avail = rx_id_bufq; - -gve_rx_refill_dqo (rxq); + rxq->next_avail = rx_id_bufq; rxq->stats.packets += nb_rx; rxq->stats.bytes += bytes; } +gve_rx_refill_dqo (rxq);return nb_rx; }
Signature · 1 line
2.46.1.824.gd892dcdcdd-goog
Ferruh Yigit
AppliedQuoted 10 lines · Joshua Washington
Before this patch,
gve_rx_refill_dqo()is only called if the number of packets received in a cycle is non-zero. However, in a memory-constrained scenario, this doesn't behave well, as this could be a potential source of lockup, if there is no memory and all buffers have been received before memory is freed up for the driver to use.This patch moves the
gve_rx_refill_dqo()call to occur regardless of whether packets have been received so that in the case that enough memory is freed, the driver can recover.
Quoted 7 lines
Fixes 45da16b5b181 ("net/gve: support basic Rx data path for DQO")Signed-off-by Joshua Washington <[email protected]>Reviewed-by Praveen Kaligineedi <[email protected]>Reviewed-by Rushil Gupta <[email protected]>
Applied to dpdk-next-net/main, thanks.