mbox series

[RESEND,ethtool-next,v6,0/2] add netlink support for rss get

Message ID 20230123212501.1471308-1-sudheer.mogilappagari@intel.com (mailing list archive)
Headers show
Series add netlink support for rss get | expand

Message

Mogilappagari, Sudheer Jan. 23, 2023, 9:24 p.m. UTC
These patches add netlink based handler to fetch RSS information
using "ethtool -x <eth> [context %d]" command.

Output without --json option
$ethtool -x eno2
RX flow hash indirection table for eno2 with 8 RX ring(s):
    0:      0     0     0     0     0     0     0     0
    8:      1     1     1     1     1     1     1     1
   ...skip similar lines...
  120:      7     7     7     7     7     7     7     7
RSS hash key:
be:c3:13:a6:59:9a:c3:c5:d8:60:75:2b:4c:b2:12:cc:5c:4e:34:
8a:f9:ab:16:c7:19:5d:ab:1d:b5:c1:c7:57:c7:a2:e1:2b:e3:ea:
02:60:88:8e:96:ef:2d:64:d2:de:2c:16:72:b6
RSS hash function:
    toeplitz: on
    xor: off
    crc32: off

Sample output with json option:
$ethtool --json -x eno2
[ {
    "ifname": "eno2",
    "rss-indirection-table": [ 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,
    ...skip similar lines...
    7,7,7,7,7,7,7,7 ],
    "rss-hash-key": [ 190,195,19,166,..],
    "rss-hash-function": "toeplitz"
    } ]

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
---
v6:
- Added break after printing hash function in json output
- Coding style fixes
- Add v6 changelog in cover-letter and resend

v5:
- Fixed use of same socket for fetching rings info and RSS info
- Added checks to test if a field exists before accessing reply message
- Refactor print functions and avoid use of ethtool_rxfh structure

v4: 
-Fixed hash function values in example output of commit message.

v3:
-Made hash key as an array of ints.
-Skip json field when not supported.
-Made hash function values as true/false instead of on/off
-Formatted key strings as per review comments. 

v2:
-Added json support
---
Sudheer Mogilappagari (2):
  Move code that print rss info into common file
  netlink: add netlink handler for get rss (-x)

 Makefile.am            |   2 +-
 common.c               |  36 +++++++
 common.h               |   6 +-
 ethtool.c              |  44 ++------
 netlink/desc-ethtool.c |  11 ++
 netlink/extapi.h       |   2 +
 netlink/rss.c          | 231 +++++++++++++++++++++++++++++++++++++++++
 7 files changed, 295 insertions(+), 37 deletions(-)
 create mode 100644 netlink/rss.c

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 1, 2023, 4:30 p.m. UTC | #1
Hello:

This series was applied to ethtool/ethtool.git (master)
by Michal Kubecek <mkubecek@suse.cz>:

On Mon, 23 Jan 2023 13:24:59 -0800 you wrote:
> These patches add netlink based handler to fetch RSS information
> using "ethtool -x <eth> [context %d]" command.
> 
> Output without --json option
> $ethtool -x eno2
> RX flow hash indirection table for eno2 with 8 RX ring(s):
>     0:      0     0     0     0     0     0     0     0
>     8:      1     1     1     1     1     1     1     1
>    ...skip similar lines...
>   120:      7     7     7     7     7     7     7     7
> RSS hash key:
> be:c3:13:a6:59:9a:c3:c5:d8:60:75:2b:4c:b2:12:cc:5c:4e:34:
> 8a:f9:ab:16:c7:19:5d:ab:1d:b5:c1:c7:57:c7:a2:e1:2b:e3:ea:
> 02:60:88:8e:96:ef:2d:64:d2:de:2c:16:72:b6
> RSS hash function:
>     toeplitz: on
>     xor: off
>     crc32: off
> 
> [...]

Here is the summary with links:
  - [RESEND,ethtool-next,v6,1/2] Move code that print rss info into common file
    https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=d139d369c150
  - [RESEND,ethtool-next,v6,2/2] netlink: add netlink handler for get rss (-x)
    (no matching commit)

You are awesome, thank you!