From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796175974; b=elUepqT8J8Xb9BsOx5GgrCc+IClKYs4ym0LdF7pSH3JGYNB2NOMFCHIqTopwvTj99Sia cXyo6mAB+YQXPujjioHHfW8JalJ0EiqoMd5BaZdvjSNMC+qy0pVL5rn78tIrwVgtlxB2o fr6ndHsgLNzbCyvPujtD99lX1apQ3E2iU6+6U3fJwyDLLjL0Eyt3y4mihdlls2p1CJV1m nS+OOsE6nXpuBSXRXLzhYJR7EBKhQn09yt3bRVMIYcFkbn2yPYQNjsxbkauOuENgUNuVA ZN+fXsF6K0NQljxrEcj20v7fkehfqx+Y6WYyvpF0bLTkGFbFmmHKgU9UXjf7yIeBDhA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796175974; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:Message-ID:Subject:From:To:Cc:Content-Type; bh=p8NYUKjtqb3wxBqN21eQJXq5HKk4Zjuaw4OdEiEsrTk=; b=pdlTUmQ+TtueGG+Gg5L4FQTgdYwK9xTRvCzPWcSvrHzLIm2AiGkpRLsoaJVwsEULjK3f BcnTcAL4byJM+E66BsadyNGW/5kx3oZvZsuasCmWwwdiIExRhWjAwEKzMW90M7gEy7R2t lXnGBFuolv+aF1UQ5OoAxsZPEhQtHNknInc2QQ4moHMUhnxsbYqvjVgiOMTjwPvMSJcPc tvsPb3j9vt3cFg17zgEMKgEB5ptHJgVcWvYuZo9dw0rClyGuQUe3oUEiHOaHHvV/mrYTa TeYlXW7oXUM8vwWx9Q9BncrI4qDKN2mVWRuTg/nL2KrxQiCknBoit5dkYXzTov8LwIw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b="H6qL3Sl/"; arc=none smtp.remote-ip=209.85.219.69 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFCFE606A31A for ; Wed, 2 Dec 2026 01:46:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BFCFE606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=H6qL3Sl/ Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-92104826f9bso224725246d6.1 for ; Tue, 01 Dec 2026 17:46:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796175973; x=1796780773; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=p8NYUKjtqb3wxBqN21eQJXq5HKk4Zjuaw4OdEiEsrTk=; b=H6qL3Sl/T3fVXz3OJVQGlo/PLH6EH2dASvQqG1g1t15x1lknTAnCtecScHr+webEeh BC+U8i2sqrRy2vp+BU39exJhh4nbFej/DAMikDBQWMiNl12+V9MoYWR3rE6eqOfZdghu asClTKzoI/lnDCCGwbOLLT5uyj0lI/r8K8xeXNCbYkUvxi2/jgnT4EdjpiPh8JlnU+jW r1JAmty2K7CPwMmq4aYVTLrLTbeylHTN0A2E0o+tSLr4VaA2EOg+srq8qwTwxv1U/7pJ 2NcU4zBzGuG8tXMfXyOmnkeLTikYl4BVaOgXFQqPhsu6DaYLm0njioHeAT/Bf0akpVxU 8n0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796175973; x=1796780773; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=p8NYUKjtqb3wxBqN21eQJXq5HKk4Zjuaw4OdEiEsrTk=; b=YE6jNdBx1OgUGFKFfCNMcKVorf189tMRuUnC4TcxIXITGIADbJMkNcwlpC1f8djtT0 zAEpUfH4LCFrUWBreqISHaKxmyVAP+S7sSsFacttUgsgkaN59GSFwYZXbOkXDWj5/1mC 27r1JsyLdk1/EY3MXpSBItmFmtI6BIKplVQrd2RScoNnw161CUbLy5ZOoksx5nPpJPpR JVZ41Pg4UIxytCV/oX0rEz/4r4oivz3yHmCVpznWwfCL0ia6qrwsaINKoZ6G+M8+BsvG sOmkMJFOp+4MvdSsWRqJYdNMOZTBAL/wZdPe7z+8gKJrEsKag9BctUF3H/BlZfDG0RJ9 ARiA== X-Forwarded-Encrypted: i=1; AL+hErEIib8OJbBqjBzxivYGESVdFBsS3674pRUPJkW6q1s3EHEefrOZqEDFDyhrWeDED23Ohgh7pVY=@vger.kernel.org X-Gm-Message-State: APuU4Z/AQbsRttwTDhotC2A5LMVHdd7bxZdsaviw/MkNVF4NqaNyDteu VtxFDKLU9COLRyZIc28c71jEgpNg+6A1PyEhNUSUZkElPrFJzvQXd8nXqFEVN8F5/jLWHK6/kDD LrPvchPed1Q== X-Received: from qvzf10.prod.google.com ([2002:a05:6214:76a:b0:921:4534:29f9]) (user=willemb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6214:40a:b0:921:37b3:1261 with SMTP id 6a1803df08f44-92137b31336mr742795106d6.11.1796175972120; Tue, 01 Dec 2026 17:46:12 -0800 (PST) Date: Tue, 01 Dec 2026 20:46:11 -0500 In-Reply-To: <20261129163327.893403-1-willemb@google.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261129163327.893403-1-willemb@google.com> Message-ID: Subject: Re: [PATCH net-next v2 0/5] net: remove dev_validate_header() and net_device::min_header_len From: willemb@google.com To: Willem de Bruijn , netdev@vger.kernel.org Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, elder@kernel.org, Willem de Bruijn Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Willem de Bruijn wrote: > 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 3: on devices that set hard_header_len but have no link layer > header (e.g., PPP), SOCK_RAW sends, with or without a TX_RING, now > always have skb->network_header at the start of the packet. Before, > only short packets sent without a TX_RING did. > - Patch 4: 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 omitted (without setting > TP_STATUS_VLAN_VALID) 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. Reset network header on all headerless devices via dev_has_header(). > 4. Use ARPHRD_ETHER / ARPHRD_LOOPBACK and ETH_HLEN in vlan_get_tci(). > 5. 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), SOCK_PACKET retry device swap via userfaultfd > (tun -> veth), non-offloaded outgoing VLAN TCI capture (AUXDATA with > non-zero TCI, TCI 0, TP_STATUS_COPY, and tun; TPACKET_V2; TPACKET_V3), > and SOCK_RAW network header offset over PPP (40B/100B IPv4, with and > without TX_RING). > Link: > https://patch.msgid.link/willemdebruijn.kernel.251660d5aa3e@gmail.com > Changes > v1 -> v2 > - rebase on net-next > - cover letter: add Link: to the thread where this cleanup was > proposed > - cover letter: correct the summary of the network header change > - cover letter: update the summary of the VLAN change and the list > of custom tests to match v2 > - patch 1/5: add Acked-by from Alex Elder > - patch 1/5: replace with > for ETH_P_MAP and ETH_MIN_MTU > - patch 2/5: compare against live READ_ONCE(dev->hard_header_len) in > all three af_packet callers instead of the snapshotted value. In > packet_sendmsg_spkt() the snapshot could come from a different > device than the one transmitted on (Sashiko) > - drop v1 patch 3/6 ("packet: validate TX header length before skb > allocation"): not needed to remove min_header_len. This keeps the > TX header length checks against the live hard_header_len, after > the skb is built, which also addresses the Sashiko report on that > patch > - patch 3/5: no code change; clarify commit message (needed_headroom > vs hard_header_len, scope of the 6in4 workaround, why > tpacket_fill_skb() is changed as well, and list hdlc_null_ops as a > second header_ops without ->create) > - patch 4/5: have vlan_get_tci() return bool so callers only set > TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID when a VLAN > header is extracted, avoiding false VLAN flags on TP_STATUS_COPY > skbs (zeroed sll_hatype; Sashiko), non-Ethernet devices, and > truncated frames > - patch 4/5: update commit message to match > v1: > https://lore.kernel.org/netdev/20261124170551.1874487-1-willemdebruijn.kernel@gmail.com/ > Willem de Bruijn (5): > net: ipa: remove ethernet-specific artifacts from modem netdev setup > net: remove header_ops->validate and dev_validate_header() > 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 | 5 +- > drivers/net/loopback.c | 1 - > include/linux/netdevice.h | 18 ----- > net/ethernet/eth.c | 1 - > net/packet/af_packet.c | 78 +++++++++---------- > 6 files changed, 36 insertions(+), 68 deletions(-) Sashiko reports some relevant (incl. pre-existing) issues. Will take a closer look and respin. pw-bot: cr