🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20479

Re: [PATCH net-next 7/8] eth: qede: drop the now-dead HW-GRO vs XDP handling

#20479
From: netdev-bot+sashiko
Date: Sun, 22 Nov 2026 17:03
100 lines
11772 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 1 · Medium: 0 · Low: 0

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).

- [High] The commit message says the `edev->ndev->features &=
  ~NETIF_F_GRO_HW` line in the XDP branch of qede_alloc_mem_rxq() is…

--

eth: qede: drop the now-dead HW-GRO vs XDP handling

This commit removes the qede driver's own handling of the HW-GRO vs XDP
interaction. It relies on the core to clear NETIF_F_GRO_HW before
ndo_bpf runs and to keep it off while a program is attached. It drops
the xdp_prog check in qede_fix_features(), the reload skip in
qede_set_features(), and the direct dev->features write in
qede_alloc_mem_rxq().

> diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
> index 7ed17faced542..b24baf0e808e1 100644
> --- a/drivers/net/ethernet/qlogic/qede/qede_main.c
> +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
> @@ -1571,7 +1571,6 @@ static int qede_alloc_mem_rxq(struct qede_dev *edev, struct qede_rx_queue *rxq)
>  		rxq->rx_buf_seg_size = roundup_pow_of_two(size);
>  	} else {
>  		rxq->rx_buf_seg_size = PAGE_SIZE;
> -		edev->ndev->features &= ~NETIF_F_GRO_HW;
>  	}

[Severity: High]

Is this line really dead? The commit message says:

  the feature is already off by the time the reload for the program
  allocates the rings;

That is true for the ndo_bpf path. The firmware error recovery path,
though, seems to reach this else branch with GRO_HW set in dev->features
while edev->xdp_prog is still attached:

qede_sp_task()
  qede_recovery_handler()
    qede_unload(edev, QEDE_UNLOAD_RECOVERY, true)
    __qede_remove(edev->pdev, QEDE_REMOVE_RECOVERY)
    __qede_probe(..., QEDE_PROBE_RECOVERY)
      qede_init_ndev()
    qede_load(edev, QEDE_LOAD_RECOVERY, true)
      ...
        qede_alloc_mem_rxq()

In recovery mode, edev and edev->xdp_prog are kept. However,
qede_init_ndev() writes dev->features directly:

	hw_features = NETIF_F_GRO | NETIF_F_GRO_HW | NETIF_F_SG |
	...
	ndev->features = hw_features | NETIF_F_RXHASH | NETIF_F_RXCSUM |

Nothing on this path calls netdev_update_features(), so the core never
gets a chance to strip GRO_HW again.

With the clear gone, the end of qede_alloc_mem_rxq() then computes:

	edev->gro_disable = !(edev->ndev->features & NETIF_F_GRO_HW);
	if (!edev->gro_disable)
		qede_set_tpa_param(rxq);

qede_start_queues() then sets start.gro_enable = !edev->gro_disable,
so TPA is enabled in firmware while XDP is attached.

In qede_rx_process_cqe(), TPA CQEs return before the XDP hook runs:

	/* Handle TPA cqes */
	if (cqe_type != ETH_RX_CQE_TYPE_REGULAR)
		return qede_rx_process_tpa_cqe(edev, fp, rxq, cqe, cqe_type);
	...
	/* Run eBPF program if one is attached */
	if (xdp_prog)

After a recovery with XDP attached and the interface up, would
aggregated TCP traffic skip the attached program, so its XDP_DROP or
XDP_REDIRECT decisions are never applied? dev->features would also show
HW-GRO as on. This would last until something unrelated calls
netdev_update_features().

Would it be better to keep an XDP-aware check when computing
gro_disable, for example edev->xdp_prog || !(features & NETIF_F_GRO_HW)?
Other options would be to stop qede_init_ndev() from overwriting
dev->features on the recovery probe, or to call netdev_update_features()
once recovery completes.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118232315.3593731-1-kuba%40kernel.org
Technical Details
Message-ID: <179536698993.3135.14058741842243697942@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368764-linux-kernel-netdev=dewy.ru
References: <20261118232315.3593731-8-kuba@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368764-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 7/8] eth: qede: drop the now-dead HW-GRO vs XDP handling
Date: Sun, 22 Nov 2026 17:03:09 +0000
Organization: Usenet Network
Message-ID: <179536698993.3135.14058741842243697942@kernel.org>
References: <20261118232315.3593731-8-kuba@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3682276"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:t5Kj5Ck9IZVAVX80Xv/ydpl9wmE= sha256:FYtakPxN0v7GxbPxbim8yj90asmMorwu5L58IPmkQXQ=
	sha1:dF9gfMY1QRO6fY/ZYOwOHFNF9Jg= sha256:JyXlf2T0nJRaQr9eKXUZq0P77IAbTGzCKv9DxgFTU8A=
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 01808125D81; Sun, 22 Nov 2026 20:03:40 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, 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 OFsllaDD8-cm;
	Sun, 22 Nov 2026 20:03:36 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368764-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 2F988125D7F; Sun, 22 Nov 2026 20:03:27 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 0526429034; Sun, 22 Nov 2026 17:03:13 +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=1795366992;
	b=wIqhqktIcXEZu/nPC4VjlyFrNn5bfEyJfQlbHYphX8TeAZRoBGQiy+TqSzeT/Rh8W1i5
	 iBOIJDIumWQxeoE6gAdL4NU1OC7xWhK9j9ZpmEN1RTSmpiWE81lUK/90NkreNW1YABJMu
	 wEqVK1qEWWdfxhDPQ4Zo9Yni/hDzzs5ijG6iflLLBh2tL0MIFDdyTaBQ7m4EfxR/1/NaN
	 Cfz6qlKLd3RS/aWt5A10epvuk3U8rSzxB80UDbavGd03QCbBLs8CjsUQZWgfxquw0pZ8E
	 wnz2Fom7vxaqJ+YL9AWHlKv0lmOmKCRobRwMTaZHmlsGXLoat7zD4XeoaWVSQyxmeng==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795366992;
	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=gMafmWOv8TBm4c4ZfyWe/8aXJfH25fVK6a/gc7SwN9k=;
	b=E1ff0muuBk7p/eMwuhlWiUyNntTdP8pizx+LnFGtFsFJLy0A8B0Pcg25QXzNSvrOXm+g
	 XLuFqKtdMFd3Z48jgjZxKtzjcQn1B+1xH0gfUKC0hqfACIjXHyT2IWWyyhpqariJ1sKdx
	 v7sCqIf8V3GXxtBEQSrOOd0OULE7DmH+hF4T8M6bodIgUOEK7HlenOXykhhO/+WSvSulf
	 iDgpGkJ/jahymQTp45jXourzII/lTHQXslfEU4fsxTEKJhK8zc7nSLdNe52ZwFoZhxBGo
	 lLgWas8GxWqpoJ4ezxAnNK+qPi6y+3g/YSoygDK3TINhz+7b2DCaZIvWW/3WSWl0Ziw==
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="e/RQ1fY6";
	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 D1D63606A337;
	Sun, 22 Nov 2026 17:03:12 +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=e/RQ1fY6
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=1795366992;
	b=yvrWWNui4ptb10uj2ZAynl68m7JNJlt3p4pMclKDuLERE1Ghfl+YQTMNBbPl34BxeMk3
	 g/DO1eRq2xV4C9I9OWa53FqgkjxCW7Vpbct3wuqv7g1GW08zrUrt/Qo+W7WIP6GPoRxvb
	 opNd6/vRAaFGSEv4PtmFiyCdEgudokl0JeJVQ8jYd9LRMPHwGdLMvRD3VxqpJUy0swuD4
	 X/vIzqLug0QTfwMHXGQogTmLxILija0iJpld+zxIANZh++v/F6KJdv7yQMnkMoxz83I+e
	 e1duzHcz5hzEE4/4uFqnBgQiwbNHIC2sCfVLypA2GNFJrHxZDTS7w70WRHBop1q2atQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795366992;
	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=gMafmWOv8TBm4c4ZfyWe/8aXJfH25fVK6a/gc7SwN9k=;
	b=5UQWj6EJvFp4nyNDTcqMWsFqkkHcQKsHEyBnwmya1x9KU2coJpk4M8+WBF3R1g0u8Tsb
	 yQXcZrg25NJoPo2smJZ3Ne1YUXzwNRb6Gfk85ibtaTiVyAw97dK7TOmDGExJqEr82whWS
	 8IfG11An7BzDmMMk5znmTWbPkslSjCmkSjP9yq7AdkurNL/gkavlLJ0u3cSlEkQksa8d2
	 XBWksWzD6ITnB2i+uwBhFQKh/vbfi8e+oB3VSsi7rf41xW1ONlWC4tiSHOoJil52WmPEi
	 9UMLjmya0Y4yyaqXOM6LEztchi8BQPZulG7ezc4XArm7YrA0AFe1s/PUny7kN+buJwg==
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="e/RQ1fY6";
	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 F127D606A32C;
	Sun, 22 Nov 2026 17:03:11 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5ACF41F000D2;
	Sun, 22 Nov 2026 17:03:10 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795366991;
	bh=gMafmWOv8TBm4c4ZfyWe/8aXJfH25fVK6a/gc7SwN9k=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=e/RQ1fY6BIYSH55Asf/BChFs2qCcohDUR4wdgq3Oa7+1t5DBQjvnnL8s7JfR8coPe
	 pqY8SuRWS4GG27uaF+nRjMcVhI5PQnNJJbxp3UzVRB5F57bkSIZZvb2BXCNG9JU5BN
	 ckbOubnEmhF/YMbhgxBSJAAG5FfSLjhjfDZj8xihQtRg/Gs++jURC+ySUYyjBp3mVP
	 /dfZXxUV5OAv/st5uKSTgp+XnOAM8m7Q9RRcjyrow18vj9Js0c3hEiddbVAXtZNXql
	 rzh3APoaiVUWZABXyclTa3zQBx5j3biqoGce9CMenotpwTbad4v+zlFMqHtSBRA+Te
	 94zDfrNDAr+0A==
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
X-In-Reply-To: <20261118232315.3593731-8-kuba@kernel.org>
X-sashiko-severity: High
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