]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - drivers/net/ethernet/intel/igb/igb_main.c
igb: Expose RSS indirection table for ethtool
authorLaura Mihaela Vasilescu <laura.vasilescu@rosedu.org>
Wed, 31 Jul 2013 20:19:54 +0000 (20:19 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 22 Aug 2013 09:26:27 +0000 (02:26 -0700)
commited12cc9a145132f5e59919570adff84b318f6010
treeae6d7238a3927d368445db24fbe4898bb95a08d0
parentc342b39ea7ca0e46e093cdb346bf52b2b4e71b01
igb: Expose RSS indirection table for ethtool

This patch adds the ethtool callbacks necessary to change the RETA
indirection table from userspace.

In order to achieve this, we add the indirection table field (rss_indir_tbl)
in the board specific data structure (struct igb_adapter) to preserve the
values across hardware resets.

The indirection table must be initialized with default values in the
following cases:
* at module init time
* when the number of RX queues changes.
For this reason we add a new field (rss_indir_tbl_init) in igb_adapter
that keeps track of the number of RX queues. Whenever the number of RX
queues changes, the rss_indir_tbl is modified and initialized with default
values. The rss_indir_tbl_init is updated accordingly.

CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Laura Mihaela Vasilescu <laura.vasilescu@rosedu.org>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c