Skip to content

igb: add RSS key get/set support

Takashi Kozu intel-wired-lan netdev 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 4 repliesIn review
  2. v53 patches 4 repliesSuperseded
  3. v43 patches 6 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 of 3 patches2 repliesSuperseded
v23 patches11 repliesSuperseded
v13 patches2 repliesSuperseded

Changes in v6 from the cover letter

- fix a typo in the 3/3 commit message. (igc_set_rxfh() → igb_set_rxfh())

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3igb: prepare for RSS key get/set supportdrivers/net/ethernet/intel/igb/igb.h drivers/net/ethernet/intel/igb/igb_ethtool.c drivers/net/ethernet/intel/igb/igb_main.c+28 -41 reply
2/3igb: expose RSS key via ethtool get_rxfhdrivers/net/ethernet/intel/igb/igb_ethtool.c+12 -41 reply
3/3igb: allow configuring RSS key via ethtool set_rxfhdrivers/net/ethernet/intel/igb/igb_ethtool.c+26 -222 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchSimon HormanPiotr KwapulinskiAleksandr LoktionovKohei EnjuRinitha S
1/3R-b R-b R-b T-b
2/3R-b R-b T-b
3/3R-b T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v6 thread

Cover letter [PATCH iwl-next v6 0/3] igb: add RSS key get/set support

This series adds ethtool get/set support for the RSS hash key in the igb driver.
- ethtool -x <dev> to display the RSS key
- ethtool -X <dev> hkey <key> to configure the RSS key

Without patch:

# ethtool -x $DEV | grep key -A1
RSS hash key:
Operation not supported
# ethtool -X $DEV hkey 00:00:00:00:00:00:00:00:00:00:00:00:000
Cannot set RX flow hash configuration:
  Hash key setting not supported

With patch:

# ethtool -x $DEV | grep key -A1
RSS hash key:
86:5d:11:56:bd:6f:20:38:3b:f8:bb:df:00:3a:b0:24:95:9f:f9:f4:25:a3:01:3e:4a:15:d6:7c:4d:af:39:7e:4a:95:f2:fd:f6:b6:26:f7
# ethtool -X $DEV hkey 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
# ethtool -x $DEV | grep key -A1
RSS hash key:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

<Changelog>
v6:
- fix a typo in the 3/3 commit message. (igc_set_rxfh() → igb_set_rxfh())

v5:
- delete 'has_user_rss_key' flag because it's unnecessary.

v4:
- modify the position of the declaration in the igb_write_rss_key() so that it is at the start of the block.

v3:
- add ASSERT_RTNL() to explicitly show that an rtnl lock is being used
- Move netdev_rss_key_fill() function from igb_setup_mrqc() to igb_sw_init()
- Add kernel-doc header to igb_write_rss_key()

<Test>
- tools/testing/selftests/drivers/net/hw/rss_api.py is successful Run the following command

# NETIF=enp0s3 python tools/testing/selftests/drivers/net/hw/rss_api.py | grep -v "# Exception"

Then, I checked the diffs before and after applying the patch

$ diff beforePatch.txt afterPatch.txt
9c9
< not ok 6 rss_api.test_rxfh_nl_set_key
---
> ok 6 rss_api.test_rxfh_nl_set_key
16c16
< # Totals: pass:4 fail:8 xfail:0 xpass:0 skip:0 error:0
---
> # Totals: pass:5 fail:7 xfail:0 xpass:0 skip:0 error:0

The failing tests originally fails due to hardware.

- tools/testing/selftests/drivers/net/hw/toeplitz.py is untested since there is no actual hardware, but since the logic around wr32() is preserved as it is, key writing to the device remain the same.

v2: Fix typos (igc_* → igb_*)

      https://lore.kernel.org/intel-wired-lan/[email protected]/T/

v1: https://lore.kernel.org/all/[email protected]/

Takashi Kozu (3):
igb: prepare for RSS key get/set support
igb: expose RSS key via ethtool get_rxfh
igb: allow configuring RSS key via ethtool set_rxfh

 drivers/net/ethernet/intel/igb/igb.h         |  3 +
 drivers/net/ethernet/intel/igb/igb_ethtool.c | 85 ++++++++++++++------
 drivers/net/ethernet/intel/igb/igb_main.c    |  8 +-
 3 files changed, 66 insertions(+), 30 deletions(-)
Signature · 1 line
2.52.0