🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20316

[PATCH net-next v2 0/9] net: make core auto-disable HW-GRO and LRO when XDP gets attached

#20316
From: Jakub Kicinski
Date: Sun, 22 Nov 2026 01:01
59 lines
10354 bytes
XDP has no understanding of GSO frames. GSO frame looks to XDP
like a large packet. Pushing / popping headers cannot be reflected
in GSO metadata. XDP redirect is completely blind to GSO since
struct xdp_frame carries no GSO fields.

For those reasons most (read: all well behaved?) drivers disable
LRO and HW GRO when XDP is attached.

This series lifts the auto-clearing of HW-GRO and LRO from drivers
up to netdev core. This gives us uniform behavior - previously some
drivers would reject XDP attach w/ HW-GRO and others would auto-
-clear the HW-GRO features.

More importantly (for me) after this series the HW-GRO/LRO features
should consistently remain in wanted_features, and get re-enabled
after XDP is detached. I started looking at this because XDP tests
in NIPA unintentionally clear HW-GRO, which in turn makes devmem
tests fail / skip on mlx5.

Note that XDP generic is its own can of worms this series doesn't
try to address. There are multiple paths (xdpgeneric, tun, veth...)
which YOLO skbs into XDP without worrying about GSO state.
And HW-GRO disabling w/ XDP generic is not propagated down to lowers.

v2:
 - new patch 2, convert gro_stats.py to the shared set_ethtool_feat()
 - mlx5: drop the netdev_update_features() call from mlx5e_xdp_set(),
   key XDP features off tcp-data-split
 - qede: keep clearing NETIF_F_GRO_HW in qede_alloc_mem_rxq()
v1: https://lore.kernel.org/20261118232315.3593731-1-kuba@kernel.org

Jakub Kicinski (9):
  net: stop making HW-GRO depend on SW GRO
  selftests: drv-net: gro_stats: use the shared set_ethtool_feat()
  selftests: drv-net: drop the generic XDP hack from the HW GRO setup
  net: state the "XDP excludes HW-GRO" rule in the core
  net: state the "XDP excludes LRO" rule in the core
  eth: mlx5e: drop the now-dead HW-GRO and LRO vs XDP handling
  eth: bnxt_en: don't clear HW-GRO and LRO for XDP in ndo_fix_features
  eth: qede: drop the now-dead HW-GRO vs XDP handling
  eth: gve: drop the now-dead HW-GRO vs XDP interlock

 .../networking/net_cachelines/net_device.rst  |   1 +
 include/linux/netdev_features.h   |   6 +
 include/linux/netdevice.h |   6 +
 .../net/ethernet/broadcom/bnx2x/bnx2x_cmn.c   |   2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c |   5 +-
 drivers/net/ethernet/google/gve/gve_main.c|  12 --
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |   8 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  40 +------
 .../net/ethernet/qlogic/qede/qede_filter.c|  12 +-
 net/core/dev.c| 107 ++++++++++++++----
 .../testing/selftests/drivers/net/gro_lib.py  |  21 +---
 .../selftests/drivers/net/hw/gro_stats.py |  54 +--------
 12 files changed, 118 insertions(+), 156 deletions(-)

-- 
2.56.1
Technical Details
Message-ID: <20261122010112.1471146-1-kuba@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-368553-linux-kernel-netdev=dewy.ru

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-368553-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v2 0/9] net: make core auto-disable HW-GRO and LRO when XDP gets attached
Date: Sat, 21 Nov 2026 17:01:03 -0800
Organization: Usenet Network
Message-ID: <20261122010112.1471146-1-kuba@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3535719"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nbFANRHfeHUeXRiLXE80ewfcx1Q= sha256:OazNzhAfvc7IfBgb0rMEUC0cnKhY0AyEtBrnuo/SEl8=
	sha1:KI16INon146EEEA5uCV9CBryDXU= sha256:wCC1DgHEwbKCAueVOa7ymmwXc4qQLpkX2nuJE+jx1XA=
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 D56DB115C5C; Sun, 22 Nov 2026 04:01:35 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 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] 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 tTG6q8BhhRAR;
	Sun, 22 Nov 2026 04:01:32 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368553-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 E7D9C115C54; Sun, 22 Nov 2026 04:01:23 +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 7BDD333296; Sun, 22 Nov 2026 01:01:21 +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=1795309279;
	b=y97pcXVfCvBgYW84AUYnxwrvsKAeKg0m4gIEhgyDScNN4wC7aQmgNb3Qp3UgHGn7JuAh
	 BgRfej2MtTIpqdwqe1E/wAav5Y8JiD93RuEr1+QwTKfXRDXfTi+ceSiXkuF5++H7lsewK
	 MvDAFst3mnlnpzX1kV2GuWYcPVUlm41Awlh4DtWSd6R9idBDiMDyddhmjYY4Y01yP1FxE
	 uiTrRwkDlNjHwVY5vyKIVG2kXwngkeLfZscAWstQMsQx6SNKoogkxXQhnxLdqtq//4+Ap
	 IJ9kc+97/SvbFvJYlosELVLUP7h7ixUklRdPCU4QQhSO6GNxmrGf1WnwyIfXmyuseOg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795309279;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=/4I+mO5uLZShMj+Us0JKP+cnbfvpvxCJyIdSkhVTXVc=;
	b=B8Uc8VIBuW1+/6GUC6QtCd4a8FKFSwoUkbx1+ynZeO91dPNYYq+NN3eq09iwC8UIAZyh
	 pPYuV6Nl5eL/JCU7LgIrZHjyzftDyOe15Ln1nNASI+2GDHmmj0XD8BfFiim58IhwIG1Cx
	 mytOcHyWy/jr9vC/J4D2WAypDa1WsJiJLYU53pnts7D1HivUhmsE3yaZUUBENNXtQNRZG
	 JAqUNxvPt933SfBw/21yenqwt+sWDLMaxf17asnuGi0vrX8PoOWFf0Jo3UEgpTG7wtVvR
	 qkhhmwOqTkOc5krlde02iRAMeH5nz8LYteOCQwt+uqdA0y5M1bP23zdlUbJMvuGOq4Q==
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=RyRKjL2P;
	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 61CAC606A681;
	Sun, 22 Nov 2026 01:01:19 +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=RyRKjL2P
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=1795309278;
	b=1Qxdcelnd72ZYAEaFMD9BLZzFjBYR3F/X00HevZb1J7MvPxegAHhMAlFF5UF/xsIhdmn
	 gVw3eEPBzEudlxsr019BK/kujeJw5yWR0YV5yBlRQpg+a48DybsoDkB8WKJjMz8PUk8oh
	 95b1WXu0v10etTFkfT0rJqFoTqZqiUAB/g6FTFVU8L1Cfpka1FPgdgr3WfOgPb4mZl72T
	 0plDrLeBThb+0DCEF3F2nOQQpiUN2u8dTXsUfzkiQzO9YUj5viU5a5efSaFkJHuUEHT9d
	 nvORImSwYsy9SXMmkNBsTGBlg2e79uI7WilyLSPkpoY0A8P8PHyWly+nT5nsosVjCXw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795309278;
	h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 MIME-Version:Content-Transfer-Encoding;
	bh=/4I+mO5uLZShMj+Us0JKP+cnbfvpvxCJyIdSkhVTXVc=;
	b=tYhSnUnw63EQTqg56rgx3F2rnOHHn/HbhqkcjJYsIUB+bstyAOeq6Hy6sPwRxy2WHnGj
	 bh3XNSKadDmo+IfD/MZ9eW4TPETB+Ca5w41XxPU74qQ2GML2jzYxy+r/vyGpPDWdLFR/d
	 pebgkN7szb6+5OVpg1jLMDsmBhKOpDe6+2ZR7XNifDe8SjyIvG+JKxkajyw60YGX+xUS6
	 wSJ+vgrr44xhYpyMa77wzRVwjwtRIWWvJQchiILpVNSRoMkBcZX2wW21L1PLd/SxmT0/A
	 TAiY6BIAY4i3GPNyp4Q6hBCBgb4gq+6IszZW6vPdKPx/Idpq3lOk3fSJZO8UB70oDcg==
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=RyRKjL2P;
	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 7E765606A32A;
	Sun, 22 Nov 2026 01:01:18 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7894D1F000C4;
	Sun, 22 Nov 2026 01:01:17 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795309278;
	bh=/4I+mO5uLZShMj+Us0JKP+cnbfvpvxCJyIdSkhVTXVc=;
	h=From:To:Cc:Subject:Date;
	b=RyRKjL2PPyit7kFoUJKFBHri9Ez99gpMtKV+3fy5h2Wrq9AcY/7rO33TGXJU8No+M
	 vyEQcHJ7uDIFXDyA4fPHeuzyxhhzaxXP9OzeZ24sG0kOKY4hmAaXF/PxIdw4Xw4LQO
	 1lOMUEt8xRmEM/LG2nE+kIw69jLh2K4GsWzuQxd3IOXdaPlBGPqEkHCSvD5oSsSHaX
	 +cRqdFMz4TNFh36ll4dv2YM5hUyn6aKPI0dZFnDTQGU2c6zgjXq7GtGBBrm3G6W9J5
	 dXWnrJuIRMbOQceVLo+wIrNKb9jv3ykG2UymZMNjsCiuxCUKNO7z8XAZSFxMwx1bkX
	 uyftLYjUAnVQA==
X-Cc: 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,
	Jakub Kicinski <kuba@kernel.org>
X-Mailer: git-send-email 2.56.1
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