Skip to content
  • Michal Kubecek's avatar
    ethtool: add ethnl_parse_bitset() helper · 88db6d1e
    Michal Kubecek authored
    
    
    Unlike other SET type commands, modifying netdev features is required to
    provide a reply telling userspace what was actually changed, compared to
    what was requested. For that purpose, the "modified" flag provided by
    ethnl_update_bitset() is not sufficient, we need full information which
    bits were requested to change.
    
    Therefore provide ethnl_parse_bitset() returning effective value and mask
    bitmaps equivalent to the contents of a bitset nested attribute.
    
    v2: use non-atomic __set_bit() (suggested by David Miller)
    
    Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    88db6d1e