1
0
Fork 0
remarkable-linux/net/dcb
Petr Machata 94f885db2a net: dcb: For wild-card lookups, use priority -1, not 0
[ Upstream commit 08193d1a89 ]

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: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-19 22:43:43 +02:00
..
Kconfig DCB: fix kconfig option 2008-11-25 01:02:08 -08:00
Makefile net_dcb: add application notifiers 2010-12-31 10:47:46 -08:00
dcbevent.c net/*: Fix FSF address in file headers 2013-12-06 12:37:57 -05:00
dcbnl.c net: dcb: For wild-card lookups, use priority -1, not 0 2018-09-19 22:43:43 +02:00