[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180730144644.r3utyf4toqkjcxwd@unicorn.suse.cz>
Date: Mon, 30 Jul 2018 16:46:44 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiri Pirko <jiri@...nulli.us>,
David Miller <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Roopa Prabhu <roopa@...ulusnetworks.com>,
Jakub Kicinski <kubakici@...pl>,
"John W. Linville" <linville@...driver.com>
Subject: Re: [RFC PATCH net-next v2 09/17] ethtool: implement GET_DRVINFO
message
On Mon, Jul 30, 2018 at 04:28:25PM +0200, Andrew Lunn wrote:
> On Mon, Jul 30, 2018 at 02:53:27PM +0200, Michal Kubecek wrote:
>
> > + ETHA_DRVINFO_FWVERSION (string) firmware version
> > + ETHA_DRVINFO_BUSINFO (string) device bus address
> > + ETHA_DRVINFO_EROM_VER (string) expansion ROM version
> > + ETHA_DRVINFO_N_PRIV_FLAGS (u32) number of private flags
> > + ETHA_DRVINFO_N_STATS (u32) number of device stats
>
> I know there is at least one driver that has somewhat dynamic number
> of statistics. It would be better to have the strings and the values
> in the same message, so there is no need to first get the number of
> strings, allocate the memory, get the strings, then get the values.
>
> > + ETHA_DRVINFO_TESTINFO_LEN (u32) number of test results
>
> In theory, this also does not need to be fixed.
This is interesting. It would mean current (ioctl) ethtool approach with
string set may not work correctly either. On the other hand, this should
not be a problem for netlink interface. Statistics are unlikely to
appear in notifications and daemons collecting them periodically will
have to learn with it. Adding test name to notification "test started"
or "test finished" seems quite natural.
> > + ETHA_DRVINFO_EEDUMP_LEN (u32) EEPROM dump size
> > + ETHA_DRVINFO_REGDUMP_LEN (u32) register dump size
>
> I would suggest removing all these _LEN properties, and let netlink
> return what it needs to return.
Agreed.
Michal Kubecek
Powered by blists - more mailing lists