From: Hangbin Liu <hangbin.liu@linux.dev>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: netdev@vger.kernel.org, "(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>,
Eric Dumazet <edumazet@google.com>,
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>
Subject: Re: [PATCH net-next v6 8/8] selftests: hsr: Add test for the inline PTP header on HSR
Date: Thu, 24 Sep 2026 10:08:32 +0800 [thread overview]
Message-ID: <arSGILQLfqYGugpy@fedora> (raw)
In-Reply-To: <20260923-hsr_ptp-v6-8-6ea07b3fb8a8@linutronix.de>
Hi Sebastian,
On Wed, Sep 23, 2026 at 02:14:09PM +0200, Sebastian Andrzej Siewior wrote:
> This test verifies the inline header which is used by HSR stack with the
> ether type ETH_P_1588.
> The HSR stack needs to recognize this header, strip it and send the
> requested packet only on the requested port.
>
> This test needs a HSR device and the two slave devices passed. It will
> will send a sample PTP packet with this inline header, requesting one of
> the ports combining with and without the HSR header. A total of four
> packets is sent.
> The test checks both ports devices for packets and complains if the
> packet was not observed on the expected port and/ or observed on the
> other port. The received content of the data is compared against the
> send data sample.
>
> Test suggested by Felix Maurer.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> tools/testing/selftests/net/hsr/.gitignore | 1 +
> tools/testing/selftests/net/hsr/Makefile | 5 +
> tools/testing/selftests/net/hsr/hsr_ptp.sh | 109 ++++++
> tools/testing/selftests/net/hsr/hsr_ptp_test.c | 495 +++++++++++++++++++++++++
> 4 files changed, 610 insertions(+)
>
> diff --git a/tools/testing/selftests/net/hsr/.gitignore b/tools/testing/selftests/net/hsr/.gitignore
> new file mode 100644
> index 0000000000000..849eecb84c974
> --- /dev/null
> +++ b/tools/testing/selftests/net/hsr/.gitignore
> @@ -0,0 +1 @@
> +hsr_ptp_test
> diff --git a/tools/testing/selftests/net/hsr/Makefile b/tools/testing/selftests/net/hsr/Makefile
> index 2150e487ac7d7..5d0134ead65d7 100644
> --- a/tools/testing/selftests/net/hsr/Makefile
> +++ b/tools/testing/selftests/net/hsr/Makefile
> @@ -2,14 +2,19 @@
>
> top_srcdir = ../../../../..
>
> +CFLAGS += -Wall -Wl,--no-as-needed -O2 -g
> +
> TEST_PROGS := \
> hsr_ping.sh \
> hsr_prp_redbox.sh \
> hsr_redbox.sh \
> link_faults.sh \
> prp_ping.sh \
> + hsr_ptp.sh \
> # end of TEST_PROGS
If there is a new version. Please sort the test with alphabet order.
>
> TEST_FILES += hsr_common.sh
>
> +TEST_GEN_FILES := hsr_ptp_test
> +
> include ../../lib.mk
> diff --git a/tools/testing/selftests/net/hsr/hsr_ptp.sh b/tools/testing/selftests/net/hsr/hsr_ptp.sh
> new file mode 100755
> index 0000000000000..034c635916f81
> --- /dev/null
> +++ b/tools/testing/selftests/net/hsr/hsr_ptp.sh
> @@ -0,0 +1,109 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +
> +ipv6=false
> +
> +source ./hsr_common.sh
> +
> +optstring="h4"
> +usage() {
> + echo "Usage: $0"
> +}
> +
> +while getopts "$optstring" option;do
> + case "$option" in
> + "h")
> + usage $0
usage "$0"
> + exit 0
> + ;;
> + "?")
> + usage $0
> + exit 1
> + ;;
Thanks
Hangbin
next prev parent reply other threads:[~2026-09-24 2:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 12:14 [PATCH net-next v6 0/8] hsr: Add additional info to send/ receive skbs Sebastian Andrzej Siewior
2026-09-23 12:14 ` [PATCH net-next v6 1/8] hsr: Add header_ops::parse_protocol Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 2/8] hsr: Use skb_clone() while adding the HSR header Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 3/8] hsr: Add a magic header for sending PTP packets Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 4/8] hsr: Drop received " Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 5/8] hsr: Use the port and header information in hsr_forward_skb() Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 6/8] hsr: Assign a socket for cloned skbs Sebastian Andrzej Siewior
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-23 12:14 ` [PATCH net-next v6 7/8] hsr: Move struct hsr_ethhdr to a global header Sebastian Andrzej Siewior
2026-09-23 12:14 ` [PATCH net-next v6 8/8] selftests: hsr: Add test for the inline PTP header on HSR Sebastian Andrzej Siewior
2026-09-24 2:08 ` Hangbin Liu [this message]
2026-09-27 13:24 ` netdev-bot+sashiko
2026-09-25 10:07 ` [PATCH net-next v6 0/8] hsr: Add additional info to send/ receive skbs Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=arSGILQLfqYGugpy@fedora \
--to=hangbin.liu@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=c-vankar@ti.com \
--cc=d-qiu@ti.com \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fmaurer@redhat.com \
--cc=horms@kernel.org \
--cc=j-rameshbabu@ti.com \
--cc=kuba@kernel.org \
--cc=neelima@ti.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=praneeth@ti.com \
--cc=pratheesh@ti.com \
--cc=richardcochran@gmail.com \
--cc=vigneshr@ti.com \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.