Article View: linux.kernel.netdev
Article #20636Re: [PATCH net-next v2 9/9] eth: gve: drop the now-dead HW-GRO vs XDP interlock
From: netdev-bot+sashiko
Date: Mon, 23 Nov 2026 01:33
Date: Mon, 23 Nov 2026 01:33
183 lines
14925 bytes
14925 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] A rejected XDP attach on a running gve DQO device with HW-GRO
on (the DQO default) now rebuilds all of the device's hardware queues…
- [Low] gve's XDP attach path no longer reports its own error when HW-GRO
cannot be turned off, because the HW-GRO handling now happens inside…
--
eth: gve: drop the now-dead HW-GRO vs XDP interlock
This patch removes two gve checks: one refused XDP while HW-GRO was on,
the other refused HW-GRO while XDP was attached. The core now clears
NETIF_F_GRO_HW before ndo_bpf runs and keeps it off while a program is
attached. Attaching XDP with HW-GRO on now succeeds with HW-GRO turned
off instead of failing with -EOPNOTSUPP.
> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index 35cf0f06a0f27..59ced629dcf6b 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c
> @@ -1804,12 +1804,6 @@ static int gve_verify_xdp_configuration(struct net_device *dev,
> return -EOPNOTSUPP;
> }
>
> - if (dev->features & NETIF_F_GRO_HW) {
> - NL_SET_ERR_MSG_MOD(extack,
> - "XDP is not supported when HW-GRO is on.");
> - return -EOPNOTSUPP;
> - }
> -
> if (priv->header_split_enabled) {
> NL_SET_ERR_MSG_MOD(extack,
> "XDP is not supported when header-data split is enabled.");
[Severity: Medium]
With this check gone, a rejected XDP attach on a running gve DQO device
with HW-GRO on (the DQO default) seems to rebuild every hardware queue
twice before it fails. Is that intended?
In dev_xdp_attach(), HW-GRO is cleared before dev_xdp_install() and
ndo_bpf get a chance to refuse:
net/core/dev.c:dev_xdp_attach() {
...
if (new_prog) {
dev->xdp_pending = 1;
err = dev_xdp_clear_rx_agg(dev, extack);
if (err)
goto err_clear_pending;
}
err = dev_xdp_install(dev, mode, bpf_op, extack, flags, new_prog);
if (err)
goto err_clear_pending;
...
err_clear_pending:
dev->xdp_pending = 0;
netdev_update_features(dev);
return err;
}
dev_xdp_clear_rx_agg()->netdev_update_features() reaches
gve_set_features() with GRO_HW cleared. On a running device that runs a
full gve_adjust_config(): gve_queues_mem_alloc(), gve_close(), then
gve_queues_start(). RSC is fixed per queue when the queue is created, in
gve_adminq_create_rx_queue():
cmd->create_rx_queue.enable_rsc =
!!(priv->dev->features & NETIF_F_GRO_HW);
The remaining refusals only run after that rebuild. First come the core
checks in dev_xdp_install(), then
gve_xdp()->gve_verify_xdp_configuration(), which checks queue format,
header split, buffer size, MTU and queue counts.
If any of them fails, err_clear_pending calls netdev_update_features()
again. GRO_HW is still in wanted_features, so gve_adjust_config() runs a
second time to turn RSC back on.
DQO_QPL looks like the easiest way to hit this. gve_init_priv() enables
NETIF_F_GRO_HW for every DQO format, but gve_set_netdev_xdp_features()
leaves xdp_features at 0 for DQO_QPL:
} else {
xdp_features = 0;
}
As a result, every native attach on a running DQO_QPL device rebuilds the
queues twice and then fails with "XDP is not supported on this queue
format.". The MTU and queue-count refusals can be hit the same way on
DQO_RDA, for example with a jumbo MTU.
Either rebuild can also fail in gve_queues_start(), which leaves the
interface running with no live queues:
err = gve_queues_start(priv, tx_alloc_cfg, rx_alloc_cfg);
if (err) {
netif_err(priv, drv, priv->dev,
"Adjust config failed to start new queues, !!! DISABLING ALL QUEUES !!!\n");
gve_queues_mem_remove(priv);
gve_turndown(priv);
return err;
}
Before the series, gve refused the same request right away with no
hardware side effects. The new ordering comes from the earlier patch
"net: state the "XDP excludes HW-GRO" rule in the core", which put
dev_xdp_clear_rx_agg() ahead of dev_xdp_install() and ndo_bpf.
The commit message only describes the success case ("now succeeds with
HW-GRO turned off"). Even a successful attach now rebuilds the queues
twice: once for the GRO_HW toggle and once in gve_configure_rings_xdp().
Could the gve configuration checks run before the core clears HW-GRO? If
the double rebuild is acceptable, could the commit message say so?
> @@ -2218,12 +2212,6 @@ static int gve_set_features(struct net_device *netdev,
> if ((netdev->features & NETIF_F_GRO_HW) !=
> (features & NETIF_F_GRO_HW)) {
> netdev->features ^= NETIF_F_GRO_HW;
> - if (priv->xdp_prog && (netdev->features & NETIF_F_GRO_HW)) {
> - netdev_warn(netdev,
> - "HW-GRO is not supported when XDP is on.");
> - err = -EOPNOTSUPP;
> - goto revert_features;
> - }
> if (netif_running(netdev)) {
> err = gve_adjust_config(priv, &tx_alloc_cfg, &rx_alloc_cfg);
> if (err)
[Severity: Low]
If gve_adjust_config() fails here while the core is turning HW-GRO off
for an XDP attach, does the user get the real error back?
gve_set_features() restores orig_features and returns the errno.
__netdev_update_features() only logs that errno and returns -1, and
netdev_update_features() discards the -1. dev_xdp_clear_rx_agg() then
just re-reads dev->features:
net/core/dev.c:dev_xdp_clear_rx_agg() {
...
netdev_update_features(dev);
agg = dev->features & NETIF_F_XDP_DISABLES;
if (agg) {
NL_SET_ERR_MSG_FMT(extack,
"unable to disable %s, required by another feature",
dev_xdp_rx_agg_name(agg));
return -EBUSY;
}
...
}
gve has no ndo_fix_features, and no gve feature depends on HW-GRO. For
gve, GRO_HW can only stay on because gve_set_features() failed: -ENOMEM
from gve_queues_mem_alloc(), an adminq error from gve_close(), or a
gve_queues_start() failure.
The user gets -EBUSY and a feature-dependency message instead of the
real errno.
If gve_queues_start() was the failure, the device is also left turned
down. The later netdev_update_features() call in err_clear_pending finds
features already equal to wanted_features and does nothing. Nothing in
the extack shows that the NIC has lost its queues.
Before the series, gve refused the same request itself with a specific
-EOPNOTSUPP extack. The new error reporting comes from the earlier patch
"net: state the "XDP excludes HW-GRO" rule in the core".
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261122010112.1471146-1-kuba%40kernel.org
Technical Details
Message-ID:
<179539763293.3135.3326411357299687013@kernel.org>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368941-linux-kernel-netdev=dewy.ruReferences:
<20261122010112.1471146-10-kuba@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368941-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v2 9/9] eth: gve: drop the now-dead HW-GRO vs XDP interlock Date: Mon, 23 Nov 2026 01:33:52 +0000 Organization: Usenet Network Message-ID: <179539763293.3135.3326411357299687013@kernel.org> References: <20261122010112.1471146-10-kuba@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3763820"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:uouwHLkRPrR/hYqTX6tUoikiVY0= sha256:+jJtZE/w6R+t8V9x2vU38qNxSUqFoOytIwinjE4gPCc= sha1:9pwdYrYArg7GfvfF5K8AxIlHK8Q= sha256:WbmZZH0tavMjxb8NcbA5OayE66Ls8a5/c0Toc0J7ZAU= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 95F5B125D8F; Mon, 23 Nov 2026 04:34:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.5 X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L1rWRLIHXZ4l; Mon, 23 Nov 2026 04:34:12 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-368941-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 6D7E5125D87; Mon, 23 Nov 2026 04:34:01 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 43CC260225A; Mon, 23 Nov 2026 01:34:01 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795397640; b=jFC2hVvCq11zMBTN+xIpCgBmg3v2FiccgbGQNXw7KSNNKzyEBcvi3uEzbCQOpjy8uEvV Ca09te6pmaHhHTYhwUEh2SRNJa54OOJkZ9UIf14cDsiG2D/DKGmo/16j1AOh3NyoHmfxP n9RO5Yv88c6MDXEEEwNITc7bdzHSVMzpucxKvHl9muYxG8lHnCTK5L0KBxk1bkVeH2vul BqDlqk3LdOc9ks1O7TE63j3uOQQHQ7k/P5Eu+RumWkp/A5Ixoh/d7XR2+AXD2m/UEj/Qz VkBkhbKKUToX+8dM7IQ51CPg9Z7e2iczoe22eg7KjrlTcMQTMowByG4ytDDgNKo0K8A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795397640; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=TFjV7U7E5Jx1Ins2cB0HnvxZayy3EZy1RrJEu6KQsis=; b=BPSe750/ZEwh+hqiAU96coSMaVI+bCq0aARDFtk+U1s+hipGL5LG5wWvGFIBql+QkmbQ BgMzhfNLwoKeEGifjS1hJ8PZMCHH9+NDZb2dEuuDJeSqW+L7cFTwkhwW6PIhEVIr1zxhs P3RZomOlcPQ6vxeNDAfb9COnAUrbreQcUvn0RD6C+1F2EGNeClivPmn27Ti2vG0jBx6O7 7f15RDiClkMik6FyQZRQlTvvt9Wn3t6nBqtHV5cZulf/14rINcY4Sj2Gw6Md0O27vUTlm Rd2FmSU6MbnrY/9P7CcYDni7qyBcZtT3LQezGc5M2STTuLAaW1WB/s5TQoByurniWRg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ehUlkQuc; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A75DF606A320; Mon, 23 Nov 2026 01:34:00 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ehUlkQuc X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795397634; b=yy57mWKx7am1eps5IscAC4HN+tbIMYyNOBxEfzAu98FR0vLp4g4qYkM/+1kP6GM5pPbo so1e66U6SJy800mkhUcNupP60usfaVaN8ticLRGqtYO/X8lzYnNHRe2vD2UWFaj+n/0XE yrT4n61xyfnxZEsuXW9hPLVM3OKEnfSQPxxxofUEKrG+ynotW9FcN06NThbPfvpSPGPAe W5zRgynzI55oGfnLKNDLAQJKdDkJM/4YSzNx373haqa68mkkOnB5C1t7OZoJ9J+0msEXt TYfwdJbLSUepo+GraSsbpD+F37l8Z0Mg1oAr8rtH2j1yzmBCfIcSOFYM0kMu7T5OUPQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795397634; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=TFjV7U7E5Jx1Ins2cB0HnvxZayy3EZy1RrJEu6KQsis=; b=uRnuRRhPbXphUw58HmVd9PQtFSfeSoR8cM3zrnyKbW65NJsBHhz87qIMPhGyREFV5+wU FcTx5sbo710Qy1V06pD7SIeQWch9DBIll/3mnB4Mi4i4e+oVEST4E/jZl6dXgLNm+LV2y lwrqbKxKZrOppEYaKPAr4IYg3vGOk4bUAlkbgbNaDWg8agfKw7q66UHUOtMeP5ktjaqZx Adj+ykuoc3QLwGyBM/Q+bzl2c3VENETGZ3GwKePDrkzLohfh0IO86RhvmgMlQ6uT3aRb0 gC3aBNdiMUSYEmQdWYVdru+hdi9/9S57czsr+DWt+MRYxCF9HIOXaigmQyw3I3DLRrw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ehUlkQuc; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C670C606A332; Mon, 23 Nov 2026 01:33:54 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 587111F000C4; Mon, 23 Nov 2026 01:33:53 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795397634; bh=TFjV7U7E5Jx1Ins2cB0HnvxZayy3EZy1RrJEu6KQsis=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ehUlkQucOqjykh4wWL3BvReDkEexCsjN4X9QiqTyw2K/9Yuql7oK+bCqXG0ppjUEf It2cJdkkztbFLFFgaqLR0ldSI/dzgEzk2E6Tx6TylGiRSGFcOBsMU8+oETAPHOQH5L oxTQv3kKTzbxPdPoyvxdUcbmUDe7aoTZjoZ8uwM0VQ3e9CObaKdcsQYlc/hp0BJLbI 1js/mo3RLvjYXyTBvSGzYRshz7Zi7ino9cdCmtHtnqvtRbzp+rgs9qWkxdjoQ/S+YK 3c/a8h40wYTATYqzcxHRNf7Zv9p/l5T8TDESqdxniaS2ocbfpFXokefDED9skhNtjE F6eHtObpoZLsg== X-Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, michael.chan@broadcom.com, manishc@marvell.com, joshwash@google.com, hramamurthy@google.com, tariqt@nvidia.com, saeedm@nvidia.com, daniel@iogearbox.net, hawk@kernel.org, sdf@fomichev.me, willemb@google.com, przemyslaw.kitszel@intel.com, bpf@vger.kernel.org, nktgrg@google.com X-In-Reply-To: <20261122010112.1471146-10-kuba@kernel.org> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list