Article View: linux.kernel.netdev
Article #3264[PATCH net-next v9 1/8] hsr: Add header_ops::parse_protocol
From: Sebastian Andrzej Siewior
Date: Wed, 14 Oct 2026 14:43
Date: Wed, 14 Oct 2026 14:43
35 lines
8354 bytes
8354 bytes
af_packet uses dev_parse_header_protocol() to assign skb::protocol.
The hsr stack does not assign a callback so the field is assigned to 0.
There is nothing known to be broken because this is missing. Having a
callback assigned makes it possible to use the protocol field later in
the series by packets which originate from the AF_PACKET interface.
The header used by the HSR stack corresponds to the ethernet header for
the "first" part so the protocol member is at the same position.
Use eth_header_parse_protocol() for the hsr_header_ops's parse_protocol
callback.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
net/hsr/hsr_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index d14de44e14b7a..6d96bc4a12446 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -247,6 +247,7 @@ static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
static const struct header_ops hsr_header_ops = {
.create = eth_header,
.parse = eth_header_parse,
+ .parse_protocol = eth_header_parse_protocol,
};
static struct sk_buff *hsr_init_skb(struct hsr_port *master, int extra)
--
2.55.0
Technical Details
Message-ID:
<20261014-hsr_ptp-v9-1-2d20a2a0f816@linutronix.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346316-linux-kernel-netdev=dewy.ruReferences:
<20261014-hsr_ptp-v9-0-2d20a2a0f816@linutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346316-linux-kernel-netdev=dewy.ru From: bigeasy@linutronix.de (Sebastian Andrzej Siewior) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v9 1/8] hsr: Add header_ops::parse_protocol Date: Wed, 14 Oct 2026 16:43:55 +0200 Organization: Usenet Network Message-ID: <20261014-hsr_ptp-v9-1-2d20a2a0f816@linutronix.de> References: <20261014-hsr_ptp-v9-0-2d20a2a0f816@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="2315821"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:TehNbD6Vp1TfSYmwUUf7rUS8ijY= sha256:oMovVxkHeovvZQjdqZPqlPR3NYaAERcz7UdH4MPzJ1A= sha1:aenOH/HFJ7iKT1DsMmwarLhu5Kk= sha256:2QgUI7Shvv3RFtl30SwFYgw2ae+wwH35I0o2GSA8OaU= 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 6B5E8110138; Wed, 14 Oct 2026 17:45:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.15 X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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=linutronix.de header.b=dfryfchX; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=Pth8dRSO 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 cxI4qDPXXlCP; Wed, 14 Oct 2026 17:45:12 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-346316-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linutronix.de X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 3A75110FAAD; Wed, 14 Oct 2026 17:44:58 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sto.lore.kernel.org (Postfix) with ESMTP id 228AA612A83; Wed, 14 Oct 2026 14:44:17 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D172854A7ED; Wed, 14 Oct 2026 14:44:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dfryfchX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Pth8dRSO" X-Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0219952E07C for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 14:44:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791989054; cv=none; b=DwAJ/4f7y3pEjGS/1To6hEcJxyW6c7ElQFE9VFxyipelZCXbf0jpa6Lo8TdA1zaYRr+373AuLS3TlZTi61ieVFjpj79op05rKVgHWAzs7UkD51NeGxBBM8t3a7/AVNgSXo0l9wytQ8b1kaFVgVJsrimJz8URdJkMkTYgtbkDwRs= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791989054; c=relaxed/simple; bh=KzcN5rwx5RMJ+o9ZB9mV+GzxHnWPysPb8AoimoERr6o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HxS/lhuZWN6G8wi3fUoUYR4au1UMtZQLzGpI+zXMPK8yl7PF3ITgkWnEwl1ysN8VuSpmexYvHMjrtAno+/l2P8lwYX8kc5Y08oG/9ef7ZzM1D8Nddx+hETJwhr8qj+/3qoTBhULPGKIQ7jgFQvc2AbVIrpdx4/PR8BWn2L+Ros0= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dfryfchX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Pth8dRSO; arc=none smtp.client-ip=193.142.43.55 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1791989046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FRzmRg0wO+u+IJGf1NJ7IPR0CEjN6p4+2Mg8KTPK8iY=; b=dfryfchXoBcBLdH+9CZVuYD07kOPHKcwRpSW2DLen3i8TzsQs2i+uCFGG/88enypKsW652 XE37cVeQ3TkZ2eLES2xKodNXwIN79LQhdPOK+HkLdwCvp++ne67jYxwZCGI1Kk5a5wn7d9 SwN1b7R2OtgLiiMw5E9xAEZ0NVkxmOytQfrrx8IuIlWTup13t3FN+/LgRjufsPzFh/3QZE H6HuQxiVHiAlhPDIRdhzwH8597aN4i6hxQQCQRftcAGpDlANq7Ma5fpLRFs8BIlI7+Z1IF 7ymy+jfTgVxjBFSBpdm3SL06g9k3xhibEQ2BixHmJaLnTsiRvhYvajee6NuCdg== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1791989046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FRzmRg0wO+u+IJGf1NJ7IPR0CEjN6p4+2Mg8KTPK8iY=; b=Pth8dRSOZ2TvY9RSWQ17XQVP4iL8WWGRDEUI1hHWX4We0AYGc4NrBVsotF97ACSU8q8XtM Nly/DWQBVpwDD7Ag== X-Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>, "(JC), Jayachandran" <j-rameshbabu@ti.com>, Andrew Lunn <andrew+netdev@lunn.ch>, Chintan Vankar <c-vankar@ti.com>, Danish Anwar <danishanwar@ti.com>, Daolin Qiu <d-qiu@ti.com>, "David S. Miller" <davem@davemloft.net>, Felix Maurer <fmaurer@redhat.com>, Jakub Kicinski <kuba@kernel.org>, Neelima Muralidharan <neelima@ti.com>, Paolo Abeni <pabeni@redhat.com>, Praneeth Bajjuri <praneeth@ti.com>, Pratheesh Gangadhar TK <pratheesh@ti.com>, Richard Cochran <richardcochran@gmail.com>, Simon Horman <horms@kernel.org>, Vignesh Raghavendra <vigneshr@ti.com>, Willem de Bruijn <willemdebruijn.kernel@gmail.com>, Daniel Machon <daniel.machon@microchip.com>, Eric Dumazet <edumazet@kernel.org> X-In-Reply-To: <20261014-hsr_ptp-v9-0-2d20a2a0f816@linutronix.de> X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>