Commit df371b19 authored by Haishuang Yan's avatar Haishuang Yan Committed by Greg Kroah-Hartman

bridge: Allow set bridge ageing time when switchdev disabled

[ Upstream commit 5e263f71 ]

When NET_SWITCHDEV=n, switchdev_port_attr_set will return -EOPNOTSUPP,
we should ignore this error code and continue to set the ageing time.

Fixes: c62987bb ("bridge: push bridge setting ageing_time down to switchdev")
Signed-off-by: default avatarHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Acked-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 26dd42eb
......@@ -586,7 +586,7 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
int err;
err = switchdev_port_attr_set(br->dev, &attr);
if (err)
if (err && err != -EOPNOTSUPP)
return err;
br->ageing_time = t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment