提交 5c8079d0 编写于 作者: V Vivien Didelot 提交者: David S. Miller

net: switchdev: ignore unsupported bridge flags

switchdev_port_bridge_getlink() queries SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS
attributes, but a driver doesn't need to implement this in order to get
bridge link information.

So error out only on errors different than -EOPNOTSUPP.

(This is a follow-up patch for 7d4f8d87.)

Fixes: 8793d0a6 ("switchdev: add new switchdev_port_bridge_getlink")
Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: NJiri Pirko <jiri@resnulli.us>
Acked-by: NScott Feldman <sfeldma@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bd049a90
......@@ -532,7 +532,7 @@ int switchdev_port_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
int err;
err = switchdev_port_attr_get(dev, &attr);
if (err)
if (err && err != -EOPNOTSUPP)
return err;
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册