aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c15
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c8
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c8
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c15
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ethtool.c9
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_ethtool.c10
-rw-r--r--drivers/net/ethernet/sfc/ethtool.c10
-rw-r--r--drivers/net/vmxnet3/vmxnet3_ethtool.c8
-rw-r--r--include/linux/ethtool.h6
-rw-r--r--net/core/ethtool.c8
10 files changed, 48 insertions, 49 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 03224090ecf9..af138f8aa361 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -3316,7 +3316,7 @@ static u32 bnx2x_get_rxfh_indir_size(struct net_device *dev)
3316 return T_ETH_INDIRECTION_TABLE_SIZE; 3316 return T_ETH_INDIRECTION_TABLE_SIZE;
3317} 3317}
3318 3318
3319static int bnx2x_get_rxfh_indir(struct net_device *dev, u32 *indir) 3319static int bnx2x_get_rxfh(struct net_device *dev, u32 *indir, u8 *key)
3320{ 3320{
3321 struct bnx2x *bp = netdev_priv(dev); 3321 struct bnx2x *bp = netdev_priv(dev);
3322 u8 ind_table[T_ETH_INDIRECTION_TABLE_SIZE] = {0}; 3322 u8 ind_table[T_ETH_INDIRECTION_TABLE_SIZE] = {0};
@@ -3340,14 +3340,15 @@ static int bnx2x_get_rxfh_indir(struct net_device *dev, u32 *indir)
3340 return 0; 3340 return 0;
3341} 3341}
3342 3342
3343static int bnx2x_set_rxfh_indir(struct net_device *dev, const u32 *indir) 3343static int bnx2x_set_rxfh(struct net_device *dev, const u32 *indir,
3344 const u8 *key)
3344{ 3345{
3345 struct bnx2x *bp = netdev_priv(dev); 3346 struct bnx2x *bp = netdev_priv(dev);
3346 size_t i; 3347 size_t i;
3347 3348
3348 for (i = 0; i < T_ETH_INDIRECTION_TABLE_SIZE; i++) { 3349 for (i = 0; i < T_ETH_INDIRECTION_TABLE_SIZE; i++) {
3349 /* 3350 /*
3350 * The same as in bnx2x_get_rxfh_indir: we can't use a memcpy() 3351 * The same as in bnx2x_get_rxfh: we can't use a memcpy()
3351 * as an internal storage of an indirection table is a u8 array 3352 * as an internal storage of an indirection table is a u8 array
3352 * while indir->ring_index points to an array of u32. 3353 * while indir->ring_index points to an array of u32.
3353 * 3354 *
@@ -3471,8 +3472,8 @@ static const struct ethtool_ops bnx2x_ethtool_ops = {
3471 .get_rxnfc = bnx2x_get_rxnfc, 3472 .get_rxnfc = bnx2x_get_rxnfc,
3472 .set_rxnfc = bnx2x_set_rxnfc, 3473 .set_rxnfc = bnx2x_set_rxnfc,
3473 .get_rxfh_indir_size = bnx2x_get_rxfh_indir_size, 3474 .get_rxfh_indir_size = bnx2x_get_rxfh_indir_size,
3474 .get_rxfh_indir = bnx2x_get_rxfh_indir, 3475 .get_rxfh = bnx2x_get_rxfh,
3475 .set_rxfh_indir = bnx2x_set_rxfh_indir, 3476 .set_rxfh = bnx2x_set_rxfh,
3476 .get_channels = bnx2x_get_channels, 3477 .get_channels = bnx2x_get_channels,
3477 .set_channels = bnx2x_set_channels, 3478 .set_channels = bnx2x_set_channels,
3478 .get_module_info = bnx2x_get_module_info, 3479 .get_module_info = bnx2x_get_module_info,
@@ -3498,8 +3499,8 @@ static const struct ethtool_ops bnx2x_vf_ethtool_ops = {
3498 .get_rxnfc = bnx2x_get_rxnfc, 3499 .get_rxnfc = bnx2x_get_rxnfc,
3499 .set_rxnfc = bnx2x_set_rxnfc, 3500 .set_rxnfc = bnx2x_set_rxnfc,
3500 .get_rxfh_indir_size = bnx2x_get_rxfh_indir_size, 3501 .get_rxfh_indir_size = bnx2x_get_rxfh_indir_size,
3501 .get_rxfh_indir = bnx2x_get_rxfh_indir, 3502 .get_rxfh = bnx2x_get_rxfh,
3502 .set_rxfh_indir = bnx2x_set_rxfh_indir, 3503 .set_rxfh = bnx2x_set_rxfh,
3503 .get_channels = bnx2x_get_channels, 3504 .get_channels = bnx2x_get_channels,
3504 .set_channels = bnx2x_set_channels, 3505 .set_channels = bnx2x_set_channels,
3505}; 3506};
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index ccd90156aebc..8c2314ed260c 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -12501,7 +12501,7 @@ static u32 tg3_get_rxfh_indir_size(struct net_device *dev)
12501 return size; 12501 return size;
12502} 12502}
12503 12503
12504static int tg3_get_rxfh_indir(struct net_device *dev, u32 *indir) 12504static int tg3_get_rxfh(struct net_device *dev, u32 *indir, u8 *key)
12505{ 12505{
12506 struct tg3 *tp = netdev_priv(dev); 12506 struct tg3 *tp = netdev_priv(dev);
12507 int i; 12507 int i;
@@ -12512,7 +12512,7 @@ static int tg3_get_rxfh_indir(struct net_device *dev, u32 *indir)
12512 return 0; 12512 return 0;
12513} 12513}
12514 12514
12515static int tg3_set_rxfh_indir(struct net_device *dev, const u32 *indir) 12515static int tg3_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key)
12516{ 12516{
12517 struct tg3 *tp = netdev_priv(dev); 12517 struct tg3 *tp = netdev_priv(dev);
12518 size_t i; 12518 size_t i;
@@ -14044,8 +14044,8 @@ static const struct ethtool_ops tg3_ethtool_ops = {
14044 .get_sset_count = tg3_get_sset_count, 14044 .get_sset_count = tg3_get_sset_count,
14045 .get_rxnfc = tg3_get_rxnfc, 14045 .get_rxnfc = tg3_get_rxnfc,
14046 .get_rxfh_indir_size = tg3_get_rxfh_indir_size, 14046 .get_rxfh_indir_size = tg3_get_rxfh_indir_size,
14047 .get_rxfh_indir = tg3_get_rxfh_indir, 14047 .get_rxfh = tg3_get_rxfh,
14048 .set_rxfh_indir = tg3_set_rxfh_indir, 14048 .set_rxfh = tg3_set_rxfh,
14049 .get_channels = tg3_get_channels, 14049 .get_channels = tg3_get_channels,
14050 .set_channels = tg3_set_channels, 14050 .set_channels = tg3_set_channels,
14051 .get_ts_info = tg3_get_ts_info, 14051 .get_ts_info = tg3_get_ts_info,
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 266a5bc6aedf..8cf6be93f491 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2739,7 +2739,7 @@ static u32 get_rss_table_size(struct net_device *dev)
2739 return pi->rss_size; 2739 return pi->rss_size;
2740} 2740}
2741 2741
2742static int get_rss_table(struct net_device *dev, u32 *p) 2742static int get_rss_table(struct net_device *dev, u32 *p, u8 *key)
2743{ 2743{
2744 const struct port_info *pi = netdev_priv(dev); 2744 const struct port_info *pi = netdev_priv(dev);
2745 unsigned int n = pi->rss_size; 2745 unsigned int n = pi->rss_size;
@@ -2749,7 +2749,7 @@ static int get_rss_table(struct net_device *dev, u32 *p)
2749 return 0; 2749 return 0;
2750} 2750}
2751 2751
2752static int set_rss_table(struct net_device *dev, const u32 *p) 2752static int set_rss_table(struct net_device *dev, const u32 *p, const u8 *key)
2753{ 2753{
2754 unsigned int i; 2754 unsigned int i;
2755 struct port_info *pi = netdev_priv(dev); 2755 struct port_info *pi = netdev_priv(dev);
@@ -2851,8 +2851,8 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
2851 .set_wol = set_wol, 2851 .set_wol = set_wol,
2852 .get_rxnfc = get_rxnfc, 2852 .get_rxnfc = get_rxnfc,
2853 .get_rxfh_indir_size = get_rss_table_size, 2853 .get_rxfh_indir_size = get_rss_table_size,
2854 .get_rxfh_indir = get_rss_table, 2854 .get_rxfh = get_rss_table,
2855 .set_rxfh_indir = set_rss_table, 2855 .set_rxfh = set_rss_table,
2856 .flash_device = set_flash, 2856 .flash_device = set_flash,
2857}; 2857};
2858 2858
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
index 77e786d2d0e0..dbc8986c2dae 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
@@ -626,13 +626,14 @@ static u32 i40evf_get_rxfh_indir_size(struct net_device *netdev)
626} 626}
627 627
628/** 628/**
629 * i40evf_get_rxfh_indir - get the rx flow hash indirection table 629 * i40evf_get_rxfh - get the rx flow hash indirection table
630 * @netdev: network interface device structure 630 * @netdev: network interface device structure
631 * @indir: indirection table 631 * @indir: indirection table
632 * @key: hash key (will be %NULL until get_rxfh_key_size is implemented)
632 * 633 *
633 * Reads the indirection table directly from the hardware. Always returns 0. 634 * Reads the indirection table directly from the hardware. Always returns 0.
634 **/ 635 **/
635static int i40evf_get_rxfh_indir(struct net_device *netdev, u32 *indir) 636static int i40evf_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
636{ 637{
637 struct i40evf_adapter *adapter = netdev_priv(netdev); 638 struct i40evf_adapter *adapter = netdev_priv(netdev);
638 struct i40e_hw *hw = &adapter->hw; 639 struct i40e_hw *hw = &adapter->hw;
@@ -650,14 +651,16 @@ static int i40evf_get_rxfh_indir(struct net_device *netdev, u32 *indir)
650} 651}
651 652
652/** 653/**
653 * i40evf_set_rxfh_indir - set the rx flow hash indirection table 654 * i40evf_set_rxfh - set the rx flow hash indirection table
654 * @netdev: network interface device structure 655 * @netdev: network interface device structure
655 * @indir: indirection table 656 * @indir: indirection table
657 * @key: hash key (will be %NULL until get_rxfh_key_size is implemented)
656 * 658 *
657 * Returns -EINVAL if the table specifies an inavlid queue id, otherwise 659 * Returns -EINVAL if the table specifies an inavlid queue id, otherwise
658 * returns 0 after programming the table. 660 * returns 0 after programming the table.
659 **/ 661 **/
660static int i40evf_set_rxfh_indir(struct net_device *netdev, const u32 *indir) 662static int i40evf_set_rxfh(struct net_device *netdev, const u32 *indir,
663 const u8 *key)
661{ 664{
662 struct i40evf_adapter *adapter = netdev_priv(netdev); 665 struct i40evf_adapter *adapter = netdev_priv(netdev);
663 struct i40e_hw *hw = &adapter->hw; 666 struct i40e_hw *hw = &adapter->hw;
@@ -691,8 +694,8 @@ static struct ethtool_ops i40evf_ethtool_ops = {
691 .get_rxnfc = i40evf_get_rxnfc, 694 .get_rxnfc = i40evf_get_rxnfc,
692 .set_rxnfc = i40evf_set_rxnfc, 695 .set_rxnfc = i40evf_set_rxnfc,
693 .get_rxfh_indir_size = i40evf_get_rxfh_indir_size, 696 .get_rxfh_indir_size = i40evf_get_rxfh_indir_size,
694 .get_rxfh_indir = i40evf_get_rxfh_indir, 697 .get_rxfh = i40evf_get_rxfh,
695 .set_rxfh_indir = i40evf_set_rxfh_indir, 698 .set_rxfh = i40evf_set_rxfh,
696 .get_channels = i40evf_get_channels, 699 .get_channels = i40evf_get_channels,
697}; 700};
698 701
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index a84297c85fb1..d8bbcf1873ca 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2830,7 +2830,7 @@ static u32 igb_get_rxfh_indir_size(struct net_device *netdev)
2830 return IGB_RETA_SIZE; 2830 return IGB_RETA_SIZE;
2831} 2831}
2832 2832
2833static int igb_get_rxfh_indir(struct net_device *netdev, u32 *indir) 2833static int igb_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key)
2834{ 2834{
2835 struct igb_adapter *adapter = netdev_priv(netdev); 2835 struct igb_adapter *adapter = netdev_priv(netdev);
2836 int i; 2836 int i;
@@ -2876,7 +2876,8 @@ void igb_write_rss_indir_tbl(struct igb_adapter *adapter)
2876 } 2876 }
2877} 2877}
2878 2878
2879static int igb_set_rxfh_indir(struct net_device *netdev, const u32 *indir) 2879static int igb_set_rxfh(struct net_device *netdev, const u32 *indir,
2880 const u8 *key)
2880{ 2881{
2881 struct igb_adapter *adapter = netdev_priv(netdev); 2882 struct igb_adapter *adapter = netdev_priv(netdev);
2882 struct e1000_hw *hw = &adapter->hw; 2883 struct e1000_hw *hw = &adapter->hw;
@@ -3025,8 +3026,8 @@ static const struct ethtool_ops igb_ethtool_ops = {
3025 .get_module_info = igb_get_module_info, 3026 .get_module_info = igb_get_module_info,
3026 .get_module_eeprom = igb_get_module_eeprom, 3027 .get_module_eeprom = igb_get_module_eeprom,
3027 .get_rxfh_indir_size = igb_get_rxfh_indir_size, 3028 .get_rxfh_indir_size = igb_get_rxfh_indir_size,
3028 .get_rxfh_indir = igb_get_rxfh_indir, 3029 .get_rxfh = igb_get_rxfh,
3029 .set_rxfh_indir = igb_set_rxfh_indir, 3030 .set_rxfh = igb_set_rxfh,
3030 .get_channels = igb_get_channels, 3031 .get_channels = igb_get_channels,
3031 .set_channels = igb_set_channels, 3032 .set_channels = igb_set_channels,
3032 .begin = igb_ethtool_begin, 3033 .begin = igb_ethtool_begin,
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index a72d99fd7a2d..263a1c7a3370 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -564,7 +564,7 @@ static u32 mlx4_en_get_rxfh_indir_size(struct net_device *dev)
564 return priv->rx_ring_num; 564 return priv->rx_ring_num;
565} 565}
566 566
567static int mlx4_en_get_rxfh_indir(struct net_device *dev, u32 *ring_index) 567static int mlx4_en_get_rxfh(struct net_device *dev, u32 *ring_index, u8 *key)
568{ 568{
569 struct mlx4_en_priv *priv = netdev_priv(dev); 569 struct mlx4_en_priv *priv = netdev_priv(dev);
570 struct mlx4_en_rss_map *rss_map = &priv->rss_map; 570 struct mlx4_en_rss_map *rss_map = &priv->rss_map;
@@ -582,8 +582,8 @@ static int mlx4_en_get_rxfh_indir(struct net_device *dev, u32 *ring_index)
582 return err; 582 return err;
583} 583}
584 584
585static int mlx4_en_set_rxfh_indir(struct net_device *dev, 585static int mlx4_en_set_rxfh(struct net_device *dev, const u32 *ring_index,
586 const u32 *ring_index) 586 const u8 *key)
587{ 587{
588 struct mlx4_en_priv *priv = netdev_priv(dev); 588 struct mlx4_en_priv *priv = netdev_priv(dev);
589 struct mlx4_en_dev *mdev = priv->mdev; 589 struct mlx4_en_dev *mdev = priv->mdev;
@@ -1224,8 +1224,8 @@ const struct ethtool_ops mlx4_en_ethtool_ops = {
1224 .get_rxnfc = mlx4_en_get_rxnfc, 1224 .get_rxnfc = mlx4_en_get_rxnfc,
1225 .set_rxnfc = mlx4_en_set_rxnfc, 1225 .set_rxnfc = mlx4_en_set_rxnfc,
1226 .get_rxfh_indir_size = mlx4_en_get_rxfh_indir_size, 1226 .get_rxfh_indir_size = mlx4_en_get_rxfh_indir_size,
1227 .get_rxfh_indir = mlx4_en_get_rxfh_indir, 1227 .get_rxfh = mlx4_en_get_rxfh,
1228 .set_rxfh_indir = mlx4_en_set_rxfh_indir, 1228 .set_rxfh = mlx4_en_set_rxfh,
1229 .get_channels = mlx4_en_get_channels, 1229 .get_channels = mlx4_en_get_channels,
1230 .set_channels = mlx4_en_set_channels, 1230 .set_channels = mlx4_en_set_channels,
1231 .get_ts_info = mlx4_en_get_ts_info, 1231 .get_ts_info = mlx4_en_get_ts_info,
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
1036static int efx_ethtool_get_rxfh_indir(struct net_device *net_dev, u32 *indir) 1036static 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
1044static int efx_ethtool_set_rxfh_indir(struct net_device *net_dev, 1044static 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,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index 00e120296e92..9396cca93b09 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -579,7 +579,7 @@ vmxnet3_get_rss_indir_size(struct net_device *netdev)
579} 579}
580 580
581static int 581static int
582vmxnet3_get_rss_indir(struct net_device *netdev, u32 *p) 582vmxnet3_get_rss(struct net_device *netdev, u32 *p, u8 *key)
583{ 583{
584 struct vmxnet3_adapter *adapter = netdev_priv(netdev); 584 struct vmxnet3_adapter *adapter = netdev_priv(netdev);
585 struct UPT1_RSSConf *rssConf = adapter->rss_conf; 585 struct UPT1_RSSConf *rssConf = adapter->rss_conf;
@@ -592,7 +592,7 @@ vmxnet3_get_rss_indir(struct net_device *netdev, u32 *p)
592} 592}
593 593
594static int 594static int
595vmxnet3_set_rss_indir(struct net_device *netdev, const u32 *p) 595vmxnet3_set_rss(struct net_device *netdev, const u32 *p, const u8 *key)
596{ 596{
597 unsigned int i; 597 unsigned int i;
598 unsigned long flags; 598 unsigned long flags;
@@ -628,8 +628,8 @@ static const struct ethtool_ops vmxnet3_ethtool_ops = {
628 .get_rxnfc = vmxnet3_get_rxnfc, 628 .get_rxnfc = vmxnet3_get_rxnfc,
629#ifdef VMXNET3_RSS 629#ifdef VMXNET3_RSS
630 .get_rxfh_indir_size = vmxnet3_get_rss_indir_size, 630 .get_rxfh_indir_size = vmxnet3_get_rss_indir_size,
631 .get_rxfh_indir = vmxnet3_get_rss_indir, 631 .get_rxfh = vmxnet3_get_rss,
632 .set_rxfh_indir = vmxnet3_set_rss_indir, 632 .set_rxfh = vmxnet3_set_rss,
633#endif 633#endif
634}; 634};
635 635
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 874fde01d398..e658229fee39 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -158,15 +158,11 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
158 * Returns zero if not supported for this specific device. 158 * Returns zero if not supported for this specific device.
159 * @get_rxfh_indir_size: Get the size of the RX flow hash indirection table. 159 * @get_rxfh_indir_size: Get the size of the RX flow hash indirection table.
160 * Returns zero if not supported for this specific device. 160 * Returns zero if not supported for this specific device.
161 * @get_rxfh_indir: Get the contents of the RX flow hash indirection table.
162 * Will not be called if @get_rxfh_indir_size returns zero.
163 * @get_rxfh: Get the contents of the RX flow hash indirection table and hash 161 * @get_rxfh: Get the contents of the RX flow hash indirection table and hash
164 * key. 162 * key.
165 * Will only be called if one or both of @get_rxfh_indir_size and 163 * Will only be called if one or both of @get_rxfh_indir_size and
166 * @get_rxfh_key_size are implemented and return non-zero. 164 * @get_rxfh_key_size are implemented and return non-zero.
167 * Returns a negative error code or zero. 165 * Returns a negative error code or zero.
168 * @set_rxfh_indir: Set the contents of the RX flow hash indirection table.
169 * Will not be called if @get_rxfh_indir_size returns zero.
170 * @set_rxfh: Set the contents of the RX flow hash indirection table and/or 166 * @set_rxfh: Set the contents of the RX flow hash indirection table and/or
171 * hash key. In case only the indirection table or hash key is to be 167 * hash key. In case only the indirection table or hash key is to be
172 * changed, the other argument will be %NULL. 168 * changed, the other argument will be %NULL.
@@ -248,8 +244,6 @@ struct ethtool_ops {
248 int (*get_rxfh)(struct net_device *, u32 *indir, u8 *key); 244 int (*get_rxfh)(struct net_device *, u32 *indir, u8 *key);
249 int (*set_rxfh)(struct net_device *, const u32 *indir, 245 int (*set_rxfh)(struct net_device *, const u32 *indir,
250 const u8 *key); 246 const u8 *key);
251 int (*get_rxfh_indir)(struct net_device *, u32 *);
252 int (*set_rxfh_indir)(struct net_device *, const u32 *);
253 void (*get_channels)(struct net_device *, struct ethtool_channels *); 247 void (*get_channels)(struct net_device *, struct ethtool_channels *);
254 int (*set_channels)(struct net_device *, struct ethtool_channels *); 248 int (*set_channels)(struct net_device *, struct ethtool_channels *);
255 int (*get_dump_flag)(struct net_device *, struct ethtool_dump *); 249 int (*get_dump_flag)(struct net_device *, struct ethtool_dump *);
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index b8857348bdf3..8ae452afb545 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -582,7 +582,7 @@ static noinline_for_stack int ethtool_get_rxfh_indir(struct net_device *dev,
582 int ret; 582 int ret;
583 583
584 if (!dev->ethtool_ops->get_rxfh_indir_size || 584 if (!dev->ethtool_ops->get_rxfh_indir_size ||
585 !dev->ethtool_ops->get_rxfh_indir) 585 !dev->ethtool_ops->get_rxfh)
586 return -EOPNOTSUPP; 586 return -EOPNOTSUPP;
587 dev_size = dev->ethtool_ops->get_rxfh_indir_size(dev); 587 dev_size = dev->ethtool_ops->get_rxfh_indir_size(dev);
588 if (dev_size == 0) 588 if (dev_size == 0)
@@ -608,7 +608,7 @@ static noinline_for_stack int ethtool_get_rxfh_indir(struct net_device *dev,
608 if (!indir) 608 if (!indir)
609 return -ENOMEM; 609 return -ENOMEM;
610 610
611 ret = dev->ethtool_ops->get_rxfh_indir(dev, indir); 611 ret = dev->ethtool_ops->get_rxfh(dev, indir, NULL);
612 if (ret) 612 if (ret)
613 goto out; 613 goto out;
614 614
@@ -632,7 +632,7 @@ static noinline_for_stack int ethtool_set_rxfh_indir(struct net_device *dev,
632 int ret; 632 int ret;
633 u32 ringidx_offset = offsetof(struct ethtool_rxfh_indir, ring_index[0]); 633 u32 ringidx_offset = offsetof(struct ethtool_rxfh_indir, ring_index[0]);
634 634
635 if (!ops->get_rxfh_indir_size || !ops->set_rxfh_indir || 635 if (!ops->get_rxfh_indir_size || !ops->set_rxfh ||
636 !ops->get_rxnfc) 636 !ops->get_rxnfc)
637 return -EOPNOTSUPP; 637 return -EOPNOTSUPP;
638 638
@@ -669,7 +669,7 @@ static noinline_for_stack int ethtool_set_rxfh_indir(struct net_device *dev,
669 goto out; 669 goto out;
670 } 670 }
671 671
672 ret = ops->set_rxfh_indir(dev, indir); 672 ret = ops->set_rxfh(dev, indir, NULL);
673 673
674out: 674out:
675 kfree(indir); 675 kfree(indir);