Skip to content

ethtool netlink interface, part 3

Michal Kubecek lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest15 patches 5 repliesIn review
  2. v115 patches 12 repliesSuperseded

Changes in v2 from the cover letter

- fix netdev reference leaks in error path of ethnl_set_rings() and ethnl_set_channels() (found by Jakub Kicinski)
- use __set_bit() rather than set_bit() (suggested by David Miller)
- in replies to RINGS_GET and CHANNELS_GET requests, omit ring and channel types not supported by driver/device (suggested by Jakub Kicinski)
- more descriptive message size calculations in rings_reply_size() and channels_reply_size() (suggested by Jakub Kicinski)
- coding style cleanup (suggested by Jakub Kicinski)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15ethtool: rename ethnl_parse_header() to ethnl_parse_header_dev_get()net/ethtool/debug.c net/ethtool/linkinfo.c net/ethtool/linkmodes.c +3 more+25 -170 replies
2/15ethtool: update mapping of features to legacy ioctl requestsnet/ethtool/ioctl.c+3 -20 replies
3/15ethtool: provide netdev features with FEATURES_GET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/Makefile +5 more+202 -120 replies
4/15ethtool: add ethnl_parse_bitset() helpernet/ethtool/bitset.c net/ethtool/bitset.h+98 -00 replies
5/15ethtool: set netdev features with FEATURES_SET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/features.c +2 more+224 -90 replies
6/15ethtool: add FEATURES_NTF notificationDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/features.c +1 more+39 -10 replies
7/15ethtool: provide private flags with PRIVFLAGS_GET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/Makefile +3 more+189 -20 replies
8/15ethtool: set device private flags with PRIVFLAGS_SET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/netlink.c +2 more+97 -10 replies
9/15ethtool: add PRIVFLAGS_NTF notificationinclude/uapi/linux/ethtool_netlink.h net/ethtool/ioctl.c net/ethtool/netlink.c +1 more+8 -00 replies
10/15ethtool: provide ring sizes with RINGS_GET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/Makefile +3 more+168 -21 reply
11/15ethtool: set device ring sizes with RINGS_SET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/netlink.c +2 more+118 -11 reply
12/15ethtool: add RINGS_NTF notificationDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/ioctl.c +2 more+12 -10 replies
13/15ethtool: provide channel counts with CHANNELS_GET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/Makefile +3 more+169 -21 reply
14/15ethtool: set device channel counts with CHANNELS_SET requestDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/channels.c +5 more+177 -321 reply
15/15ethtool: add CHANNELS_NTF notificationDocumentation/networking/ethtool-netlink.rst include/uapi/linux/ethtool_netlink.h net/ethtool/channels.c +2 more+12 -10 replies

Reviews trailers per patch

7 of 15 patches have a Reviewed-by or Acked-by.

PatchJakub Kicinski
1/15
2/15
3/15R-b
4/15
5/15
6/15
7/15R-b
8/15R-b
9/15
10/15R-b
11/15R-b
12/15
13/15R-b
14/15R-b
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 00/15] ethtool netlink interface, part 3

Implementation of more netlink request types:

- netdev features (ethtool -k/-K, patches 3-6)
- private flags (--show-priv-flags / --set-priv-flags, patches 7-9)
- ring sizes (ethtool -g/-G, patches 10-12)
- channel counts (ethtool -l/-L, patches 13-15)

Patch 1 is a style cleanup suggested in part 2 review and patch 2 updates the mapping between netdev features and legacy ioctl requests (which are still used by ethtool for backward compatibility).

Changes in v2:
- fix netdev reference leaks in error path of ethnl_set_rings() and ethnl_set_channels() (found by Jakub Kicinski)
- use __set_bit() rather than set_bit() (suggested by David Miller)
- in replies to RINGS_GET and CHANNELS_GET requests, omit ring and channel types not supported by driver/device (suggested by Jakub Kicinski)
- more descriptive message size calculations in rings_reply_size() and channels_reply_size() (suggested by Jakub Kicinski)
- coding style cleanup (suggested by Jakub Kicinski)

Michal Kubecek (15):
ethtool: rename ethnl_parse_header() to ethnl_parse_header_dev_get()
ethtool: update mapping of features to legacy ioctl requests
ethtool: provide netdev features with FEATURES_GET request
ethtool: add ethnl_parse_bitset() helper
ethtool: set netdev features with FEATURES_SET request
ethtool: add FEATURES_NTF notification
ethtool: provide private flags with PRIVFLAGS_GET request
ethtool: set device private flags with PRIVFLAGS_SET request
ethtool: add PRIVFLAGS_NTF notification
ethtool: provide ring sizes with RINGS_GET request
ethtool: set device ring sizes with RINGS_SET request
ethtool: add RINGS_NTF notification
ethtool: provide channel counts with CHANNELS_GET request
ethtool: set device channel counts with CHANNELS_SET request
ethtool: add CHANNELS_NTF notification

 Documentation/networking/ethtool-netlink.rst | 272 +++++++++++++++--
 include/uapi/linux/ethtool_netlink.h         |  82 +++++
 net/ethtool/Makefile                         |   3 +-
 net/ethtool/bitset.c                         |  94 ++++++
 net/ethtool/bitset.h                         |   4 +
 net/ethtool/channels.c                       | 227 ++++++++++++++
 net/ethtool/common.c                         |  31 ++
 net/ethtool/common.h                         |   3 +
 net/ethtool/debug.c                          |   6 +-
 net/ethtool/features.c                       | 304 +++++++++++++++++++
 net/ethtool/ioctl.c                          |  52 +---
 net/ethtool/linkinfo.c                       |   6 +-
 net/ethtool/linkmodes.c                      |   6 +-
 net/ethtool/netlink.c                        |  99 +++++-
 net/ethtool/netlink.h                        |  15 +-
 net/ethtool/privflags.c                      | 209 +++++++++++++
 net/ethtool/rings.c                          | 200 ++++++++++++
 net/ethtool/wol.c                            |   5 +-
 18 files changed, 1538 insertions(+), 80 deletions(-)
 create mode 100644 net/ethtool/channels.c
 create mode 100644 net/ethtool/features.c
 create mode 100644 net/ethtool/privflags.c
 create mode 100644 net/ethtool/rings.c
Signature · 1 line
2.25.1