[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180730143714.tlvze2xas2kk7zqo@unicorn.suse.cz>
Date: Mon, 30 Jul 2018 16:37:14 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
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 03:21:07PM +0200, Jiri Pirko wrote:
> Mon, Jul 30, 2018 at 02:53:27PM CEST, mkubecek@...e.cz wrote:
>
> [...]
>
> >+/* GET_DRVINFO / SET_DRVINFO */
> >+
> >+enum {
> >+ ETHA_DRVINFO_UNSPEC,
> >+ ETHA_DRVINFO_DEV, /* nest - ETHA_DEV_* */
> >+ ETHA_DRVINFO_DRIVER, /* string */
> >+ ETHA_DRVINFO_VERSION, /* string */
> >+ ETHA_DRVINFO_FWVERSION, /* string */
> >+ ETHA_DRVINFO_BUSINFO, /* string */
> >+ ETHA_DRVINFO_EROM_VER, /* string */
> >+ ETHA_DRVINFO_N_PRIV_FLAGS, /* u32 */
> >+ ETHA_DRVINFO_N_STATS, /* u32 */
> >+ ETHA_DRVINFO_TESTINFO_LEN, /* u32 */
> >+ ETHA_DRVINFO_EEDUMP_LEN, /* u32 */
> >+ ETHA_DRVINFO_REGDUMP_LEN, /* u32 */
>
> This is a nice example of why 1:1 ioctl->netlink conversion would be
> a big mistake.
>
> I understand that for ioclt, getting lengths of various things is
> important. Userspace can prepare buffer for next ioctl which would
> actually do dump transfer. However in netlink, this is totally pointless
> as the dump goes into userspace in multiple netlink messages.
Right, I already mentioned this in the ToDo part of cover letter. It
makes indeed little sense to put this information here - and even less
to put only dome of the counts and lengths.
Michal Kubecek
Powered by blists - more mailing lists