netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/7] ethtool: allow dumping policies to user space
@ 2020-10-05 22:07 Jakub Kicinski
  2020-10-05 22:07 ` [PATCH net-next v2 1/7] ethtool: wire up get policies to ops Jakub Kicinski
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: Jakub Kicinski @ 2020-10-05 22:07 UTC (permalink / raw)
  To: davem
  Cc: netdev, kernel-team, johannes, jiri, andrew, mkubecek, Jakub Kicinski

Hi!

This series wires up ethtool policies to ops, so they can be
dumped to user space for feature discovery.

First patch wires up GET commands, and second patch wires up SETs.

The policy tables are trimmed to save space and LoC.

Next - take care of linking up nested policies for the header
(which is the policy what we actually care about). And once header
policy is linked make sure that attribute range validation for flags
is done by policy, not a conditions in the code. New type of policy
is needed to validate masks (patch 6).

Netlink as always staying a step ahead of all the other kernel
API interfaces :)

v2:
 - merge patches 1 & 2 -> 1
 - add patch 3 & 5
 - remove .max_attr from struct ethnl_request_ops

Jakub Kicinski (7):
  ethtool: wire up get policies to ops
  ethtool: wire up set policies to ops
  ethtool: trim policy tables
  ethtool: link up ethnl_header_policy as a nested policy
  netlink: create helpers for checking type is an int
  netlink: add mask validation
  ethtool: specify which header flags are supported per command

 include/net/netlink.h        |  27 +++++---
 include/uapi/linux/netlink.h |   2 +
 lib/nlattr.c                 |  36 ++++++++++
 net/ethtool/bitset.c         |  26 ++++----
 net/ethtool/cabletest.c      |  41 ++++--------
 net/ethtool/channels.c       |  35 ++--------
 net/ethtool/coalesce.c       |  45 ++-----------
 net/ethtool/debug.c          |  24 ++-----
 net/ethtool/eee.c            |  32 +++------
 net/ethtool/features.c       |  30 ++-------
 net/ethtool/linkinfo.c       |  30 ++-------
 net/ethtool/linkmodes.c      |  32 ++-------
 net/ethtool/linkstate.c      |  14 +---
 net/ethtool/netlink.c        | 124 +++++++++++++++++++++++++----------
 net/ethtool/netlink.h        |  35 ++++++++--
 net/ethtool/pause.c          |  27 ++------
 net/ethtool/privflags.c      |  24 ++-----
 net/ethtool/rings.c          |  35 ++--------
 net/ethtool/strset.c         |  25 +++----
 net/ethtool/tsinfo.c         |  13 +---
 net/ethtool/tunnels.c        |  42 ++++--------
 net/ethtool/wol.c            |  24 ++-----
 net/netlink/policy.c         |   8 +++
 23 files changed, 317 insertions(+), 414 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2020-10-08 15:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 22:07 [PATCH net-next v2 0/7] ethtool: allow dumping policies to user space Jakub Kicinski
2020-10-05 22:07 ` [PATCH net-next v2 1/7] ethtool: wire up get policies to ops Jakub Kicinski
2020-10-05 22:07 ` [PATCH net-next v2 2/7] ethtool: wire up set " Jakub Kicinski
2020-10-05 22:07 ` [PATCH net-next v2 3/7] ethtool: trim policy tables Jakub Kicinski
2020-10-08  9:12   ` Eric Dumazet
2020-10-08  9:13     ` Johannes Berg
2020-10-08  9:15       ` Johannes Berg
2020-10-08 15:09         ` Eric Dumazet
2020-10-05 22:07 ` [PATCH net-next v2 4/7] ethtool: link up ethnl_header_policy as a nested policy Jakub Kicinski
2020-10-05 22:07 ` [PATCH net-next v2 5/7] netlink: create helpers for checking type is an int Jakub Kicinski
2020-10-05 22:07 ` [PATCH net-next v2 6/7] netlink: add mask validation Jakub Kicinski
2020-10-05 22:07 ` [PATCH net-next v2 7/7] ethtool: specify which header flags are supported per command Jakub Kicinski
2020-10-06  6:43 ` [PATCH net-next v2 0/7] ethtool: allow dumping policies to user space Johannes Berg
2020-10-06 13:26   ` David Miller
2020-10-07  6:27     ` Leon Romanovsky
2020-10-07  7:30       ` Johannes Berg
2020-10-07  8:24         ` Leon Romanovsky
2020-10-07  8:29           ` Johannes Berg
2020-10-07  8:33             ` Leon Romanovsky
2020-10-07 10:47             ` Leon Romanovsky
2020-10-07  8:52           ` Michal Kubecek
2020-10-07 10:48             ` Leon Romanovsky

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).