From: Andrew Lunn <andrew@lunn.ch>
To: Moshe Shemesh <moshe@nvidia.com>
Cc: Don Bollinger <don@thebollingers.org>,
"'David S. Miller'" <davem@davemloft.net>,
'Jakub Kicinski' <kuba@kernel.org>,
'Adrian Pop' <pop.adrian61@gmail.com>,
'Michal Kubecek' <mkubecek@suse.cz>,
netdev@vger.kernel.org,
'Vladyslav Tarasiuk' <vladyslavt@nvidia.com>
Subject: Re: [RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data
Date: Thu, 18 Mar 2021 23:36:25 +0100 [thread overview]
Message-ID: <YFPV6RLWoklMHVYz@lunn.ch> (raw)
In-Reply-To: <0a8beb69-972b-3b00-a67e-0e97f9fda8ea@nvidia.com>
> > > +static int eeprom_data_parse_request(struct ethnl_req_info *req_info,
> > > struct nlattr **tb,
> > > + struct netlink_ext_ack *extack) {
> > > + struct eeprom_data_req_info *request =
> > > EEPROM_DATA_REQINFO(req_info);
> > > + struct net_device *dev = req_info->dev;
> > > +
> > > + if (!tb[ETHTOOL_A_EEPROM_DATA_OFFSET] ||
> > > + !tb[ETHTOOL_A_EEPROM_DATA_LENGTH] ||
> > > + !tb[ETHTOOL_A_EEPROM_DATA_I2C_ADDRESS])
> > > + return -EINVAL;
> > Suggestion: Consider using i2c address 0x50 as a default if none is given.
> > 0x50 is the first 256 bytes of SFP, and all of QSFP and CMIS EEPROM. If
> > there is a page given on an SFP device, then you know i2c address is 0x51.
> > The only thing that REQUIRES 0x51 is legacy offset 256-511 on SFP. Keep the
> > i2c address, but make it optional for the non-standard devices that Andrew
> > has mentioned, and for that one section of SFP data that requires it. And
> > document it for the user.
> Agree, but thought to have that i2c address default set on userspace, so
> here we expect it.
I would make it mandatory. If you default it to 0x50, the current
message structure has no way of including this information in the
reply. So user space gets some data, but it has no idea from where?
Andrew
next prev parent reply other threads:[~2021-03-18 22:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 17:12 [RFC PATCH V3 net-next 0/5] ethtool: Extend module EEPROM dump API Moshe Shemesh
2021-03-15 17:12 ` [RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data Moshe Shemesh
2021-03-15 21:01 ` Jakub Kicinski
2021-03-16 17:59 ` Moshe Shemesh
2021-03-15 22:31 ` Don Bollinger
2021-03-16 18:23 ` Moshe Shemesh
2021-03-16 21:00 ` Don Bollinger
2021-03-18 22:36 ` Andrew Lunn [this message]
2021-03-18 13:03 ` Andrew Lunn
2021-03-18 14:25 ` Moshe Shemesh
2021-03-18 22:16 ` Andrew Lunn
2021-03-18 15:16 ` Michal Kubecek
2021-03-15 17:12 ` [RFC PATCH V3 net-next 2/5] net/mlx5: Refactor module EEPROM query Moshe Shemesh
2021-03-15 17:12 ` [RFC PATCH V3 net-next 3/5] net/mlx5: Implement get_module_eeprom_data_by_page() Moshe Shemesh
2021-03-15 17:12 ` [RFC PATCH V3 net-next 4/5] net/mlx5: Add support for DSFP module EEPROM dumps Moshe Shemesh
2021-03-15 17:12 ` [RFC PATCH V3 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command Moshe Shemesh
2021-03-15 22:31 ` Don Bollinger
2021-03-16 18:26 ` Moshe Shemesh
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=YFPV6RLWoklMHVYz@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=don@thebollingers.org \
--cc=kuba@kernel.org \
--cc=mkubecek@suse.cz \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pop.adrian61@gmail.com \
--cc=vladyslavt@nvidia.com \
/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).