🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26528

[PATCH net-next v14 7/8] hsr: Move struct hsr_ethhdr to a global header

#26528
From: Sebastian Andrzej Siewior
Date: Thu, 03 Dec 2026 17:44
58 lines
11415 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: <20261203-hsr_ptp-v14-7-1511ffd4c362@linutronix.de>
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376797-linux-kernel-netdev=dewy.ru
References: <20261203-hsr_ptp-v14-0-1511ffd4c362@linutronix.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376797-linux-kernel-netdev=dewy.ru
From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v14 7/8] hsr: Move struct hsr_ethhdr to a global header
Date: Thu,  3 Dec 2026 18:44:48 +0100
Organization: Usenet Network
Message-ID: <20261203-hsr_ptp-v14-7-1511ffd4c362@linutronix.de>
References: <20261203-hsr_ptp-v14-0-1511ffd4c362@linutronix.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2557108"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IEZC6pO6bqCwR3hCB9mfEsaxF6U= sha256:P72jCB++J8yzb1fCBy9wpu1N6JmxFcdGv0oKZQ+OXYU=
	sha1:x2S/xigfnmft16MJ6X/vko1JYWU= sha256:kVwDmERA95wCgaK0ShCBwReSaOsqMMzqWUfRACA8Y/A=
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 1CF7F1179F6; Thu,  3 Dec 2026 20:45:24 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.399
X-Spam-Status: No, score=-3.399 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.001, 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=VYdrw1Wt; dkim=neutral
	reason="invalid (unsupported algorithm ed25519-sha256)"
	header.d=linutronix.de header.b=xvS002du
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 Ri28bAhEc3O5;
	Thu,  3 Dec 2026 20:45:22 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-376797-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 201BF1179F0; Thu,  3 Dec 2026 20:45:08 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 3811B601C0A; Thu,  3 Dec 2026 17:45:08 +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=1796319901;
	b=DCgqi1cLxm1XxTTdFDzs35Uw9/z0mH6rJro5O8Mol4dD/m6u/uh1Fag8DCSxOzSK0E4R
	 UTFj9HHE5uw5NaXp4lXOUBiIXLHO13QIQVHk55ezfBTcGFM2ca8se5aZlHYL3WBwQoQhQ
	 VSJFF+oawp8EgIQxrkjKfMEgtSqe1Neds+ef8AM9ABkMHboz0QZDZZ1/XGUo3T2ZFcS4q
	 rV+p5MW8DFnfh8ihCo9sEl2UO/X9g1SJb9WNHGLm7Vlq03HuW0z+Kj8hqqQ1tk9YPL6Oh
	 xvHzE61BVT3F3BNaakqMVKunQRURRYJzrOQYnVJ4oUO7hEXOCT87B1W9HDqLmpMGFEg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796319901;
	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=VaqRr2CZVMIqvPhUpSmzqDSB6AkVRMs6U6Qtb22JdDhmafM/jZytyDQk/dh+epFkFElL
	 52R8+Dww8DXLpq27LoqbTC8RYCwBmxr0FlLyoeC+dxkOUmkjD38kqMpAHctwEDcOyoymX
	 d4M5bDBCVBXrnp/uQeYbKjFfMDPBWw3m+5W088vstiqIF/SOPUaAotBPKlW9eXUrlB2fe
	 zOMNXcXgg5Ad3tlS9Kk45pH7VswzxOQl9azUXoZxCd/8gnl03n5auDy6FDAoqz0REfMwE
	 CqtYFyuwAERfxRo8wPTD8i3m8cekabJqYk/t+Ak7m5TIH5LD1wDjrcNE2UjT66Pj5mg==
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=VYdrw1Wt;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=xvS002du;
	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 B8385606A68C;
	Thu,  3 Dec 2026 17:45:01 +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=VYdrw1Wt;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=xvS002du
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=1796319900;
	b=Iu2HXW1amOA/SEquZx6GM+6Ij97awd8VtGy+OeQR8IHdFpPYyf85XbPBq+b6CH73IzyE
	 HHaQbDdfaHmmBThP3L3EhJxOe7+uHt8zL4N38YnJXkaA/AXIVcBsLRr2QsFxb+UbtyFbW
	 BxEC+nzQQlYSvh63SzZOzfGBizzaAiJlfUaPSaKCr3vCEsbxT61XsSxshLgS3BDfv5r5R
	 w8vYyTyt7iqsl/+vEFYZ/j9qFtl3M0qcZiUOEkPRjcZTbN4hDMnTKqwf/byHVvkTW4MgT
	 OxFYMgJVnnuF5QSK5Bwgb9dBwdmZOed0C5BKFApyFdTYCo2168Me8MGCuidKRANIEJQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796319900;
	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=VvYfJ7E0PKFyxNIhNJ0ygvtew916B5+VSRENrK5HXPRK/HXe0TKIYExqDby33T7oFUna
	 LltRn615K6MOIcevMwtU8zO0hhV9f2HyjW9wjPg7qBJwajAsslCLr0WUSWjP0j3G7yDpU
	 PCS/ZHVN9yw4iBW701UOPopDJcZyUcFCJMlx8Rr4ZKad+kkQ2yjXIcfe+rV5Jb5bJGgA1
	 NH3fEWUbr3oqiJ908EDcUs+/PGYdU16p53xzqbUCOOi5gMb1FQP/Rd9AO1c7FZjnn/DxZ
	 QD3cU+ruqWNXdKswsHdEsI24Ba3FC441RNoJ0rqwDCVPh40YYeDaXhzHZHCkiTSfdiA==
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=VYdrw1Wt;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=xvS002du;
	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 6AA7D606A6A3
	for <netdev@vger.kernel.org>; Thu,  3 Dec 2026 17:45:00 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6AA7D606A6A3
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=1796319897;
	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=VYdrw1WtmALys9+vnMMJTcRBNR2wuzWZF6RmmqFHlo8DljrCngnYJ07j3TD02N7psoRQ7z
	q9mBdYYPsaFbnDqxUCTxHo6B1HmQ9R7mbw97GqHTX8TWdsJqtaP37nHoSnpCiDo8vPqCit
	nDB02OChVirBZeBqCS1LU5HbFedfCkaNym7kce+oMwJ7dmcChxBKBKttQo56WcLJXhsyfV
	/DVwKDOQAAXE1BVnhs7BPMKcA5x86xUqIBBQF8dxLcZB4sMc+8GTNsBiEuqpLXdM0i0kXV
	Ny4LtzR0Z663UFSz3mWcD8DUO/WmTzrM5w65jA/je8EcULMYmk7sXyDMpFh5YA==
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020e; t=1796319897;
	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=xvS002dum7hdJTH9T3alNRqFh8rcBAmVUaRz/4u/ndlJKGG04khESRHrkMF00O8CkREh14
	h0JdnTfp8Jv1mSAQ==
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: <20261203-hsr_ptp-v14-0-1511ffd4c362@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