Subject: Re: [PATCH RFC net-next v3] hsr: Allow to send a specific port and with HSR header

From: Willem de Bruijn <[email-masked]>
Date: Wed, 06 May 2026 09:20:41 -0400

Sebastian Andrzej Siewior wrote:
> On 2026-05-05 12:14:58 [-0400], Willem de Bruijn wrote:
> > > But I can't expect that the header is always there. A random ping/ arp
> > > packet goes via the same flow. At the same time I don't want to make it
> > > mandatory for all AF_PACKET users by checking the skb's socket.
> > 
> > I thought skb->protocol is the unambiguous signal whether this custom
> > header is present?
> 
> No, I parse the header. As far as I can tell this set based on the
> header bits from data passed to af_packet. Even if I could change this
> to something else, these 16bit should better not collide with anything
> else so I think used the eth-type and expecting nobody sending a PTP
> packet is good.

Is that more fragile than a specific protocol? And introduces that
dependency on mirroring the Ethernet format. But your call.

Ethernet does have requirements on MAC address format, so a layout
that corresponds to an invalid address could be a signal.