Re: [PATCH net-next v3 03/17] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API
From: David Miller <davem@davemloft.net>
Date: 2015-12-02 03:14:04
Also in:
linux-mips, lkml, netdev
From: David Miller <davem@davemloft.net>
Date: 2015-12-02 03:14:04
Also in:
linux-mips, lkml, netdev
From: David Decotigny <redacted> Date: Mon, 30 Nov 2015 14:05:41 -0800
This patch defines a new ETHTOOL_GSETTINGS/SSETTINGS API, handled by the new get_ksettings/set_ksettings callbacks. This API provides support for most legacy ethtool_cmd fields, adds support for larger link mode masks (up to 4064 bits, variable length), and removes ethtool_cmd deprecated fields (transceiver/maxrxpkt/maxtxpkt).
Please do not define the mask using a non-fixed type. I know it makes it easier to use the various bitmap helper routines if you use 'long', but here it is clearly superior to use "u32" for the bitmap type and do the bit operations by hand if necessary. Otherwise you have to have all of this ulong size CPP conditional code which is incredibly ugly. Furthermore you have to use fixed sized types anyways so that we don't need compat code to deal with 32-bit userspace applications making these ethtool calls into a 64-bit kernel. THanks.