Skip to content
  1. Oct 05, 2020
  2. Oct 04, 2020
  3. Oct 03, 2020
    • David S. Miller's avatar
      Merge branch 'genetlink-support-per-command-policy-dump' · 678cdd49
      David S. Miller authored
      
      
      Jakub Kicinski says:
      
      ====================
      genetlink: support per-command policy dump
      
      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 5 patches deal the dumping per-op policy.
      
      v3:
      
      The actually patch to dump per-op policy was taken out and
      will come in a series from Johannes, to make sure uAPI is
      consistent from the start.
      
      For dump-specific policies I think it should be fine to add
      a new pair of members to the "full" ops, and not overthink it.
      
      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.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      678cdd49
    • Jakub Kicinski's avatar
      genetlink: switch control commands to per-op policies · a4bb4f5f
      Jakub Kicinski authored
      
      
      In preparation for adding a new attribute to CTRL_CMD_GETPOLICY
      split the policies for getpolicy and getfamily apart.
      
      This will cause a slight user-visible change in that dumping
      the policies will switch from per family to per op, but
      supposedly sniffer-type applications (which are the main use
      case for policy dumping thus far) should support both, anyway.
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4bb4f5f