BPF List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/9] net: make core auto-disable HW-GRO and LRO when XDP gets attached
@ 2026-11-22  1:01 Jakub Kicinski
  2026-11-22  1:01 ` [PATCH net-next v2 1/9] net: stop making HW-GRO depend on SW GRO Jakub Kicinski
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jakub Kicinski @ 2026-11-22  1:01 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, michael.chan,
	manishc, joshwash, hramamurthy, tariqt, saeedm, daniel, hawk, sdf,
	willemb, przemyslaw.kitszel, bpf, Jakub Kicinski

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-11-22  1:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22  1:01 [PATCH net-next v2 0/9] net: make core auto-disable HW-GRO and LRO when XDP gets attached Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 1/9] net: stop making HW-GRO depend on SW GRO Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 2/9] selftests: drv-net: gro_stats: use the shared set_ethtool_feat() Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 3/9] selftests: drv-net: drop the generic XDP hack from the HW GRO setup Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 4/9] net: state the "XDP excludes HW-GRO" rule in the core Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 5/9] net: state the "XDP excludes LRO" " Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 6/9] eth: mlx5e: drop the now-dead HW-GRO and LRO vs XDP handling Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 7/9] eth: bnxt_en: don't clear HW-GRO and LRO for XDP in ndo_fix_features Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 8/9] eth: qede: drop the now-dead HW-GRO vs XDP handling Jakub Kicinski
2026-11-22  1:01 ` [PATCH net-next v2 9/9] eth: gve: drop the now-dead HW-GRO vs XDP interlock Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox