Subject: Re: [PATCH ethtool-next v2 2/2] cmis: report LOL / LOS / Tx Fault

From: Ido Schimmel <[email-masked]>
Date: Tue, 13 Jun 2023 10:32:05 +0300

On Mon, Jun 12, 2023 at 10:05:07PM -0700, Jakub Kicinski wrote:
> Report whether Loss of Lock, of Signal and Tx Faults were detected.
> Print "None" in case no lane has the problem, and per-lane "Yes" /
> "No" if at least one of the lanes reports true.
> 
> Signed-off-by: Jakub Kicinski <[email-masked]>

Reviewed-by: Ido Schimmel <[email-masked]>
Tested-by: Ido Schimmel <[email-masked]>

> ---
> Turns out I don't have access to any host with CMIS optics at this
> point so untested. I can only confirm it correctly shows nothing
> with a DAC...

I'm not sure why, but the module I have reports two banks and therefore
16 lanes. "Tx fault" and "Tx adaptive eq fault" are not supported.

When both are up:

# ethtool -m swp11 | grep "Rx loss of signal" -A 4
        Rx loss of signal                         : None
        Tx loss of signal                         : None
        Rx loss of lock                           : None
        Tx loss of lock                           : None
        Module State                              : 0x03 (ModuleReady)

When I bring the other side down:

# ip link set dev swp12 down
# ethtool -m swp11 | grep "Rx loss of signal" -A 4
        Rx loss of signal                         : [ Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes ]
        Tx loss of signal                         : None
        Rx loss of lock                           : [ Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes ]
        Tx loss of lock                           : None
        Module State                              : 0x03 (ModuleReady)

When I bring the interface itself down:

# ip link set dev swp11 down
# ethtool -m swp11 | grep "Rx loss of signal" -A 4
        Rx loss of signal                         : [ Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes ]
        Tx loss of signal                         : [ Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, No, No, No, No, No, No, No, No ]
        Rx loss of lock                           : [ Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, No, No, No, No, No, No, No, No ]
        Tx loss of lock                           : [ Yes, Yes, Yes, Yes, Yes, Yes, Yes, Yes, No, No, No, No, No, No, No, No ]
        Module State                              : 0x03 (ModuleReady)

And I don't see these fields on PC:

# ethtool -m swp1 | grep "Rx loss of signal" -A 4