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 38EC3606A322 for ; Fri, 4 Dec 2026 19:13:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=LAj11IxM Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7869940A6B; Fri, 4 Dec 2026 20:13:23 +0100 (CET) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTPS id 6966A40693 for ; Fri, 4 Dec 2026 20:13:21 +0100 (CET) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-8b67f25e6e1so731966b3a.0 for ; Fri, 04 Dec 2026 11:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796411599; x=1797016399; darn=dpdk.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=NwH39gdseo6MpJgW7STmiLzJQbg4PqxtSsURQjUtNgw=; b=LAj11IxMTn0DDt3JDPlVDYohGv3aOmx/aaXaYWETjbhiHFrX5cbuGYGNXQnkHWII6n MeEfHicp2fRHELClsXlWsZ0Xw/8w8VfXdE7r8ay+L1yVvk6SdJqOEl8O+j0SKzGz+al2 QFqTIDubRDeWxtefw45Ogaz4f96aJvElGVRLAgHEKeobjwAPmnUl+hLJm3MZsXRE1BvM MPJ5SlQE6SrDMnn7Oy1dYXb6OskajFTgJu8JlolUhe8ZzCsOorPrJEI/4SIh/5lN2wyz e9cLwvY6XRFV/1gm9mGXIesK2HakEqChb/Jm0ohOoyihPgm0wqOwt+bB5UX3KynKm81v OTpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796411599; x=1797016399; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NwH39gdseo6MpJgW7STmiLzJQbg4PqxtSsURQjUtNgw=; b=BUArilwVR6TpiiGnLgFSaERQQ94aBZy2RAATj5hDVgJFotH5CWGqwoHjql5qOJctRj FjBE3OsgunJ3caVtWvoCXNuZ6CeBKC3MOWkT0imK33U/xXUlUhsUXVRPAdmFOR3GD+V5 ULYuddahGNcOGq/UWvKN6CwlKfxu3fS64/TGGsDqJp6IvZ3FVdWFBXFzHxf9p1Xw1kd/ FYR2kjAFvSQANYqvcU79GA5I6a9MB78f1zTvdxALVhS3AzXSe9z6ptT2Qi2jSL+PajzY eTWbsKrEom8Ffw36pnt0RhNgP3QJSciwZasm58aMZPXAYaDa+Ipq52LFpVJIXxPMW8gx FD+A== X-Gm-Message-State: AB4q+uFIjS5cwsw3oeiuA02ntNSIpxIvnvcQrHnsVQisBUKyDKVmV8E3 gZiSdHX6O3fF44JwQ9eBUmipYBI60QQsMFPYwyQUmiPdarHgZv2sawFa5JHSUNddpO6TSq++meZ HGP8G X-Gm-Gg: AZFdTZcZkvFq0AKiMKEjbvmGvSAixsizmINSHaUM4KlSyX6REki+uTus0HbMZ76b0T7 rky8JviTihgn7TF9fczyhuW2jz0LitbY+OtN1A1auWptwGeTGEV6wppgTs6UXG6/yAYfGpntP4g TH0BZiIaFT5WIUG9t1NJUK9bVCwbmvC56kgDaxVbjSwpwashh0JUHk/DzeaTWsyVoDlwOLCLeW7 RoZwrHa43gwSUj1vt6to1FXaGYc//NaSS/wEleSzMEBQFBwYgkr0hRDlwut1J+imrKLEH7VzoS0 Z5uKmlZTkpygxSI4utMS0P+4pcTGd7rsgCn+WJDS+SSzu8gySmGAc5j0EaXrwSqaL45S5HeYBBJ P2daJtXOeabybWhJG3GnP98Kp04cVE14dP2kT2Ht9AzA93Jb3hu5ddtAa5JVMh5eZR8KcMtMs6I PYL+/LAUdtvKtsg22Rp0Z00yCP7/mlhCO7qtln9hxq40bsuOymhebwTlmKx6pVrqUxaXP2TL/r2 9Yu/oEDvgcEJG1oBEJsbfD8ykuaRmXpCTZrXDB7PrM9kw+vcXL0dbvKnGFjDMmffbaO3PczwAHa S9OXG7jpU+g3oVlwufp5uA6EvrR6VfR0VTKOGd6+qbksNaEJFmk2/83x8raelDtHQTF8nQ== X-Received: by 2002:a17:90b:3901:b0:3b4:52b:4dd with SMTP id 98e67ed59e1d1-3b5e06c6053mr2601022a91.65.1796411599292; Fri, 04 Dec 2026 11:13:19 -0800 (PST) Received: from phoenix.local (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b61a8c4972sm123182a91.0.2026.12.04.11.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 11:13:19 -0800 (PST) Date: Fri, 4 Dec 2026 11:13:16 -0800 From: Stephen Hemminger To: Joshua Washington Cc: dev@dpdk.org Subject: Re: [PATCH 00/12] net/gve: stability fixes and DQO scattered Rx support Message-ID: <20261204111316.53553b15@phoenix.local> In-Reply-To: <20261203232637.1044501-1-joshwash@google.com> References: <20261203232637.1044501-1-joshwash@google.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Thu, 3 Dec 2026 15:26:23 -0800 Joshua Washington wrote: > This patch series collects 11 bug fixes followed by DQO scattered Rx > support for the GVE PMD: > > Fixes (patches 01-11): > - Disable per-queue start/stop ops until individual queue lifecycle > commands are supported, preventing device/driver ring desync. > - Free partially received GQI Rx chains on queue teardown and avoid > allocating an extra unposted mbuf in GQI Rx queue setup. > - Guard against integer underflow in GQI Rx when frag_size < GVE_RX_PAD > and against integer truncation / descriptor bounds violations in GQI > QPL Tx. > - Stop counting normal ring-exhaustion backpressure as oerrors in DQO > Tx. > - Disable unsupported TCP LRO/RSC offload and drop multi-segment Rx > packets when scatter is disabled in DQO. > - Reject non-power-of-2 ring sizes in DQO Rx/Tx setup. > - Handle RSS allocation failures cleanly without corrupting cached state. > - Reject unsupported flow attributes and item masks. > > Feature (patch 12): > - Add scattered Rx offload support for the DQO descriptor format. Lots of feedback from AI review pass. Review of "net/gve" series (12 patches), applied on top of 27.03-rc0. Patches 04, 07, 08 and 12 need next-net context; hunks were adjusted to apply here. All 12 commits build with -Dwerror=true. Errors ====== Patch 07/12, 12/12: rxq->scatter is stale after reconfigure rxq->scatter is latched at Rx queue setup: gve_rx.c: rxq->scatter = !!(offloads & RTE_ETH_RX_OFFLOAD_SCATTER); gve_rx_dqo.c: rxq->scatter = !!(offloads & RTE_ETH_RX_OFFLOAD_SCATTER); rte_eth_dev_configure() may run again on a stopped port with different Rx offloads, and eth_dev_rx_queue_config() only releases queues above the new count, so queues set up earlier survive with the old flag. gve_dev_configure() updates dev->data->scattered_rx from the new port offloads, but nothing updates rxq->scatter. configure(no SCATTER), rx_queue_setup, configure(SCATTER), start: the port has scatter on, rxq->scatter is false, and every chained frame is dropped and counted as an Rx error: gve_rx_dqo.c, gve_rx_seg_invalid_dqo(): bool unexpected_multiseg = is_first_seg && !is_eop && !rxq->scatter; gve_rx.c, gve_rx(): if (unlikely(is_first_frag && !is_last_frag && !rxq->scatter)) { gve_rx_check_scatter() returns 0 at its first test in this case, so the mismatch is never noticed. In the other order the flag stays true and GQI hands multi-segment mbufs to an application that disabled the offload, since that function only re-validates the buffer size. The comment 12/12 adds to gve_dev_start() already describes this sequence ("keeps Rx queues already set up, so check them again"), so refresh the flag there as well: for (i = 0; i < dev->data->nb_rx_queues; i++) { struct gve_rx_queue *rxq = dev->data->rx_queues[i]; if (rxq != NULL) rxq->scatter = !!(dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_SCATTER); } Warnings ======== Patch 07/12: rxm dereferenced without the NULL check added alongside if (unlikely(rxq->ctx.drop_pkt)) { if (rxm != NULL) rte_pktmbuf_free(rxm); ... frag_len = rte_le_to_cpu_16(rx_desc->packet_len); rxm->data_len = frag_len; sw_ring[rx_buf_id] is cleared as soon as a completion consumes it and is only repopulated by gve_rx_refill_dqo() at the end of the burst, so a buf_id repeated within one burst yields rxm == NULL with drop_pkt false. gve_completed_buf_list_push() also runs twice for that id, leaving completed_buf_list[id] == id, which makes gve_completed_buf_list_pop() hand out the same id indefinitely. Make the two paths agree: } else { rxm = rxq->sw_ring[rx_buf_id]; if (unlikely(rxm == NULL)) { PMD_DRV_DP_LOG(ERR, "Duplicate rx_buf_id %u on queue %u", rx_buf_id, rxq->queue_id); if (!rxq->ctx.drop_pkt) { rxq->stats.errors++; rxq->ctx.drop_pkt = true; } } else { ... } } Patch 07/12: duplicate cleanup in gve_release_rxq_mbufs() 02/12 already adds the free and clear at the top of the function. 07/12 adds the same pair again after the loop, so the series ends with: rte_pktmbuf_free(rxq->ctx.mbuf_head); gve_rx_ctx_clear(&rxq->ctx); for (i = 0; i < rxq->nb_rx_desc; i++) { ... } if (rxq->ctx.mbuf_head != NULL) rte_pktmbuf_free(rxq->ctx.mbuf_head); gve_rx_ctx_clear(&rxq->ctx); The first clear NULLs mbuf_head, so the second pair is dead rather than a double free. Drop the hunk from 07/12. Patch 10/12: documented full-match restriction is still unenforced gve_flow_mask_is_supported() only rejects bits outside the item's default mask: if ((m[i] & ~s[i]) != 0) return false; A partial mask on a field gve does support passes. Both port bytes of rte_flow_item_udp_mask are set, so mask->hdr.src_port = 0x00ff is accepted, and rule->mask.src_port = mask->hdr.src_port; is copied verbatim into the AdminQ command by gve_adminq_add_flow_rule(). gve.rst states "Masking is limited to full matches i.e. 0x00...0 or 0xFF...F" and the commit message says masks are validated against each protocol's supported fields. Either check each supported field, e.g. if ((mask->hdr.src_port != 0 && mask->hdr.src_port != UINT16_MAX) || (mask->hdr.dst_port != 0 && mask->hdr.dst_port != UINT16_MAX)) return reject; or drop the claim from the documentation. Info ==== Patch 07/12: DQO Rx queue setup is unusable on a jumbo VPC until 12/12 if (gve_rx_dqo_needs_scatter(hw->max_mtu, rx_buf_len)) { return -EINVAL; With a 2 KB mbuf pool rx_buf_len is 1920, so any max_mtu above 1906 fails setup unconditionally. 12/12 makes the test conditional on the scatter offload. Both commits build, so bisect is safe, but a bisect landing in 07..11 has no working DQO configuration on such a VPC. Folding the condition into 07/12 avoids that. Patch 12/12: RTE_MAX() is dead for DQO check_mtu = gve_is_gqi(priv) ? mtu : RTE_MAX(mtu, priv->max_mtu); rte_eth_dev_configure() and gve_dev_mtu_set() both reject an MTU above priv->max_mtu, so the DQO arm always yields priv->max_mtu and the mtu argument is unused there. Using priv->max_mtu directly also makes the log line read as the device maximum rather than the requested MTU. Patch 12/12: frag_len is not checked against rx_buf_len frag_len = rte_le_to_cpu_16(rx_desc->packet_len); rxm->data_len = frag_len; packet_len is a 14-bit field, so it can exceed rx_buf_len, giving a segment whose data_len is larger than its buffer; the head's pkt_len then accumulates that across the chain. Pre-existing for the single segment case, but 12/12 extends it to chains. Folding the test into gve_rx_seg_invalid_dqo() would cover both. Patch 07/12: DQO drop state needs an end-of-packet to clear if (is_eop) gve_rx_ctx_clear(&rxq->ctx); drop_pkt now persists across bursts and is cleared only on an end-of-packet completion, so a chain that never carries one leaves the queue dropping every later completion until it is stopped and started. Bounding it on the number of fragments dropped, rather than on EOP alone, would make it self-recovering. Patch 09/12: gve_init_rss_config() error path leaves a dangling key if (!gve_rss_conf->indir) { err = -ENOMEM; goto err_with_key; } ... err_with_key: rte_free(gve_rss_conf->key); return err; key is freed but not NULLed, and key_size and indir_size keep the values assigned above. Every current caller lets the local struct die on that path, so nothing dereferences it; pre-existing, not introduced here, but it is the remaining hole in the area this patch tightens.