🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21908

Re: [PATCH net-next v11 8/8] selftests: hsr: Add test for the inline PTP header on HSR

#21908
From: Sebastian Andrzej Siewior
Date: Tue, 24 Nov 2026 15:32
54 lines
11759 bytes
On 2026-11-24 11:25:48 [+0000], netdev-bot+sashiko@kernel.org wrote:
> Critical: 0 · High: 0 · Medium: 1 · Low: 2
> 
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
…
> - [Medium] Neither hsr_ptp.sh nor hsr_ptp_test checks whether the running
>   kernel supports the HSR inline PTP header, which was added earlier in…
> - [Low] The file-header comment of
>   tools/testing/selftests/net/hsr/hsr_ptp_test.c (lines 2-11) says the…
> - [Low] The commit message credits the idea only in prose ("Test
>   suggested by Felix Maurer.") and has no 'Suggested-by: Felix Maurer…
> 
…
> [Severity: Medium]
> What happens when this runs on a kernel without the inline PTP header
> support added earlier in this series? Does it fail where it should skip?
> 
> On such a kernel, hsr_dev_xmit() has no hsr_ptp_parse_header() call. The
> inline header is not stripped, and the frame goes out as an ordinary standard
> frame. Its destination address comes from the first 6 bytes of struct
> hsr_inline_header (req_tx_port, has_hsr_header and __pad0).
> 
> raw_recv() skips that frame because the destination is not p2p_dst_mac. It
> then times out after 100ms and returns 0, and recv_verify() reports:
> 
> 	if (port == HSR_INLINE_HDR_PORT_A && ret == 0) {
> 		printf("Error: Missing packet on portA\n");
> 		error = 1;
> 	}
> 
> main() returns EXIT_FAILURE, and stop_if_error exits with 1 instead of
> $ksft_skip.
> 
> check_prerequisites in hsr_common.sh only checks for the ip tool.
> hsr_prp_redbox.sh in this directory already has a feature gate that skips
> when the kernel lacks support.
> 
> Could this test probe for the feature and exit with $ksft_skip, so that
> mainline selftests run cleanly on older stable kernels? The commit message
> also doesn't say that this kernel feature is required.

Not sure how to probe for this since this is not advertised. The feature
is added before this test is added and does not depend on anything.
I don't see a problem unless this test is used on an earlier kernel
which does not have this feature (but the test for it).

…
Sebastian
Technical Details
Message-ID: <20261124153224.3v57TqVg@linutronix.de>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370517-linux-kernel-netdev=dewy.ru
References: <20261120-hsr_ptp-v11-8-264c88f4f1d0@linutronix.de> <179551954823.3135.2068695558133971717@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370517-linux-kernel-netdev=dewy.ru
From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v11 8/8] selftests: hsr: Add test for the inline PTP header on HSR
Date: Tue, 24 Nov 2026 16:32:24 +0100
Organization: Usenet Network
Message-ID: <20261124153224.3v57TqVg@linutronix.de>
References: <20261120-hsr_ptp-v11-8-264c88f4f1d0@linutronix.de> <179551954823.3135.2068695558133971717@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network; logging-data="4169972"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:FjZjs3Zl79IvgdmIwXVlVAyZ7uk= sha256:zEsZ75EowRtUVg1OOip6lBrJ8FBBXAdaol4ARKcPWwA= sha1:4iFKPdtzWb9hTPez5kG46bYxfLY= sha256:yTPhVW1XT/KM2dDWXPeUk/XIUiLaLyruhQcXGSBEDAQ=
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 6D6CA125E1E; Tue, 24 Nov 2026 18:32:50 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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.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=3jJeIWvK; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=RL3zjBa+
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 tDS6sGtcLGyA; Tue, 24 Nov 2026 18:32:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370517-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 CBE2F125E1D; Tue, 24 Nov 2026 18:32:32 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id A29E43665F; Tue, 24 Nov 2026 15:32:30 +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=1795534350; b=TlQF1zKVy58jQOqNPIdnYTNWgN9jOZADH3H9Zjqxt+O4QoVhlbuCjxfuzzU+hGgh0CK7 4Fi1f98IwhQz6r3yBMMI+wzCdl0CIOLVey3WOBlmfxk8kOkIF4LnSDZVXn/h+AA0j8YKl POwmoQT5lZoRVL0mKcVhfDqIUwCP/tXiZgTYby7qWZJLlkUmaE/7Aiq8Vl4vNXG8tP/TZ d2JYhrijB4ZGtwI43JWXp4WbqEv+lJPDWQCg9FEVqs7rS7nwxq1GWJ9W11yMGLSCz28Mt Th2AZRJEb7SI4lmjw2DqORB1P7HPsF7QKHJAW4Xx1pjcEOI94QRzx0RIV34w1OyfsNw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795534350; h=X-Original-To:Received:DMARC-Filter:Date:DKIM-Signature: DKIM-Signature:From:To:Cc:Subject:Message-ID:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; bh=rL3F54NaT6s6XccOCOExufYAfUj/fb6sPzRZqx0G09M=; b=Un254lXcWjctsntYcT8KvFcc0XnTg6IJlIPI6sdhwQqabf1aRAkTW5MEfNhHj8QWCFmZ h04oDZobzJ6VIVB8xRkwejm8t16Zsx8mwjakWg/hvXrBVyjMC2CHhe22Rw3oW9YL5hEen LqLkuULX7sA9qkrBw+fG9hUJ4rpvA7vgwneH2UaA9ZrpVUesadiA8J9obIl5iQjcG2c+I mSpc+Czk0TRlVmgbRSWPgJDdG0W5AufWcjKCDYqIKGig0oY7PE4G5EyG9cPI63gW9LLER cZxiqQMVmaV1IFEqKqqqjYQFbB7bjRStoG7YiiwS12K2z9L5APtqw+EXk7M1LswFrWA==
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=3jJeIWvK; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=RL3zjBa+; 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 7B3CD606A32C; Tue, 24 Nov 2026 15:32:30 +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=3jJeIWvK; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=RL3zjBa+
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=1795534349; b=EnmEIjQzPDoqKiNOnCUH9Lca+Hny4tMELxaYOpyQvc6urHKLFAj3H+kWBmLUlqnUvxtf N/NHd0M291em2RT29GNet1epzoB9srqfWH3xBirr7IfV8b8gbbOLDJvXPnB7TvZ+fyOhT 2tbZU9atM4oihmOWqqzQey1v0vyxEOHCh/09zF9hLYlqEQM3WNC2wEgBO15zVgdXhPyE0 OBXlKzltWBqMR77vBSR4qj9LW2R81zwu9hWJvgGbtrQ7LVMOIr8daXOp/bX7xZymu/eJQ +U9lptyOgg5qFC6VLUpaSQUc+p8+Te3/a/C8R3igJhxu4Iz9VsnHndn7/S5T7MdB1kQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795534349; h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=rL3F54NaT6s6XccOCOExufYAfUj/fb6sPzRZqx0G09M=; b=RN78nnOieSUhVecNWMSBRAgpV/YlQS5Zo5pQMEfJmk0oGQExfI3/XgIjjUzvoD3gJDrZ TpyPRBLDRWlRNEewVtNgH6FGlOwYnxnV8GedIQqRC7HfF5/NCS8GGU7CqlcumszXBuUmP ZRuSoN30Za7x2c86OAzfipHDIglw3csxSZHGyoRoy1V+cqgUNQpCOGz3Qt+m7vVYvySSf Pb2H02Me56h6GmNRUdOE5MlbzlxVlsaVPjUvxzNk0h+1ILZ7HLUxumjsCiTQlBdjo3433 dkdlHERHOApsolcedkIAArREzI1al08fdHzz7x4Rx7qw8mip9tXliTwEBVwAGu0TRbg==
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=3jJeIWvK; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=RL3zjBa+; 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 2ECCD606A31E for <netdev@vger.kernel.org>; Tue, 24 Nov 2026 15:32:29 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2ECCD606A31E
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=1795534346; 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=rL3F54NaT6s6XccOCOExufYAfUj/fb6sPzRZqx0G09M=; b=3jJeIWvKVeQ9U6cB7xNc1L5xqq9Q6ynniIIuS+RVpxr8Y+bI/uhPzK5kEqxCDW6eWbzlU5 X0q4faUPeP82Q5CDCfC6oHwJ/8iL3ll1ai60aFrOit/f4ykTf77HUESRvjAup7eeZsbvIZ bBKM4rlrZKpc1Im65cHhsB7FAHbLbZlilAUKIz0/l9DniHqcq/yA99CCe6vjBMzgjJTX+k sY6O2XPY6P65KqIhGbjC2pFwHQGiBpT5A+fOdq7Zawnr9cvBSO6L1JEHH54luCO0vxQiJy v5JphmLN8C/z6egHNjrR+WHxqBv9YkOacfZ8s4KVargsobIHxRvcUPu50Tfanw==
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1795534346; 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=rL3F54NaT6s6XccOCOExufYAfUj/fb6sPzRZqx0G09M=; b=RL3zjBa+CEl6qVi90cU9Im1Tcf+jFmWNqvvkhUaTavl7QgayNqe6bx36FPbO3RxCy30ZIY egRltiI08Ql+7ZAA==
X-Cc: netdev@vger.kernel.org, j-rameshbabu@ti.com, andrew+netdev@lunn.ch, danishanwar@ti.com, d-qiu@ti.com, davem@davemloft.net, fmaurer@redhat.com, kuba@kernel.org, neelima@ti.com, pabeni@redhat.com, praneeth@ti.com, pratheesh@ti.com, richardcochran@gmail.com, horms@kernel.org, vigneshr@ti.com, willemdebruijn.kernel@gmail.com, daniel.machon@microchip.com, edumazet@kernel.org
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
X-In-Reply-To: <179551954823.3135.2068695558133971717@kernel.org>