• Jakub Kicinski's avatar
    genetlink: introduce split op representation · 20b0b53a
    Jakub Kicinski authored
    We currently have two forms of operations - small ops and "full" ops
    (or just ops). The former does not have pointers for some of the less
    commonly used features (namely dump start/done and policy).
    
    The "full" ops, however, still don't contain all the necessary
    information. In particular the policy is per command ID, while
    do and dump often accept different attributes. It's also not
    possible to define different pre_doit and post_doit callbacks
    for different commands within the family.
    
    At the same time a lot of commands do not support dumping and
    therefore all the dump-related information is wasted space.
    
    Create a new command representation which can hold info about
    a do implementation or a dump implementation, but not both at
    the same time.
    
    Use this new representation on the command execution path
    (genl_family_rcv_msg) as we either run a do or a dump and
    don't have to create a "full" op there.
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    20b0b53a
drop_monitor.c 41 KB