Article View: linux.kernel.netdev
Article #3272[PATCH net-next v9 7/8] hsr: Move struct hsr_ethhdr to a global header
From: Sebastian Andrzej Siewior
Date: Wed, 14 Oct 2026 14:44
Date: Wed, 14 Oct 2026 14:44
57 lines
8715 bytes
8715 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 suppress offloading of the packet.
Move the header so it can be included the driver.
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 7b6b60ef592db..f81323f10eecc 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>
#include <uapi/linux/hsr_ptp.h>
struct net_device;
@@ -39,6 +40,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:
<20261014-hsr_ptp-v9-7-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-346323-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-346323-linux-kernel-netdev=dewy.ru From: bigeasy@linutronix.de (Sebastian Andrzej Siewior) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v9 7/8] hsr: Move struct hsr_ethhdr to a global header Date: Wed, 14 Oct 2026 16:44:01 +0200 Organization: Usenet Network Message-ID: <20261014-hsr_ptp-v9-7-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="2318756"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:2xChyzv2CTEBT0ufDYZ5xZPXCvs= sha256:mWRJ9XyasWVhQFnSiPZF4Ga63BPATPgvlqx0mc0pPdA= sha1:lTYIwRBvsKjVkXKMo+HGBbfM8UU= sha256:j5HhyNHEcjIy7YDeuHbfGSFOjNpv8mc8YB0Tw2E97dY= 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 4B7831100AD; Wed, 14 Oct 2026 18:05:17 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.749 X-Spam-Status: No, score=-0.749 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=4n3ez8SH; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=0sndJWbB 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 o-Gb7uG7JQEj; Wed, 14 Oct 2026 18:05:10 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346323-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 3176D110135; Wed, 14 Oct 2026 18:04:56 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 409C7A03FC; Wed, 14 Oct 2026 14:44:53 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78B8C54EECA; Wed, 14 Oct 2026 14:44:24 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4n3ez8SH"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0sndJWbB" 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 5B00254DAC4 for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 14:44:16 +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=1791989064; cv=none; b=F4WqEe3LXcSad0nxuzo0YUqFHzFmQd2P8n/4n1GtPQYcQRluN7SYO7z0Ke+xgTBKuBnXHE/64sWGgMfX8i8uf0K0dr8cawNsyYg7xrwaQB5PDhdauO1FmE/X8CbQ23N6gshMo8gPU25CBcoOZO7LvZOZwQ3t6PAgZymeXuEd1BE= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791989064; c=relaxed/simple; bh=xeHpX0Li+qHXSKmyMhrnyX4YOBZg1CRaj4sU526PBk0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YZqKZFqxwgEebiHhMc0zTKwl0OF0H2/zhaaP0mAwdVCgiBlFx392IEIZUdyA2PrW2rhAPMB+uKV3dGOb7w502RLdz2jfUPXqua8hm1luwzpaF1KoWevdoK0JZaTaPfPHC5O7OhHEHDAVqpS5Rmz27WYjm+IosWuWWxTXCOy33is= 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=4n3ez8SH; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0sndJWbB; 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=1791989049; 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=8SfjCTNulstCnb+ATnynlMKFxq4zbs90a8gq/kFcWDs=; b=4n3ez8SHxvi/UEfwEBXrBvn7Hrs183/azUIW/pkuaxftKMtyewgkXZijPROX5+EidDvTIF lqhrrRBDOC5VBR4k4qTc4afi7dtPoOHhXoRbpFeUMKekYtho6ogTmmvACxUc1D3gVi0L6/ 7rPxKbztN2zZiC44UAGIq0FVvVCELAZf3S1xdk2la6O/yweUK55WAfraspeMSGxN09PdiN sV9oeC7l1zn+qBpmjGTaL7B60jaub+SOGRn1JOPzq4yAPPzhjmRXtUj+lUyqvt9sH0HA1O 1MH3p9Qj4185VhRTbj6/XjqRmh6RvsufsiwzQq49ZeV5c6bqEd3neKgieBsHVQ== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1791989049; 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=8SfjCTNulstCnb+ATnynlMKFxq4zbs90a8gq/kFcWDs=; b=0sndJWbBdzeYsYCU54nrAtxEVWA4wkYkMVrBVWLE0aON+gUUdLwIYkAaYWOzf7r9RL+OU0 7ufiYqUzEzISvVDA== 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>