All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: switchdev: ignore unsupported bridge flags
@ 2015-06-23 14:26 Vivien Didelot
  2015-06-23 15:09 ` Jiri Pirko
  2015-06-23 16:36 ` Scott Feldman
  0 siblings, 2 replies; 4+ messages in thread
From: Vivien Didelot @ 2015-06-23 14:26 UTC (permalink / raw)
  To: netdev
  Cc: sfeldma, Jiri Pirko, David S. Miller, linux-kernel, kernel,
	Vivien Didelot

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 <vivien.didelot@savoirfairelinux.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: switchdev: ignore unsupported bridge flags
  2015-06-23 14:26 [PATCH] net: switchdev: ignore unsupported bridge flags Vivien Didelot
@ 2015-06-23 15:09 ` Jiri Pirko
  2015-06-24  8:07   ` David Miller
  2015-06-23 16:36 ` Scott Feldman
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2015-06-23 15:09 UTC (permalink / raw)
  To: Vivien Didelot; +Cc: netdev, sfeldma, David S. Miller, linux-kernel, kernel

Tue, Jun 23, 2015 at 04:26:04PM CEST, vivien.didelot@savoirfairelinux.com 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 <vivien.didelot@savoirfairelinux.com>

Fixes: 8793d0a664a8 ("switchdev: add new switchdev_port_bridge_getlink")
Acked-by: Jiri Pirko <jiri@resnulli.us>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: switchdev: ignore unsupported bridge flags
  2015-06-23 14:26 [PATCH] net: switchdev: ignore unsupported bridge flags Vivien Didelot
  2015-06-23 15:09 ` Jiri Pirko
@ 2015-06-23 16:36 ` Scott Feldman
  1 sibling, 0 replies; 4+ messages in thread
From: Scott Feldman @ 2015-06-23 16:36 UTC (permalink / raw)
  To: Vivien Didelot; +Cc: Netdev, Jiri Pirko, David S. Miller, linux-kernel, kernel

On Tue, Jun 23, 2015 at 7:26 AM, Vivien Didelot
<vivien.didelot@savoirfairelinux.com> 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 <vivien.didelot@savoirfairelinux.com>

Thanks for testing Vivien.

Acked-by: Scott Feldman <sfeldma@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: switchdev: ignore unsupported bridge flags
  2015-06-23 15:09 ` Jiri Pirko
@ 2015-06-24  8:07   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-06-24  8:07 UTC (permalink / raw)
  To: jiri; +Cc: vivien.didelot, netdev, sfeldma, linux-kernel, kernel

From: Jiri Pirko <jiri@resnulli.us>
Date: Tue, 23 Jun 2015 17:09:20 +0200

> Tue, Jun 23, 2015 at 04:26:04PM CEST, vivien.didelot@savoirfairelinux.com 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 <vivien.didelot@savoirfairelinux.com>
> 
> Fixes: 8793d0a664a8 ("switchdev: add new switchdev_port_bridge_getlink")
> Acked-by: Jiri Pirko <jiri@resnulli.us>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-24  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 14:26 [PATCH] net: switchdev: ignore unsupported bridge flags Vivien Didelot
2015-06-23 15:09 ` Jiri Pirko
2015-06-24  8:07   ` David Miller
2015-06-23 16:36 ` Scott Feldman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.