From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Felix Maurer <fmaurer@redhat.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCH RFC net-next 0/2] hsr: Add additional info to send/ receive skbs
Date: Tue, 24 Feb 2026 12:24:47 +0100 [thread overview]
Message-ID: <20260224112447.ppskFxhW@linutronix.de> (raw)
In-Reply-To: <aZYSvY8nUKhpLZhv@thinkpad>
On 2026-02-18 20:28:36 [+0100], Felix Maurer wrote:
> > Yes. Point 3b needs to be extended by
> > " + or does not contain a HSR/PRP header and requires one by the
> > system."
>
> Ah, I missed that! Thanks for pointing it out, that seems to be the
> tricky part to me. Just be sure, you refer to the Pdelay_{Req,Resp}
> messages? Or are there any other messages?
These and the SYNC+FOLLOW_UP if the node is master.
> > > If I understand your patch 2 correctly, you will be maintaining two
> > > sockets in userspace (one bound to each of the ports A and B through the
> > > HSR interface using PACKET_HSR_BIND_PORT). Binding through the HSR
> > > interface to port A/B has the very special meaning of making a socket
> > > only receive a very small subset of the packets, that is PTP traffic at
> > > the moment. This seems like a somewhat hidden property of the bound
> > > sockets and should at least be very explicit.
> >
> > Technically four sockets (two for A and two for B) but in general yes.
> > What you mean by hidden property/ very explicit? Document
> > PACKET_HSR_BIND_PORT in packet(7) or something else?
>
> Yes, at least that. Maybe also make it more clear in the name that this
> kind of binding means that you will not receive all packets from this
> port but just some (atm, PTP).
Right. That happens implicit because they are not tagged. Extending the
present documentation would be something I consider once we do align on
something.
> > However if we
> > ignore this detail and can receive on interface A and send on interface
> > B over XDP and get timestamps right then we have the same as the packet
> > interface on the two eth devices. What is missing is sending with HSR/
> > PRP header.
>
> You wrote in another reply, and I agree with it, that sending with the
> system HSR header and sequence number must go through the hsr device.
> Frames that already have a header, such as Sync an FollowUp that are
> forwarded, could just directly go through the slave interfaces.
>
> I think the cases should be handled independently: to send a frame with
> a full header (i.e., the forward case), we already have the AF_PACKET
> socket on the slave interfaces as an option. For sending a frame just in
> one direction in the HSR ring through the hsr interface, we have to come
> up with something, but IMHO just for that.
>
> I like the idea of putting the port hint in the ancillary data of the
> message, but I'm not sure where to put in the skb then / how to pass it
> to the hsr interface. Willem's suggestions are worth exploring I think.
Good. I will try to come up with something. Willem had something, I will
look into this.
> Thanks,
> Felix
Sebastian
prev parent reply other threads:[~2026-02-24 11:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 11:24 [PATCH RFC net-next 0/2] hsr: Add additional info to send/ receive skbs Sebastian Andrzej Siewior
2026-02-04 11:24 ` [PATCH RFC net-next 1/2] hsr: Allow to send a specific port and with HSR header Sebastian Andrzej Siewior
2026-02-04 17:30 ` Willem de Bruijn
2026-02-17 15:36 ` Sebastian Andrzej Siewior
2026-03-04 14:58 ` Sebastian Andrzej Siewior
2026-03-04 15:56 ` Willem de Bruijn
2026-03-04 16:12 ` Sebastian Andrzej Siewior
2026-03-04 23:48 ` Willem de Bruijn
2026-03-05 8:07 ` Sebastian Andrzej Siewior
2026-03-05 14:41 ` Jakub Kicinski
2026-03-05 15:05 ` Sebastian Andrzej Siewior
2026-02-04 11:24 ` [PATCH RFC net-next 2/2] af_packet: Add port specific handling for HSR Sebastian Andrzej Siewior
2026-02-04 17:36 ` Willem de Bruijn
2026-02-17 15:51 ` Sebastian Andrzej Siewior
2026-02-16 16:10 ` [PATCH RFC net-next 0/2] hsr: Add additional info to send/ receive skbs Felix Maurer
2026-02-16 16:19 ` Sebastian Andrzej Siewior
2026-02-16 16:25 ` Andrew Lunn
2026-02-17 16:14 ` Sebastian Andrzej Siewior
2026-02-17 16:10 ` Sebastian Andrzej Siewior
2026-02-18 19:28 ` Felix Maurer
2026-02-18 21:53 ` Willem de Bruijn
2026-02-24 11:48 ` Sebastian Andrzej Siewior
2026-02-24 11:24 ` Sebastian Andrzej Siewior [this message]
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=20260224112447.ppskFxhW@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fmaurer@redhat.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox