Article View: linux.kernel.netdev
Article #24510[PATCH net-next v13 7/8] hsr: Move struct hsr_ethhdr to a global header
From: Sebastian Andrzej Siewior
Date: Mon, 30 Nov 2026 08:52
Date: Mon, 30 Nov 2026 08:52
58 lines
11361 bytes
11361 bytes
In the offloading case the network driver needs to inspect the HSR
header to find out if the encapsulated type is a PTP packet where it
needs to suppress offloading of the packet.
Move the header so it can be included by the driver.
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/if_hsr.h | 6 ++++++
net/hsr/hsr_main.h | 5 -----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/linux/if_hsr.h b/include/linux/if_hsr.h
index f4cf2dd36d193..d0773a60c4fd0 100644
--- a/include/linux/if_hsr.h
+++ b/include/linux/if_hsr.h
@@ -3,6 +3,7 @@
#define _LINUX_IF_HSR_H_
#include <linux/types.h>
+#include <linux/if_ether.h>
struct net_device;
@@ -38,6 +39,11 @@ struct hsr_tag {
#define HSR_HLEN 6
+struct hsr_ethhdr {
+ struct ethhdr ethhdr;
+ struct hsr_tag hsr_tag;
+} __packed;
+
#if IS_ENABLED(CONFIG_HSR)
extern bool is_hsr_master(struct net_device *dev);
extern int hsr_get_version(struct net_device *dev, enum hsr_version *ver);
diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h
index 53e95bae0ee27..36eb82774000c 100644
--- a/net/hsr/hsr_main.h
+++ b/net/hsr/hsr_main.h
@@ -72,11 +72,6 @@ static inline void set_hsr_tag_LSDU_size(struct hsr_tag *ht, u16 LSDU_size)
0xF000) | (LSDU_size & 0x0FFF));
}
-struct hsr_ethhdr {
- struct ethhdr ethhdr;
- struct hsr_tag hsr_tag;
-} __packed;
-
struct hsr_vlan_ethhdr {
struct vlan_ethhdr vlanhdr;
struct hsr_tag hsr_tag;
--
2.55.0
Technical Details
Message-ID:
<20261130-hsr_ptp-v13-7-598326208fc5@linutronix.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374041-linux-kernel-netdev=dewy.ruReferences:
<20261130-hsr_ptp-v13-0-598326208fc5@linutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374041-linux-kernel-netdev=dewy.ru From: bigeasy@linutronix.de (Sebastian Andrzej Siewior) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v13 7/8] hsr: Move struct hsr_ethhdr to a global header Date: Mon, 30 Nov 2026 09:52:24 +0100 Organization: Usenet Network Message-ID: <20261130-hsr_ptp-v13-7-598326208fc5@linutronix.de> References: <20261130-hsr_ptp-v13-0-598326208fc5@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1384263"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:TrveX3Tq3aHiUHwpQwfD82TX/xM= sha256:AULUmMjQjirHRl9XOpiT8qrbBkD5s6xuXNtiAJOKGYk= sha1:98M3/vwbwi/oHz4eLFBshExq54g= sha256:NayopkLMhO0xqsg45NLGCCTUa0eGxoFSsHt6/Z38mBQ= 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 F03DA125FD0; Mon, 30 Nov 2026 11:53:12 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.151 X-Spam-Status: No, score=-3.151 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.249, 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=tkdxfSYw; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=NNUEtjXE 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 ZrgGGjAagM7p; Mon, 30 Nov 2026 11:53:10 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374041-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 25D9B125FCF; Mon, 30 Nov 2026 11:52:57 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id A484A25A96; Mon, 30 Nov 2026 08:52:48 +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=1796028754; b=NCxmHy5cBZ4fiRsCUVl/zltvnQCcuBVBTr28p+oRB/NWbHdThXnge6XyXB3tJ8IxevyF qfZlxUv56Cmg+I+gb+uKaAThGpXSf2fKEtQleWpi8vwPef+krTL7716gIZI5k/UO0/CXH rFFrJvPU2OwsfkMIP1DETEd9zV4EYkwEajVv4+BaepEYGqNcdZoUDIkpLsaoI2K4MkUjv vug0TnRuND5nSA82xs782ptNa1Lr9uSTrAqO+y7/ev3kUj2943FzrhZZZYTh91PFJ5N5u jtL8038Mt0pbotHzlZsLkd9+AqAIhvrhpQsU7awxdQYaj8VjrN/Zxy0lVNzmEjOt9og== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796028754; h=X-Original-To:Received:DMARC-Filter:From:DKIM-Signature: DKIM-Signature:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=I+G+ZDFPb4FfbpdCyFfeOwCDzp3rlKHbt4LCLi1AOSE=; b=Q+JhgLmyojO84Y8PujZtkTu0JiB+T6J44wisJvvEqABUNj8ec7oTl485IAvI8rXx9x46 1gPMuw/rwQ6veEr2oz2dg1r30pnn+mIbhKnOh164VgtPeXC/j8W7lI4QixMNGLsqKAZ4N YuCLax3aix7i62BDD53+mUdwWOZ22LZB1v/axbWIDS6n5V+Ps+FucCVKZuEB1Gtnbm/0h eaIBjdDDg0ueTcHkhkGm6RpAFhEqs8KcUcd/szjajeflFFa2kWn6ixkT0n8RmOOgRrq4M 1ubXr2Lmv26U6ygGYZaSRjVlxqmoSfV8JgUVg1t89pQ7XHcZVYyUzKFuLZNr+V6Y9FQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=tkdxfSYw; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=NNUEtjXE; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; 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 AEC34606A332; Mon, 30 Nov 2026 08:52:34 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=tkdxfSYw; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=NNUEtjXE X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796028753; b=xwc0I9jiHw7Uc2gt8TtA1KUq2uvJ8TBrMTO/nZSAp39G6P6dMVx5j8Oq5czumsfCktoi uOwAU877spRYi/AzbZyp27fkaLQD92RzBnhHKxPdNzuUIxJeDO5eqhj3f264CjZjZddCd QVq4egn0D2E5tsEzdBOcnkRbGm2kd/gVRPOXPYx3vNM0aBuqdkkudcKXypNHFwncVXQDS /S6ROB2lSzK8PXGTjRlcDsti9ZNb8BcAigeFf24LlQCP80B1uVSfL8SnVkCIk2j9B48BS z3ptrofSGofnSQpNXaOCnRMXDfAVkYBoCBjpeufg9s9qrpWoE0WFmxx3nbjedJe9qDQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796028753; h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=I+G+ZDFPb4FfbpdCyFfeOwCDzp3rlKHbt4LCLi1AOSE=; b=ObZpf96RTN6n+cMDrUJbeoyG5dLU/ebTBnmzyqhJY2gIRT2SrenZQi/R7g+U+DWcTxY/ suEgIXl9CCVjY2M1W52/zpAcn0xfjYyq3XAKAS+xAW1jO6fjfsUvmgS3gz6vOvF9Z2iWl iu8ura63iF6KrBqXOVskVbp4NRk3dxCCYdBMyO9V+sJ/9f9m8g5B99vgfsT4b0Qfcz5IC x3LMlgG8RWARwcc3AESGuH51k03bXs3tNZBq9IxP1nhNPjQlGPmhr73OWR6HzuimbRcfA +SkdzEc3hC9xeYNg5CUnsGY4kgOU3cXEsvjz0X2NNAtZ4k2SN0jLcJRt8JJ5b2SbnoQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=tkdxfSYw; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=NNUEtjXE; arc=none smtp.remote-ip=193.142.43.55 X-Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62B1D606A6AF for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 08:52:33 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 62B1D606A6AF 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=1796028751; 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=I+G+ZDFPb4FfbpdCyFfeOwCDzp3rlKHbt4LCLi1AOSE=; b=tkdxfSYw36HPnHyRlmcAW3qdmGDoiLKQpnBtQwPwlWe9eKh4nkIyEuz4u10bAnJLv63qPe H1PyjKxB6JcH7N0z9pTu03YYtyIHHV3cO5w4XqFIDhCzjL69AG1eYlcFZs3DmBMaB0jZcn FszD0a4H54rwuXdUaAZQnK7qSROBlHhRKCwWBT7WoHG751AS9fGcGM7rctm9arfUc9XIVg BSU68iDu4RuLLYuaDj0gD0ywp3wU9ikA2za3/8f0DoBNhQ/iQ6ThRVTkIFVvLpgDx0PRtM o9Rn4TxM5vt8vst80JfV/d2aEHYnDleLdnZNNeKSWb88HV2ouIBREC+xom28kA== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796028751; 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=I+G+ZDFPb4FfbpdCyFfeOwCDzp3rlKHbt4LCLi1AOSE=; b=NNUEtjXExjPX4JvPuWg3ydl2e7jaOhTC5qi51SWTpd83T+mVbM1LPnS0pmBib/lMJA770+ aUK4IuGmoJ1W67Bw== X-Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>, "(JC), Jayachandran" <j-rameshbabu@ti.com>, Andrew Lunn <andrew+netdev@lunn.ch>, 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: <20261130-hsr_ptp-v13-0-598326208fc5@linutronix.de> 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