RE: [PATCH net-next v1 1/2] ethtool: provide UAPI for PHY Signal Quality Index (SQI)
From: Christian Herber <hidden>
Date: 2020-05-19 11:22:03
Also in:
lkml
On Tue, May 19, 2020 at 12:58:55PM +0200, Oleksij Rempel wrote:
On Tue, May 19, 2020 at 10:55:20AM +0200, Michal Kubecek wrote:quoted
On Tue, May 19, 2020 at 09:51:59AM +0200, Oleksij Rempel wrote:
quoted
I'm also a bit worried about hardcoding the 0-7 value range. While I understand that it's defined by standard for 100base-T1, we my want to provide such information for other devices in the future. I tried to search if there is something like that for 1000base-T1 and found this: The screenshot on page 10 shows "SQI Value: 00015".Nice, screenshot based reverse engineering :)quoted
It's probably not standardized (yet?) but it seems to indicate we may expect other devices providing SQI information with different value range.what maximal range do we wont to export? u8, u16 or u32?quoted
Would it make sense to add ETHTOOL_A_LINKSTATE_SQI_MAX attribute telling userspace what the range is?sounds plausible.
SQI is not yet standardized for 1000BASE-T1 to my knowledge. But looking at the definition of SQI register for 100BASE-T1 gives some good clues. [0] reserved [3:1] current SQI value [4] reserved [7:5] worst case SQI value since last read So, the registers are implemented in a way that another LSB can be added. This would increase the resolution of SQI measurement, not the range. I.e. the resulting value range could be seen as [0, 0.5, 1, ..., 7.5] or [0, 1, ..., 15]. For the screenshot, I wouldn’t assume the reserved bit is implemented, it could just be that the SQI value was not shifted. Regards, Christian