Article View: linux.kernel.netdev
Article #22565[PATCH net-next v12 7/8] hsr: Move struct hsr_ethhdr to a global header
From: Sebastian Andrzej Siewior
Date: Wed, 25 Nov 2026 14:31
Date: Wed, 25 Nov 2026 14:31
58 lines
11374 bytes
11374 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:
<20261125-hsr_ptp-v12-7-9ddd2a73cb90@linutronix.de>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371404-linux-kernel-netdev=dewy.ruReferences:
<20261125-hsr_ptp-v12-0-9ddd2a73cb90@linutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371404-linux-kernel-netdev=dewy.ru From: bigeasy@linutronix.de (Sebastian Andrzej Siewior) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v12 7/8] hsr: Move struct hsr_ethhdr to a global header Date: Wed, 25 Nov 2026 15:31:50 +0100 Organization: Usenet Network Message-ID: <20261125-hsr_ptp-v12-7-9ddd2a73cb90@linutronix.de> References: <20261125-hsr_ptp-v12-0-9ddd2a73cb90@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="229451"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:EKUn6ppoGxoK7coma65VmIJnofY= sha256:YKZWdpfcr2m2mezpT1gTeAhcvlJlVlyJSUHAqFlOp9c= sha1:azZJpgIyaKfn4y7ULg064oJmi2s= sha256:ZngkSvmbIg+r7DqlJsme+vwkNvcxM8XYt9+aJLy+nEA= 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 C3592125E6B; Wed, 25 Nov 2026 17:33:54 +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.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, 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=Cm/tvgz4; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=4xKfyIVf 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 QwI7CfeZgVbY; Wed, 25 Nov 2026 17:33:51 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-371404-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 808A3125E6E; Wed, 25 Nov 2026 17:33:38 +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 E6B063818F; Wed, 25 Nov 2026 14:32:58 +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=1795617172; b=mIpCnxH1Eli3HT3QQIvLyOfN0Jmqv8126jGP/711KtzTczLpPPknwMQXP/05cKkeP83c EUyxqoijlvcYZXIuRQZAHMpiwgnFhdG4cU6ePeGhaTRaOc4YR70XlY8fqHo/Da6guYCZl PojnKtrDX64Djb9UbJ0p7cFda1rWIyltqNEXosIENwLlcvQF5Odm90emixxyHMXv9oZMh QTvqYXCYU6ZITrFqYtzVWDHvc3ek4kKk8PDWpJKn+KzulJB0Sy9UMEF5xHDBKuKwr+gIG Gblj+kme+YNpJiyr70gQ30ZXFewy8ib/sKBbuW5sHx1F9zSwpksRcwPcVc4ANNZ0g5w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795617172; 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=ZG4kZc5AOo6iFYWJCDzlV8niGIaKyZYd9h12L5tR4P9gKxxcFSgR8w5CU45RUAk2DmoW +ZnafDEgKBOWE24FTU8UNITjINIVNSGi9bMmG0LftC6E+vyB9YrASnOeN5QIDZ1ZRuM9o QO6ktlxQw/i4cycykR/1AI8fKDQ+qvFjIJ9yVgfJxYGajZ2I2YxTZ5vcxrDl1ss6XGrbJ zmA5cv4b9dQV0mF6+ClaoB34CzQmOgX7re3r0u1M0r/UvvFudzUGcAARyBhEgf8sXMo0U ILuBYufvXfFWMNZLOQ/5v3D8DUxgCzbOg4JWmXfE6sjSuxpTp60RbXZg5dW1MxBn8bQ== 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="Cm/tvgz4"; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=4xKfyIVf; 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 09924606A6A0; Wed, 25 Nov 2026 14:32:52 +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=Cm/tvgz4; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=4xKfyIVf 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=1795617171; b=3UpcV7vnTDyTIVcz84+08jTLS2j3NbtODI9GM/kAm2IhCMmMbyyT9roHF4MMxBfVyWg9 sYiBnTy/zixqwtGYbjz7oEp0KRnhcPU6OpkXRMhI/A6oud71avdgAdi8IZUBr0+QrIhS5 +wX2a72pkZhTE8iO1NCfTk2CsVEVNpgndgq2nMKQnrsoD916Yl2KJ2aXnLg1Dqm28Tev6 0F5MNjryKnHhTecovy1XequFc9+2iA+yC/HF9YDp4uA88Gepre31erhQI1BPxCZowcKaf eawGsvXFJE9FqKbANLx/hBHV59Qps/TAwW/di+0SKT3XV+N0cGnK1aZ/0zLkq/DKbbg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795617171; 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=zUdCPebUu7t0DvRds+65YZAf2hRM45ODNYmLBVawkIF0eh806VLeuz6vqb5pjWQREjb+ 3UWqUhYAEJNcxmSHssyeraaq6QAaVguX/oIuSHm5GE48VH0DXphVORnSWtZT95fNZ0f7I UvLHk2xKWToTfLqPoXVDmYqzPPk7TzillqvTYPil88xfi+iojweHwqTSNwIb30Z2FMtdP EEvDH2QRVB8LuceuEC5dt9EKyWfaLFW2+UgZjcHyr583T4eQn0RCxbOouJgkcgFJf8V35 ljbQGzQ1Mo/cL2+E6Kw3kce9DosyxsJ1uIwHy7wgMz79fPZSCTv4uOnWR/lja+jJyvA== 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="Cm/tvgz4"; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=4xKfyIVf; 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 B135C606A68E for <netdev@vger.kernel.org>; Wed, 25 Nov 2026 14:32:50 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B135C606A68E 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=1795617169; 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=Cm/tvgz4eFNHpim7tA7hNMQhqPbQErJF7reQan4AZXJ83ZymBa2Rph8sSoxSZa8waIApHe IzqO9HrT4/lcgyEq3x1oAUFc5Wq0KX+WOlkstSblRjrtbiFLH0YG6PFwz6CvnFi1mqSyq+ vfhOSBImBYK56lWLci0cDrNO8KhzUCnu0fVfPLjjCiIK7swsaElLRwXpiM9oguZu0qPjua cy4Jl0uRd591H2evTBwanEKa4E09Sz+5xdUsvw1rJfRWtWuFqbqSW/uO/FkvSySImb6m+r S5/hCNdSzAch1GtrVWgQpj6p/mKSq7Q5bzRmRtLZGnbCrjk7FvbuJTjnSjNI9A== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1795617169; 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=4xKfyIVfdAsAIXRS88p6NcGqifIqM9NTd0e7kILd2SjFnH1cpZWJ59Ah93Bzg63o6RdDWy CK2vgL28zzs2fbDQ== 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: <20261125-hsr_ptp-v12-0-9ddd2a73cb90@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