Re: [PATCH RFC net-next v2 2/2] af_packet: Add port specific handling for HSR

Sebastian Andrzej Siewior
2026-03-24T16:38:23Z

On 2026-03-19 12:27:57 [-0400], Willem de Bruijn wrote:
>
> Right, so this is simple without hardware offload. Does this HW
> offload exist, or is this aspirational. At least for infrequent PTP
> it does not sound important.

The snippet below was for the icssg driver as-is and it works with
updated firmware to ignore PTP packets while HW offloading is enabled.

The hardware offload in general forwards the packets without linux so if
a packet arrives on port A, the HW forwards it on port B and the linux
networking stack receives one copy and does not need to forward it
anymore.
This "cut-through" forwarding is beneficial because the packet is
forwarded instantly without getting delayed by the software stack.

For PTP packets I don't want any of this because the forwarding breaks
the timestamp information. So I need to tell the driver not do any of
the offloading while sending and the updated firmware does the same for
incoming packets.

There is no HW-offloading of PTP related packets.

With the skb_ext I had, the mechanism was mostly the same but it relied
only on the skb_ext data. Now it has to look at skb->mark.

Sebastian