Skip to content

RFC genetlink: support per-command policy dump

Jakub Kicinski netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9genetlink: add missing kdoc for validation flagsinclude/net/genetlink.h+1 -00 replies
2/9genetlink: reorg struct genl_familyinclude/net/genetlink.h+5 -51 reply
3/9genetlink: add small version of opsinclude/net/genetlink.h net/netlink/genetlink.c+116 -281 reply
4/9genetlink: move to smaller ops wherever possibledrivers/block/nbd.c drivers/net/gtp.c drivers/net/ieee802154/mac802154_hwsim.c +29 more+107 -1021 reply
5/9genetlink: add a structure for dump statenet/netlink/genetlink.c+13 -92 replies
6/9genetlink: use .start callback for dumppolicynet/netlink/genetlink.c+24 -241 reply
7/9genetlink: bring back per op policyinclude/net/genetlink.h net/netlink/genetlink.c+17 -51 reply
8/9genetlink: use per-op policy for CTRL_CMD_GETPOLICYnet/netlink/genetlink.c+10 -71 reply
9/9genetlink: allow dumping command-specific policyinclude/uapi/linux/genetlink.h net/netlink/genetlink.c+22 -26 replies

Reviews trailers per patch

6 of 9 patches have a Reviewed-by or Acked-by.

PatchJohannes Berg
1/9
2/9R-b
3/9R-b
4/9R-b
5/9
6/9R-b
7/9R-b
8/9R-b
9/9

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

Read the v1 thread

Cover letter [RFC net-next 0/9] genetlink: support per-command policy dump

Hi!

The objective of this series is to dump ethtool policies to be able to tell which flags are supported by the kernel. Ethtool policies are per command.

First patch here is included for completeness - it's already in net, but other patches won't apply cleanly without it.

The series adds new set of "light" ops which don't have all the callbacks, and won't have the policy. Most of families are then moved to these ops. This gives us 4096B in savings on an allyesconfig build (not counting the growth that would have happened when policy is added):

text data bss dec hex

244415581  227958581  78372980  550747142  20d3bc06
244415581  227962677  78372980  550751238  20d3cc06

Next 5 patches deal the dumping per-op policy.

Jakub Kicinski (9):
genetlink: add missing kdoc for validation flags
genetlink: reorg struct genl_family
genetlink: add small version of ops
genetlink: move to smaller ops wherever possible
genetlink: add a structure for dump state
genetlink: use .start callback for dumppolicy
genetlink: bring back per op policy
genetlink: use per-op policy for CTRL_CMD_GETPOLICY
genetlink: allow dumping command-specific policy

 drivers/block/nbd.c                      |   6 +-
 drivers/net/gtp.c                        |   6 +-
 drivers/net/ieee802154/mac802154_hwsim.c |   6 +-
 drivers/net/macsec.c                     |   6 +-
 drivers/net/team/team.c                  |   6 +-
 drivers/net/wireless/mac80211_hwsim.c    |   6 +-
 drivers/target/target_core_user.c        |   6 +-
 drivers/thermal/thermal_netlink.c        |   6 +-
 fs/dlm/netlink.c                         |   6 +-
 include/net/genetlink.h                  |  40 +++-
 include/uapi/linux/genetlink.h           |   1 +
 kernel/taskstats.c                       |   6 +-
 net/batman-adv/netlink.c                 |   6 +-
 net/core/devlink.c                       |   6 +-
 net/core/drop_monitor.c                  |   6 +-
 net/hsr/hsr_netlink.c                    |   6 +-
 net/ieee802154/netlink.c                 |   6 +-
 net/ipv4/fou.c                           |   6 +-
 net/ipv4/tcp_metrics.c                   |   6 +-
 net/l2tp/l2tp_netlink.c                  |   6 +-
 net/mptcp/pm_netlink.c                   |   6 +-
 net/ncsi/ncsi-netlink.c                  |   6 +-
 net/netfilter/ipvs/ip_vs_ctl.c           |   6 +-
 net/netlabel/netlabel_calipso.c          |   6 +-
 net/netlabel/netlabel_cipso_v4.c         |   6 +-
 net/netlabel/netlabel_mgmt.c             |   6 +-
 net/netlabel/netlabel_unlabeled.c        |   6 +-
 net/netlink/genetlink.c                  | 225 ++++++++++++++++-------
 net/openvswitch/conntrack.c              |   6 +-
 net/openvswitch/datapath.c               |  24 +--
 net/openvswitch/meter.c                  |   6 +-
 net/psample/psample.c                    |   6 +-
 net/tipc/netlink_compat.c                |   6 +-
 net/wimax/stack.c                        |   6 +-
 net/wireless/nl80211.c                   |   5 +
 35 files changed, 304 insertions(+), 171 deletions(-)
Signature · 1 line
2.26.2