bridge: push bridge setting ageing_time down to switchdev
Use SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that don't support setting ageing_time (or setting bridge attrs in general). If push fails, don't update ageing_time in bridge and return err to user. If push succeeds, update ageing_time in bridge and run gc_timer now to recalabrate when to run gc_timer next, based on new ageing_time. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
464314ea6c
commit
c62987bbd8
@@ -870,9 +870,9 @@ static int br_changelink(struct net_device *brdev, struct nlattr *tb[],
|
||||
}
|
||||
|
||||
if (data[IFLA_BR_AGEING_TIME]) {
|
||||
u32 ageing_time = nla_get_u32(data[IFLA_BR_AGEING_TIME]);
|
||||
|
||||
br->ageing_time = clock_t_to_jiffies(ageing_time);
|
||||
err = br_set_ageing_time(br, nla_get_u32(data[IFLA_BR_AGEING_TIME]));
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (data[IFLA_BR_STP_STATE]) {
|
||||
|
Reference in New Issue
Block a user