All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 00/10] genetlink: support per-command policy dump
@ 2020-10-01 22:59 Jakub Kicinski
  2020-10-01 22:59 ` [PATCH net-next v2 01/10] genetlink: reorg struct genl_family Jakub Kicinski
                   ` (10 more replies)
  0 siblings, 11 replies; 35+ messages in thread
From: Jakub Kicinski @ 2020-10-01 22:59 UTC (permalink / raw)
  To: davem
  Cc: netdev, andrew, johannes, jiri, mkubecek, dsahern, pablo, Jakub Kicinski

Hi!

The objective of this series is to dump ethtool policies
to be able to tell which flags are supported by the kernel.
Current release adds ETHTOOL_FLAG_STATS for dumping extra
stats, but because of strict checking we need to make sure
that the flag is actually supported before setting it in
a request.

Ethtool policies are per command, and so far only dumping
family policies was supported.

The series adds new set of "light" ops to genl families 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 6 patches deal the dumping per-op policy.

v2:
 - remove the stale comment in taskstats
 - split patch 8 -> 8, 9
 - now the getfamily policy is also in the op
 - make cmd u32
v1:
 - replace remaining uses of "light" with "small"
 - fix dump (ops can't be on the stack there)
 - coding changes in patch 4
 - new patch 7
 - don't echo op in responses - to make dump all easier

Dave - this series will cause a very trivial conflict with
the patch I sent to net. Both sides add some kdoc to struct
genl_ops so we'll need to keep it all.  I'm sending this
already because I also need to restructure ethool policies
in time for 5.10 if we want to use it for the stats flag.

Jakub Kicinski (10):
  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
  taskstats: move specifying netlink policy back to ops
  genetlink: use parsed attrs in dumppolicy
  genetlink: switch control commands to per-op policies
  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        |   8 +-
 fs/dlm/netlink.c                         |   6 +-
 include/net/genetlink.h                  |  67 +++++--
 include/net/netlink.h                    |   9 +-
 include/uapi/linux/genetlink.h           |   1 +
 kernel/taskstats.c                       |  40 +---
 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                  | 234 ++++++++++++++++-------
 net/netlink/policy.c                     |  29 +--
 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 +
 37 files changed, 346 insertions(+), 239 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2020-10-02 21:52 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 22:59 [PATCH net-next v2 00/10] genetlink: support per-command policy dump Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 01/10] genetlink: reorg struct genl_family Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 02/10] genetlink: add small version of ops Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 03/10] genetlink: move to smaller ops wherever possible Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 04/10] genetlink: add a structure for dump state Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 05/10] genetlink: use .start callback for dumppolicy Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 06/10] genetlink: bring back per op policy Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 07/10] taskstats: move specifying netlink policy back to ops Jakub Kicinski
2020-10-01 22:59 ` [PATCH net-next v2 08/10] genetlink: use parsed attrs in dumppolicy Jakub Kicinski
2020-10-02  6:30   ` Johannes Berg
2020-10-01 22:59 ` [PATCH net-next v2 09/10] genetlink: switch control commands to per-op policies Jakub Kicinski
2020-10-02  6:33   ` Johannes Berg
2020-10-01 22:59 ` [PATCH net-next v2 10/10] genetlink: allow dumping command-specific policy Jakub Kicinski
2020-10-02  6:34   ` Johannes Berg
2020-10-02  0:36 ` [PATCH net-next v2 00/10] genetlink: support per-command policy dump Jakub Kicinski
2020-10-02  6:29   ` Johannes Berg
2020-10-02 14:40     ` Jakub Kicinski
2020-10-02 14:42       ` Johannes Berg
2020-10-02 14:55         ` Jakub Kicinski
2020-10-02 14:58           ` Johannes Berg
2020-10-02 15:03             ` Jakub Kicinski
2020-10-02 15:04               ` Johannes Berg
2020-10-02 15:09                 ` Jakub Kicinski
2020-10-02 15:13                   ` Johannes Berg
2020-10-02 15:25                     ` Jakub Kicinski
2020-10-02 15:28                       ` Johannes Berg
2020-10-02 16:55                       ` Michal Kubecek
2020-10-02 20:07                       ` David Miller
2020-10-02 20:27                   ` Johannes Berg
2020-10-02 20:50                     ` Jakub Kicinski
2020-10-02 20:59                       ` Johannes Berg
2020-10-02 21:00                         ` Johannes Berg
2020-10-02 21:17                           ` Jakub Kicinski
2020-10-02 21:22                             ` Jakub Kicinski
2020-10-02 21:52                               ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.