netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ethtool-next v2 0/2] add netlink support for rss get
@ 2022-12-22  0:13 Sudheer Mogilappagari
  2022-12-22  0:13 ` [PATCH ethtool-next v2 1/2] Move code that print rss info into common file Sudheer Mogilappagari
  2022-12-22  0:13 ` [PATCH ethtool-next v2 2/2] netlink: add netlink handler for get rss (-x) Sudheer Mogilappagari
  0 siblings, 2 replies; 9+ messages in thread
From: Sudheer Mogilappagari @ 2022-12-22  0:13 UTC (permalink / raw)
  To: netdev; +Cc: kuba, mkubecek, andrew, corbet, sridhar.samudrala,
	anthony.l.nguyen

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:      0     0     0     0     0     0     0     0
   16:      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

Output with --json option
$ethtool --json -x eno2
[ {
    "ifname": "eno2",
    "RSS indirection table": [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2
    ...skip similar lines...
    7,7,7,7,7,7,7,7,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"
        }
    } ]

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
---
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               |  43 +++++++
 common.h               |   7 ++
 ethtool.c              |  46 +------
 netlink/desc-ethtool.c |  11 ++
 netlink/extapi.h       |   2 +
 netlink/rss.c          | 272 +++++++++++++++++++++++++++++++++++++++++
 7 files changed, 342 insertions(+), 41 deletions(-)
 create mode 100644 netlink/rss.c

-- 
2.31.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-25 18:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-22  0:13 [PATCH ethtool-next v2 0/2] add netlink support for rss get Sudheer Mogilappagari
2022-12-22  0:13 ` [PATCH ethtool-next v2 1/2] Move code that print rss info into common file Sudheer Mogilappagari
2022-12-22  0:13 ` [PATCH ethtool-next v2 2/2] netlink: add netlink handler for get rss (-x) Sudheer Mogilappagari
2022-12-22  1:22   ` Jakub Kicinski
2022-12-22 22:57     ` Mogilappagari, Sudheer
2022-12-23  2:02       ` Jakub Kicinski
2022-12-23 11:08         ` Francois Romieu
2022-12-23 19:50           ` Jakub Kicinski
2022-12-25 18:07             ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).