Skip to content

Commit c243d09

Browse files
josh8551021ferruhy
authored andcommitted
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. Fixes: 45da16b ("net/gve: support basic Rx data path for DQO") Cc: [email protected] Signed-off-by: Joshua Washington <[email protected]> Reviewed-by: Praveen Kaligineedi <[email protected]> Reviewed-by: Rushil Gupta <[email protected]>
1 parent 7843c60 commit c243d09

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/net/gve/gve_rx_dqo.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,12 @@ gve_rx_burst_dqo(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
195195

196196
if (nb_rx > 0) {
197197
rxq->rx_tail = rx_id;
198-
if (rx_id_bufq != rxq->next_avail)
199-
rxq->next_avail = rx_id_bufq;
200-
201-
gve_rx_refill_dqo(rxq);
198+
rxq->next_avail = rx_id_bufq;
202199

203200
rxq->stats.packets += nb_rx;
204201
rxq->stats.bytes += bytes;
205202
}
203+
gve_rx_refill_dqo(rxq);
206204

207205
return nb_rx;
208206
}

0 commit comments

Comments
 (0)