diff options
author | David S. Miller <davem@davemloft.net> | 2014-06-03 02:07:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-03 02:07:02 -0400 |
commit | 014b20133bcd442db554c2d2d86181b34cd15b66 (patch) | |
tree | 3402034d4bba5628d21c98258634c58d5bb46bb7 /drivers/net/ethernet/sfc | |
parent | a68ab98e6c7ab0955babcdc45ca446886f3bfb25 (diff) | |
parent | f062a3844845d267e3716cbc188ad502a15898b7 (diff) |
Merge branch 'ethtool-rssh-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/net-next
Ben Hutchings says:
====================
Pull request: Fixes for new ethtool RSS commands
This addresses several problems I previously identified with the new
ETHTOOL_{G,S}RSSH commands:
1. Missing validation of reserved parameters
2. Vague documentation
3. Use of unnamed magic number
4. No consolidation with existing driver operations
I don't currently have access to suitable network hardware, but have
tested these changes with a dummy driver that can support various
combinations of operations and sizes, together with (a) Debian's ethtool
3.13 (b) ethtool 3.14 with the submitted patch to use ETHTOOL_{G,S}RSSH
and minor adjustment for fixes 1 and 3.
v2: Update RSS operations in vmxnet3 too
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r-- | drivers/net/ethernet/sfc/ethtool.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c index 0de8b07c24c2..74739c4b9997 100644 --- a/drivers/net/ethernet/sfc/ethtool.c +++ b/drivers/net/ethernet/sfc/ethtool.c | |||
@@ -1033,7 +1033,7 @@ static u32 efx_ethtool_get_rxfh_indir_size(struct net_device *net_dev) | |||
1033 | 0 : ARRAY_SIZE(efx->rx_indir_table)); | 1033 | 0 : ARRAY_SIZE(efx->rx_indir_table)); |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | static int efx_ethtool_get_rxfh_indir(struct net_device *net_dev, u32 *indir) | 1036 | static int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key) |
1037 | { | 1037 | { |
1038 | struct efx_nic *efx = netdev_priv(net_dev); | 1038 | struct efx_nic *efx = netdev_priv(net_dev); |
1039 | 1039 | ||
@@ -1041,8 +1041,8 @@ static int efx_ethtool_get_rxfh_indir(struct net_device *net_dev, u32 *indir) | |||
1041 | return 0; | 1041 | return 0; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | static int efx_ethtool_set_rxfh_indir(struct net_device *net_dev, | 1044 | static int efx_ethtool_set_rxfh(struct net_device *net_dev, |
1045 | const u32 *indir) | 1045 | const u32 *indir, const u8 *key) |
1046 | { | 1046 | { |
1047 | struct efx_nic *efx = netdev_priv(net_dev); | 1047 | struct efx_nic *efx = netdev_priv(net_dev); |
1048 | 1048 | ||
@@ -1125,8 +1125,8 @@ const struct ethtool_ops efx_ethtool_ops = { | |||
1125 | .get_rxnfc = efx_ethtool_get_rxnfc, | 1125 | .get_rxnfc = efx_ethtool_get_rxnfc, |
1126 | .set_rxnfc = efx_ethtool_set_rxnfc, | 1126 | .set_rxnfc = efx_ethtool_set_rxnfc, |
1127 | .get_rxfh_indir_size = efx_ethtool_get_rxfh_indir_size, | 1127 | .get_rxfh_indir_size = efx_ethtool_get_rxfh_indir_size, |
1128 | .get_rxfh_indir = efx_ethtool_get_rxfh_indir, | 1128 | .get_rxfh = efx_ethtool_get_rxfh, |
1129 | .set_rxfh_indir = efx_ethtool_set_rxfh_indir, | 1129 | .set_rxfh = efx_ethtool_set_rxfh, |
1130 | .get_ts_info = efx_ethtool_get_ts_info, | 1130 | .get_ts_info = efx_ethtool_get_ts_info, |
1131 | .get_module_info = efx_ethtool_get_module_info, | 1131 | .get_module_info = efx_ethtool_get_module_info, |
1132 | .get_module_eeprom = efx_ethtool_get_module_eeprom, | 1132 | .get_module_eeprom = efx_ethtool_get_module_eeprom, |