Subject: Re: [RFC PATCH net-next] selftests: forwarding: add a test for MAC Merge layer

From: Kurt Kanzenbach <[email-masked]>
Date: Mon, 13 Feb 2023 12:42:04 +0100

On Sat Feb 11 2023, Vladimir Oltean wrote:
> The MAC Merge layer (IEEE 802.3-2018 clause 99) does all the heavy
> lifting for Frame Preemption (IEEE 802.1Q-2018 clause 6.7.2), a TSN
> feature for minimizing latency.
>
> Preemptible traffic is different on the wire from normal traffic in
> incompatible ways. If we send a preemptible packet and the link partner
> doesn't support preemption, it will drop it as an error frame and we
> will never know. The MAC Merge layer has a control plane of its own,
> which can be manipulated (using ethtool) in order to negotiate this
> capability with the link partner (through LLDP).
>
> Actually the TLV format for LLDP solves this problem only partly,
> because both partners only advertise:
> - if they support preemption (RX and TX)
> - if they have enabled preemption (TX)
> so we cannot tell the link partner what to do - we cannot force it to
> enable reception of our preemptible packets.
>
> That is fully solved by the verification feature, where the local device
> generates some small probe frames which look like preemptible frames
> with no useful content, and the link partner is obliged to respond to
> them if it supports the standard. If the verification times out, we know
> that preemption isn't active in our TX direction on the link.
>
> Having clarified the definition, this selftest exercises the manual
> (ethtool) configuration path of 2 link partners (with and without
> verification), and the LLDP code path, using the openlldp project.
>
> This is not really a "forwarding" selftest, but I put it near the other
> "ethtool" selftests.
>
> Signed-off-by: Vladimir Oltean <[email-masked]>
> ---

Looks good to me. Is there any way to test this? I see mm support
implemented for enetc and Felix. However, I only have access to Intel
i225 NIC(s) which support frame preemption.

Thanks,
Kurt