Re: [RFC PATCH net-next v2 09/17] ethtool: implement GET_DRVINFO message
From: Jiri Pirko <jiri@resnulli.us>
Date: 2018-07-30 13:23:54
Also in:
lkml
From: Jiri Pirko <jiri@resnulli.us>
Date: 2018-07-30 13:23:54
Also in:
lkml
Mon, Jul 30, 2018 at 02:53:27PM CEST, mkubecek@suse.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. We need to figure out the netlink uapi from scratch. [...]