linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Herber <christian.herber@nxp.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Michal Kubecek <mkubecek@suse.cz>,
	David Jander <david@protonic.nl>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	"mkl@pengutronix.de" <mkl@pengutronix.de>,
	Marek Vasut <marex@denx.de>
Subject: Re: signal quality and cable diagnostic
Date: Thu, 14 May 2020 08:42:34 +0000	[thread overview]
Message-ID: <AM0PR04MB7041E1F0913A90F40DFB31A386BC0@AM0PR04MB7041.eurprd04.prod.outlook.com> (raw)

On Tue, May 14, 2020 at 08:28:00AM +0000, Oleksij Rempel wrote:
> On Thu, May 14, 2020 at 07:13:30AM +0000, Christian Herber wrote:
> > On Tue, May 12, 2020 at 10:22:01AM +0200, Oleksij Rempel wrote:
> >
> > > So I think we should pass raw SQI value to user space, at least in the
> > > first implementation.
> >
> > > What do you think about this?
> >
> > Hi Oleksij,
> >
> > I had a check about the background of this SQI thing. The table you reference with concrete SNR values is informative only and not a requirement. The requirements are rather loose.
> >
> > This is from OA:
> > - Only for SQI=0 a link loss shall occur.
> > - The indicated signal quality shall monotonic increasing /decreasing with noise level.
> > - It shall be indicated in the datasheet at which level a BER<10^-10 (better than 10^-10) is achieved (e.g. "from SQI=3 to SQI=7 the link has a BER<10^-10 (better than 10^-10)")
> >
> > I.e. SQI does not need to have a direct correlation with SNR. The fundamental underlying metric is the BER.
> > You can report the raw SQI level and users would have to look up what it means in the respective data sheet. There is no guaranteed relation between SQI levels of different devices, i.e. SQI 5 can have lower BER than SQI 6 on another device.
> > Alternatively, you could report BER < x for the different SQI levels. However, this requires the information to be available. While I could provide these for NXP, it might not be easily available for other vendors.
> > If reporting raw SQI, at least the SQI level for BER<10^-10 should be presented to give any meaning to the value.

> So the question is, which values to provide via KAPI to user space?
>
> - SQI
>  The PHY can probably measure the SNR quite fast and has some internal
>   function or lookup table to deduct the SQI from the measured SNR.
>
>   If I understand you correctly, we can only compare SQI values of the
>   same PHY, as different PHYs give different SQIs for the same link
>   characteristics (=SNR).
> - SNR range
>   We read the SQI from the PHY look up the SNR range for that value from
>  the data sheet and provide that value to use space. This gives a
>   better description of the quality of the link.
> - "guestimated" BER
>   The manufacturer of the PHY has probably done some extensive testing
>   that a measured SNR can be correlated to some BER. This value may be
>   provided in the data sheet, too.
>
> The SNR seems to be most universal value, when it comes to comparing
> different situations (different links and different PHYs). The
> resolution of BER is not that detailed, for the NXP PHY is says only
> "BER below 1e-10" or not.

The point I was trying to make is that SQI is intentionally called SQI and NOT SNR, because it is not a measure for SNR. The standard only suggest a mapping of SNR to SQI, but vendors do not need to comply to that or report that. The only mandatory requirement is linking to BER. BER is also what would be required by a user, as this is the metric that determines what happens to your traffic, not the SNR.

So when it comes to KAPI parameters, I see the following options
- SQI only
- SQI + plus indication of SQI level at which BER<10^-10 (this is the only required and standardized information)
- SQI + BER range (best for users, but requires input from the silicon vendors)

SNR in my opinion is neither an option nor helpful.

Regards,

Christian


             reply	other threads:[~2020-05-14  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  8:42 Christian Herber [this message]
2020-05-24 21:27 ` signal quality and cable diagnostic Pavel Machek
2020-05-24 22:42   ` Russell King - ARM Linux admin
  -- strict thread matches above, loose matches on Subject: below --
2020-05-11 14:13 Oleksij Rempel
2020-05-11 14:33 ` Andrew Lunn
2020-05-12  8:22   ` Oleksij Rempel
2020-05-12  8:54     ` Robert Schwebel
2020-05-11 14:59 ` Michal Kubecek
2020-05-12  6:48   ` Oleksij Rempel
2020-05-12 13:04     ` Andrew Lunn
2020-05-24 21:28       ` Pavel Machek

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=AM0PR04MB7041E1F0913A90F40DFB31A386BC0@AM0PR04MB7041.eurprd04.prod.outlook.com \
    --to=christian.herber@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marex@denx.de \
    --cc=mkl@pengutronix.de \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).