From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13BE5606A322 for ; Thu, 3 Dec 2026 23:27:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=gKmP+Wxt Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D005409FA; Fri, 4 Dec 2026 00:26:47 +0100 (CET) Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by mails.dpdk.org (Postfix) with ESMTPS id D77B8406BB for ; Fri, 4 Dec 2026 00:26:45 +0100 (CET) Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-83edc5c5ae9so462297a34.1 for ; Thu, 03 Dec 2026 15:26:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796340404; x=1796945204; darn=dpdk.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2LcQEYFycHJxUuaUG+eSynf67CWcF487gG6/lia7Wqc=; b=gKmP+WxtjHEfghvVByI5iu6XOQUYe8jTElJFAq/pemY94UnkIPNEyq+DdbTSb3+gXQ zMlFp6Kx47p9GRaPilVuYzStBk5x8TFkFgYEUQHHxAQlw2cYFWMRbhk3+p4scIsI/UHC ag5+Bvqlwpfs3qDQFXdshF2mRScBndbQUTm/pC6BKTSyX3wrZ890OQ2+dzCJ6RcMn1k6 FYEZ/pZE92hGEX6umKhJP3oMCgmp35GbTctyzTAj0+FzelwjJ4AjRZraALaXH2ZFOvLd NQMwonUpzY6oQP4Bf6NGYzhlxqGIrG1+bp0iBjtOr/Uq1HCZCkXEYIZKHLECPwjq/7oA 0RJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796340404; x=1796945204; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2LcQEYFycHJxUuaUG+eSynf67CWcF487gG6/lia7Wqc=; b=dNJWwCdRseipK3AbI9i9+F3SwG5dJtvi7fTHjk/zK1CmucBzVP7iwu6QhgbZuFR72v 2l6fKyoK0qXoIDgLqbCR9MhBZd2DYaSg3Xpp6JG0plQFNDN5cedlTjjrtmtmKeWujY4L EmoKGMvu9HmkysWCbXCXEbEXai6/ElMwM+D60mn9AZxsnY+fqJsUlmQRvnT8oGVVibe4 xbdH8bKQoLm3XQugNbtGpbBUZxmUcdEMzJgsww3xxlYVFSNKHyu5eh/Ju5bwYxTAsbDJ xCguIMCXYpl9f2WsGNjmTU92XPB7AbHAcHUJ5kL94D6oyXaXBwQEg72LAD3odDUiSB3W 67zw== X-Gm-Message-State: APuU4Z+oaQKZ5TfrApM+f9AFqFnugaPJ8OqbsLsp4hPJqoxOoiCOiny5 C966utu7sx0KTksMZFFI4Ypgw7lkn4xQa3tfLXjbi7l9RfAD6Jv2TVdDY8PZntDvrmvazRQ0a2Z jVHmDNtIStJ9jdQ== X-Received: from iotw5.prod.google.com ([2002:a05:6602:1c5:b0:9c4:b80b:7605]) (user=joshwash job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6820:1c8f:b0:71b:8658:f0a9 with SMTP id 006d021491bc7-71bf2087d6cmr181959eaf.64.1796340404373; Thu, 03 Dec 2026 15:26:44 -0800 (PST) Date: Thu, 3 Dec 2026 15:26:25 -0800 In-Reply-To: <20261203232637.1044501-1-joshwash@google.com> X-Archived-By: Mime-Version: 1.0 References: <20261203232637.1044501-1-joshwash@google.com> X-Mailer: git-send-email 2.56.1.915.g69d5ec7298-goog Message-ID: <20261203232637.1044501-3-joshwash@google.com> Subject: [PATCH 02/12] net/gve: free partially received GQI Rx packet From: Joshua Washington To: Joshua Washington , Junfeng Guo , Jeroen de Borst , Rushil Gupta Cc: dev@dpdk.org, Mark Blasko , stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Mark Blasko 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@dpdk.org Signed-off-by: Mark Blasko Signed-off-by: Joshua Washington --- 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