diff mbox series

[ethtool-next,4/4] ethtool: Update manpages for getmodule (-m) command

Message ID 1619162596-23846-5-git-send-email-moshe@nvidia.com (mailing list archive)
State Changes Requested
Delegated to: Michal Kubecek
Headers show
Series Extend module EEPROM API | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Moshe Shemesh April 23, 2021, 7:23 a.m. UTC
From: Vladyslav Tarasiuk <vladyslavt@nvidia.com>

Add page, bank and i2c parameters and mention change in offset and
length treatment if either one of new parameters is specified by the
user.

Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
---
 ethtool.8.in | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Don Bollinger April 30, 2021, 9:55 p.m. UTC | #1
> From: Moshe Shemesh [mailto:moshe@nvidia.com]
> Sent: Friday, April 23, 2021 12:23 AM
> To: Michal Kubecek <mkubecek@suse.cz>; Andrew Lunn
> <andrew@lunn.ch>; Jakub Kicinski <kuba@kernel.org>; Don Bollinger
> <don@thebollingers.org>; netdev@vger.kernel.org
> Cc: Vladyslav Tarasiuk <vladyslavt@nvidia.com>; Moshe Shemesh
> <moshe@nvidia.com>
> Subject: [PATCH ethtool-next 4/4] ethtool: Update manpages for getmodule
> (-m) command
> 
> From: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
> 
> Add page, bank and i2c parameters and mention change in offset and length
> treatment if either one of new parameters is specified by the user.
> 
> Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
> ---
>  ethtool.8.in | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/ethtool.8.in b/ethtool.8.in index fe49b66..9516458 100644
> --- a/ethtool.8.in
> +++ b/ethtool.8.in
> @@ -359,6 +359,9 @@ ethtool \- query or control network driver and
> hardware settings
>  .B2 hex on off
>  .BN offset
>  .BN length
> +.BN page
> +.BN bank
> +.BN i2c
>  .HP
>  .B ethtool \-\-show\-priv\-flags
>  .I devname
> @@ -1154,6 +1157,17 @@ Changes the number of multi-purpose channels.
>  Retrieves and if possible decodes the EEPROM from plugin modules, e.g
> SFP+, QSFP.
>  If the driver and module support it, the optical diagnostic information
is also
> read and decoded.
> +When either one of
> +.I page,
> +.I bank
> +or
> +.I i2c
> +parameters is specified, dumps only of a single page or its portion is
> +allowed. In such a case .I offset and .I length parameters are treated
> +relatively to EEPROM page boundaries.

You want 'relative', not 'relatively'.

Please spend a few more words on this.  Basically there are two choices.
Assuming lower memory cannot be accessed when page 2 is specified, the
offset of the first byte of page 2 is either 0 or 128.  I can't tell which
of those choices you mean.

Also, based on the code in the other patches, I assume you mean that the
first byte of page 2 is at offset 0.  I recommend against that.  The specs
all assume that the first byte ***of the paged area*** of page 2 (or any
other page) is at 128.  Hundreds of registers are specified in each spec,
all with offsets in the range 128-255.  The ONLY purpose of this option to
ethtool is to manage those registers, per those specs.  Forcing every user
to translate between the spec and the tool is going to be tedious and error
prone.



>  .TP
>  .B \-\-show\-priv\-flags
>  Queries the specified network device for its private flags.  The
> --
> 2.26.2

Don
diff mbox series

Patch

diff --git a/ethtool.8.in b/ethtool.8.in
index fe49b66..9516458 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -359,6 +359,9 @@  ethtool \- query or control network driver and hardware settings
 .B2 hex on off
 .BN offset
 .BN length
+.BN page
+.BN bank
+.BN i2c
 .HP
 .B ethtool \-\-show\-priv\-flags
 .I devname
@@ -1154,6 +1157,17 @@  Changes the number of multi-purpose channels.
 Retrieves and if possible decodes the EEPROM from plugin modules, e.g SFP+, QSFP.
 If the driver and module support it, the optical diagnostic information is also
 read and decoded.
+When either one of
+.I page,
+.I bank
+or
+.I i2c
+parameters is specified, dumps only of a single page or its portion is
+allowed. In such a case
+.I offset
+and
+.I length
+parameters are treated relatively to EEPROM page boundaries.
 .TP
 .B \-\-show\-priv\-flags
 Queries the specified network device for its private flags.  The