Re: [PATCH net-next v5 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2015-12-16 Thread David Decotigny
Thanks David: you are right, we should copy back sizeof(struct ethtool_settings) in that case and not sizeof(usettings). Sorry about that, will fix for v6. a few questions before sending update: - is this handshake reasonable? or should we have an ethtool cmd dedicated to this kind of handshake,

Re: [PATCH net-next v5 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2015-12-16 Thread David Miller
From: David Decotigny Date: Mon, 14 Dec 2015 13:03:52 -0800 > +static int ethtool_get_ksettings(struct net_device *dev, void __user > *useraddr) > +{ ... > + if (__ETHTOOL_LINK_MODE_MASK_NU32 > + != ksettings.parent.link_mode_masks_nwords) { > + /* wrong link mode nbits

Re: [PATCH net-next v5 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2015-12-16 Thread David Decotigny
Thanks David: you are right, we should copy back sizeof(struct ethtool_settings) in that case and not sizeof(usettings). Sorry about that, will fix for v6. a few questions before sending update: - is this handshake reasonable? or should we have an ethtool cmd dedicated to this kind of handshake,

Re: [PATCH net-next v5 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2015-12-16 Thread David Miller
From: David Decotigny Date: Mon, 14 Dec 2015 13:03:52 -0800 > +static int ethtool_get_ksettings(struct net_device *dev, void __user > *useraddr) > +{ ... > + if (__ETHTOOL_LINK_MODE_MASK_NU32 > + != ksettings.parent.link_mode_masks_nwords) { > + /*

[PATCH net-next v5 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2015-12-14 Thread David Decotigny
From: David Decotigny 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

[PATCH net-next v5 05/19] net: ethtool: add new ETHTOOL_GSETTINGS/SSETTINGS API

2015-12-14 Thread David Decotigny
From: David Decotigny 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),