From: Mark Blasko <[email protected]>
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: [email protected]
Signed-off-by: Mark Blasko <[email protected]>
Signed-off-by: Joshua Washington <[email protected]>
---
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