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 7d4f8d8.)
Signed-off-by: Vivien Didelot <[email protected]>
---
net/switchdev/switchdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index f01d340..84f77a0 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -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,
--
2.4.4
Tue, Jun 23, 2015 at 04:26:04PM CEST, [email protected] wrote:
>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 7d4f8d8.)
>
>Signed-off-by: Vivien Didelot <[email protected]>
Fixes: 8793d0a664a8 ("switchdev: add new switchdev_port_bridge_getlink")
Acked-by: Jiri Pirko <[email protected]>
On Tue, Jun 23, 2015 at 7:26 AM, Vivien Didelot
<[email protected]> wrote:
> 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 7d4f8d8.)
>
> Signed-off-by: Vivien Didelot <[email protected]>
Thanks for testing Vivien.
Acked-by: Scott Feldman <[email protected]>
From: Jiri Pirko <[email protected]>
Date: Tue, 23 Jun 2015 17:09:20 +0200
> Tue, Jun 23, 2015 at 04:26:04PM CEST, [email protected] wrote:
>>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 7d4f8d8.)
>>
>>Signed-off-by: Vivien Didelot <[email protected]>
>
> Fixes: 8793d0a664a8 ("switchdev: add new switchdev_port_bridge_getlink")
> Acked-by: Jiri Pirko <[email protected]>
Applied, thanks.