[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZpOO3f6qaVWXQ3kY@shredder.mtl.com>
Date: Sun, 14 Jul 2024 11:39:57 +0300
From: Ido Schimmel <idosch@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: mkubecek@...e.cz, netdev@...r.kernel.org, andrew@...n.ch,
danieller@...dia.com
Subject: Re: [PATCH ethtool-next] module-eeprom: treat zero arguments like
any other arguments for hex dump
On Fri, Jul 12, 2024 at 11:07:06AM -0700, Jakub Kicinski wrote:
> The code does not differentiate between user asking for page 0 and
> page not being set on the CLI at all. This is problematic because
> drivers don't support old type of dumping for newer module types.
> For example trying to hex dump EEPROM of a QSFP-DD on mlx5 gives
> us in kernel logs:
>
> mlx5_query_module_eeprom[...]: Module ID not recognized: 0x18
>
> We can dump all the non-zero pages, and without "hex on" ethtool
> also uses the page-aware API to get the information it will print.
> But hex dumping page 0 is not possible.
>
> Instead of using zero / non-zero to figure out whether param was
> set - add a bitmap of which params got set on command line.
> The nl_param()'s dest option is not used by any other command,
> so we're free to change the format.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: Ido Schimmel <idosch@...dia.com>
Powered by blists - more mailing lists