From: Ido Schimmel <idosch@idosch.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Michal Kubecek <mkubecek@suse.cz>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
michel@fb.com, dcavalca@fb.com
Subject: Re: ethtool 5.16 release / ethtool -m bug fix
Date: Wed, 19 Jan 2022 11:45:41 +0200 [thread overview]
Message-ID: <YefdxW/V/rjiiw2x@shredder> (raw)
In-Reply-To: <20220118145159.631fd6ed@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
On Tue, Jan 18, 2022 at 02:51:59PM -0800, Jakub Kicinski wrote:
> Hi Michal!
>
> Sorry to hasten but I'm wondering if there is a plan to cut the 5.16
> ethtool release? Looks like there is a problem in SFP EEPROM parsing
> code, at least with QSFP28s, user space always requests page 3 now.
> This ends in an -EINVAL (at least for drivers not supporting the paged
> mode).
Jakub, are you sure you are dealing with QSFP and not SFP? I'm asking
because I assume the driver in question is mlx5 that has this code in
its implementation of get_module_eeprom_by_page():
```
switch (module_id) {
case MLX5_MODULE_ID_SFP:
if (params->page > 0)
return -EINVAL;
break;
```
And indeed, ethtool(8) commit fc47fdb7c364 ("ethtool: Refactor
human-readable module EEPROM output for new API") always asks for Upper
Page 03h, regardless of the module type.
It is not optimal for ethtool(8) to ask for unsupported pages and I made
sure it's not doing it anymore, but I believe it's wrong for the kernel
to return an error. All the specifications that I'm aware of mandate
that when an unsupported page is requested, the Page Select byte will
revert to 0. That is why Upper Page 00h is always read-only.
For reference, see section 10.3 in SFF-8472, section 6.2.11 in SFF-8636
and section 8.2.13 in CMIS.
Also, the entire point of the netlink interface is that the kernel can
remain ignorant of the EEPROM layout and keep all the logic in user
space.
>
> By the looks of it - Ido fixed this in 6e2b32a0d0ea ("sff-8636: Request
> specific pages for parsing in netlink path") but it may be too much code
> to backport so I'm thinking it's easiest for distros to move to v5.16.
I did target fixes at 'ethtool' and features at 'ethtool-next', but I
wasn't aware of this bug.
next prev parent reply other threads:[~2022-01-19 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 22:51 ethtool 5.16 release / ethtool -m bug fix Jakub Kicinski
2022-01-18 23:14 ` Michal Kubecek
2022-01-18 23:54 ` Jakub Kicinski
2022-01-19 9:45 ` Ido Schimmel [this message]
2022-01-19 15:39 ` Jakub Kicinski
2022-01-20 7:54 ` Ido Schimmel
2022-01-20 17:30 ` Jakub Kicinski
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=YefdxW/V/rjiiw2x@shredder \
--to=idosch@idosch.org \
--cc=dcavalca@fb.com \
--cc=kuba@kernel.org \
--cc=michel@fb.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/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