mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
bridge: use BR_ADMIN_COST_BIT
Use set_bit() and test_bit() lockless functions. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/20260604141343.2124500-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f8bcd30757
commit
2013ebb9b3
|
|
@ -76,7 +76,7 @@ void br_port_carrier_check(struct net_bridge_port *p, bool *notified)
|
|||
struct net_device *dev = p->dev;
|
||||
struct net_bridge *br = p->br;
|
||||
|
||||
if (!(p->flags & BR_ADMIN_COST) &&
|
||||
if (!test_bit(BR_ADMIN_COST_BIT, &p->flags) &&
|
||||
netif_running(dev) && netif_oper_up(dev))
|
||||
p->path_cost = port_cost(dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ int br_stp_set_path_cost(struct net_bridge_port *p, unsigned long path_cost)
|
|||
path_cost > BR_MAX_PATH_COST)
|
||||
return -ERANGE;
|
||||
|
||||
p->flags |= BR_ADMIN_COST;
|
||||
set_bit(BR_ADMIN_COST_BIT, &p->flags);
|
||||
p->path_cost = path_cost;
|
||||
br_configuration_update(p->br);
|
||||
br_port_state_selection(p->br);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user