• Jakub Kicinski's avatar
    ethtool: specify which header flags are supported per command · a0de1cd3
    Jakub Kicinski authored
    Perform header flags validation through the policy.
    
    Only pause command supports ETHTOOL_FLAG_STATS. Create a separate
    policy to be able to express that in policy dumps to user space.
    
    Note that even though the core will validate the header policy,
    it cannot record multiple layers of attributes and we have to
    re-parse header sub-attrs. When doing so we could skip attribute
    validation, or use most permissive policy. Opt for the former.
    
    We will no longer return the extack cookie for flags but since
    we only added first new flag in this release it's not expected
    that any user space had a chance to make use of it.
    
    v2: - remove the re-validation in ethnl_parse_header_dev_get()
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a0de1cd3
netlink.h 15.5 KB