[PATCH 02/12] net/gve: free partially received GQI Rx packet

Joshua Washington joshwash at google.com
Fri Dec 4 00:26:25 CET 2026


From: Mark Blasko <blasko at google.com>

A GQI Rx burst can return while a packet spanning multiple descriptors
is only partially received. The fragments received so far are detached
from the software ring and kept in the queue's reassembly context
until the last fragment arrives.

Releasing the queue's mbufs, as done when the device is stopped,
only freed the mbufs still in the software ring. The partial
packet was leaked, and the reassembly context was left populated, so
the first packet received after a restart was treated as a continuation
of the stale packet: it was appended to it, or dropped if the stale
packet had an error.

Free the partial packet and clear the reassembly context when releasing
the queue's mbufs.

Fixes: 496d4d2c8b54 ("net/gve: support jumbo frame for GQI")
Cc: stable at dpdk.org

Signed-off-by: Mark Blasko <blasko at google.com>
Signed-off-by: Joshua Washington <joshwash at google.com>
---
 drivers/net/gve/gve_rx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c
index 31c187ca83..8e7557e774 100644
--- a/drivers/net/gve/gve_rx.c
+++ b/drivers/net/gve/gve_rx.c
@@ -278,6 +278,9 @@ gve_release_rxq_mbufs(struct gve_rx_queue *rxq)
 {
 	uint16_t i;
 
+	rte_pktmbuf_free(rxq->ctx.mbuf_head);
+	gve_rx_ctx_clear(&rxq->ctx);
+
 	for (i = 0; i < rxq->nb_rx_desc; i++) {
 		if (rxq->sw_ring[i]) {
 			rte_pktmbuf_free_seg(rxq->sw_ring[i]);
-- 
2.56.1.915.g69d5ec7298-goog



More information about the stable mailing list