[ Upstream commit 08193d1a893c802c4b807e4d522865061f4e9f4f ]
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
Fix by changing the wild-card value to -1.
Signed-off-by: Petr Machata <firstname.lastname@example.org>
Signed-off-by: Ido Schimmel <email@example.com>
Signed-off-by: David S. Miller <firstname.lastname@example.org>
Signed-off-by: Sasha Levin <email@example.com>
Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>