🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3262

Re: [PATCH net v7 3/4] net: hsr: segment GSO before per-frame forwarding

#3262
From: Sebastian Andrzej Siewior
Date: Wed, 14 Oct 2026 14:00
38 lines
8593 bytes
On 2026-10-09 22:13:23 [+0200], Xin Xie wrote:
> HSR/PRP require a tag/RCT and sequence number for each wire frame.
> Adding them to a GSO aggregate before segmentation cannot provide
> valid per-frame metadata.
> 
> Use the core GSO segmenter before normal per-frame processing.
> Each segment follows the usual local-delivery and forwarding paths.
> Remove GSO_MASK types from the master's hw_features so core TX also
> segments local traffic before ndo_start_xmit().
> 
> Classify by inner protocol, not ingress port. Use the core's bounded
> VLAN decoder for 802.1Q, 802.1AD and nested or accelerated tags.
> Reject inner HSR/PRP aggregates, unreadable fragments and undecodable
> headers. Also reject trailing bytes beyond a known nonzero IP length:
> otherwise an old PRP sender's erroneous whole-aggregate RCT becomes
> transport payload. This check also rejects locally destined malformed
> inputs that the base kernel accepted. Zero IP lengths and GSO_PARTIAL
> are left to the segmenter because they provide no full IP extent for
> this check.
> 
> The preceding ordered-consumer patch is required for per-segment
> local numbering. Charge the worker budget by the actual segment count,
> or one on failure, and count each rejected input once through core
> per-CPU statistics on its entry device.
> 
> Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)")

I've been re-reading the old mails. The whole thing is needed for GSO
when it can not be disabled, right? And VETH interface has been named as
an example.
There was also a bridge device. With HSR you form a ring. With a bridge
you attach other (physical) devices within the ring. This does not sound
like real life use-case. Do I miss something?

> Signed-off-by: Xin Xie <xiexinet@gmail.com>

Sebastian
Technical Details
Message-ID: <20261014140047.Z8nhXzxa@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-346298-linux-kernel-netdev=dewy.ru
References: <20261009201324.17-1-xiexinet@gmail.com> <20261009201324.17-4-xiexinet@gmail.com>

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-346298-linux-kernel-netdev=dewy.ru
From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v7 3/4] net: hsr: segment GSO before per-frame
 forwarding
Date: Wed, 14 Oct 2026 16:00:47 +0200
Organization: Usenet Network
Message-ID: <20261014140047.Z8nhXzxa@linutronix.de>
References: <20261009201324.17-1-xiexinet@gmail.com>
 <20261009201324.17-4-xiexinet@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Info: usenet.network;
	logging-data="2309813"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:UeQbRpShXhpfvq8bO1gJkG97rww= sha256:rESA7zkNLyTyQnWUwEx7MdueKpAnFQq4CsMNH8w20Us=
	sha1:GuzwEyqdojOzIhJ/nppl9q743wk= sha256:Y9lkpS0U5Np9RLQ7PSsN7o08mQ39nVpSh8CREomYuvg=
Content-Disposition: inline
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 DB730110126; Wed, 14 Oct 2026 17:08:33 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 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, 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=2/Izit2A; dkim=neutral
	reason="invalid (unsupported algorithm ed25519-sha256)"
	header.d=linutronix.de header.b=DMEyN1mZ
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 rT32X3T0UAXA;
	Wed, 14 Oct 2026 17:08:27 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-346298-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 4087D11010B; Wed, 14 Oct 2026 17:08:12 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id 1B77B3DCBE; Wed, 14 Oct 2026 14:01:12 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3902953C3C8;
	Wed, 14 Oct 2026 14:00:59 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2/Izit2A";
	dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DMEyN1mZ"
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 0B60253B60A;
	Wed, 14 Oct 2026 14:00:51 +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=1791986458; cv=none; b=jMfdiLJdhiNrDLmNDyII12EBsazDm6nVJOLM6bUzd5qRhkr0QBOu1sPmoRIf4YyUddGtnFaE/v6vfzVybSpmbYMMMk+Pkr13K0bZ2zDiOjDaSZbyvbXaGF+iqZrksPWKOExu7CbGiioq+jrrdZTfc1X656DFGniRfVjg9appKB4=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791986458; c=relaxed/simple;
	bh=Ra0Y3BvTdz8AJOWltPsW7r1l5tkOwOlPYfZhSkipkvY=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=BixIVl8m9woxtQ4+xj2+8PGecMITcs6gnP4KstD5dnZ+ozp92XY/S6u8X31BulIG8dqgL4yWOlOGJ1ABsyv8ow55lcfTBM5nZIofMW+HqZBjsmziOjIBnO7SSRJEkHB0oIG09/fA1jTs1Svby6x9BVTUMi1xAHHM7/4Qj8GxgVY=
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=2/Izit2A; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DMEyN1mZ; 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=1791986449;
	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:
	 in-reply-to:in-reply-to:references:references;
	bh=2mq7qJVC1awJnl+BqDUszf8sZ/WuqUk5FNcUeA/mKLU=;
	b=2/Izit2AnR+VKpA+biznr+1OrJIRdHPG8iry1o4qffeEXzlrHF8WrjdtZ63amubKTbMfZr
	gpIKzRukYayjZinZG62htIg5fq/FpU8VXoZehvJxn3n1Q3XGXmG4q49d31zp1DQpwI8zjl
	5+Z8DDpJHTGIq5KP+sjHZS6Yp/rGsGSmP2e3+GKvTIY9o+8vIIU0PF/RnERA7SKuJPO709
	F7QITUtjN2lLwaz2eJDmfhAlu88/B94A8va3E+U7Bc1nWIon0huKxodrw9/8xu8SI1+DuN
	m/M4qlpUak2mcmUM9sY5fos8MKdiZuGNY/FEalu1EnbjIpkqIngR/T9YKRgZYA==
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020e; t=1791986449;
	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:
	 in-reply-to:in-reply-to:references:references;
	bh=2mq7qJVC1awJnl+BqDUszf8sZ/WuqUk5FNcUeA/mKLU=;
	b=DMEyN1mZ7SL6/yU3qauW2MnC6dqhYEpTD7Dtp5vlBR80vDVpLmKVJ22z3yn9ppbrdnfJKE
	GgNAFnPDyAwcmsDg==
X-Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, andrew+netdev@lunn.ch, shuah@kernel.org,
	kees@kernel.org, petr.wozniak@gmail.com, qingfang.deng@linux.dev,
	fmaurer@redhat.com, luka.gejak@linux.dev, xiaoliang.yang_1@nxp.com,
	skhawaja@google.com, liuhangbin@gmail.com, stable@vger.kernel.org,
	sdf.kernel@gmail.com
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>
X-In-Reply-To: <20261009201324.17-4-xiexinet@gmail.com>