Skip to content

net: remove dev_validate_header() and net_device::min_header_len

Willem de Bruijn netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: ipa: remove ethernet-specific artifacts from modem netdev setupdrivers/net/ipa/ipa_modem.c+0 -41 reply
2/6net: remove header_ops->validate and dev_validate_header()include/linux/netdevice.h net/packet/af_packet.c+3 -200 replies
3/6packet: validate TX header length before skb allocationnet/packet/af_packet.c+19 -150 replies
4/6packet: reset network header on all headerless devicesnet/packet/af_packet.c+4 -30 replies
5/6packet: use Ethernet header length in vlan_get_tci()net/packet/af_packet.c+9 -290 replies
6/6net: remove unused net_device::min_header_lenDocumentation/networking/net_cachelines/net_device.rst drivers/net/loopback.c include/linux/netdevice.h +1 more+0 -50 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchAlex Elder
1/6A-b
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/6] net: remove dev_validate_header() and net_device::min_header_len

From: Willem de Bruijn <[email protected]>

Remove unused link-layer header validation plumbing, clean up the remaining af_packet users, and drop net_device::min_header_len.

Mostly cleanup, with two user-visible changes:

- Patch 4: on devices that set hard_header_len but have no link layer header (e.g., PPP), SOCK_RAW and TX_RING sends now always have skb->network_header at the start of the packet, not only for short packets.
- Patch 5: on SOCK_DGRAM, the VLAN TCI of non-offloaded tags is now reported on all Ethernet devices, including those with hard_header_len > ETH_HLEN, and is 0 on non-Ethernet devices.

1. Drop stale Ethernet fields (including min_header_len) in IPA modem.
2. Remove header_ops->validate and dev_validate_header().
3. Move af_packet TX header length checks ahead of skb allocation.
4. Reset network header on all headerless devices via dev_has_header().
5. Use ARPHRD_ETHER / ARPHRD_LOOPBACK and ETH_HLEN in vlan_get_tci().
6. Remove unused net_device::min_header_len.

Testing (under vng):
- tools/testing/selftests/net: psock_snd.sh, psock_tpacket, and txring_overwrite.
- Custom tests for short/zero header validation (SOCK_RAW, SOCK_DGRAM, SOCK_PACKET, TX_RING), non-offloaded outgoing VLAN TCI capture (AUXDATA, TPACKET_V2, TPACKET_V3), and 48B/100B IPv6 TX over sit (SOCK_RAW, SOCK_PACKET, TX_RING).

Willem de Bruijn (6):
net: ipa: remove ethernet-specific artifacts from modem netdev setup
net: remove header_ops->validate and dev_validate_header()
packet: validate TX header length before skb allocation
packet: reset network header on all headerless devices
packet: use Ethernet header length in vlan_get_tci()
net: remove unused net_device::min_header_len

 .../networking/net_cachelines/net_device.rst  |  1 -
 drivers/net/ipa/ipa_modem.c                   |  4 -
 drivers/net/loopback.c                        |  1 -
 include/linux/netdevice.h                     | 18 -----
 net/ethernet/eth.c                            |  1 -
 net/packet/af_packet.c                        | 80 ++++++++-----------
 6 files changed, 32 insertions(+), 73 deletions(-)
Signature · 1 line
2.56.1.839.g22a8290db9-goog