Skip to content
  • Petr Machata's avatar
    net: dcb: For wild-card lookups, use priority -1, not 0 · 08193d1a
    Petr Machata authored
    
    
    The function dcb_app_lookup walks the list of specified DCB APP entries,
    looking for one that matches a given criteria: ifindex, selector,
    protocol ID and optionally also priority. The "don't care" value for
    priority is set to 0, because that priority has not been allowed under
    CEE regime, which predates the IEEE standardization.
    
    Under IEEE, 0 is a valid priority number. But because dcb_app_lookup
    considers zero a wild card, attempts to add an APP entry with priority 0
    fail when other entries exist for a given ifindex / selector / PID
    triplet.
    
    Fix by changing the wild-card value to -1.
    
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    08193d1a