Re: [PATCH net] switchdev: bridge: Check return code is not EOPNOTSUPP

2015-11-16 Thread David Miller
From: Ido Schimmel 
Date: Fri, 13 Nov 2015 13:06:12 +0200

> When NET_SWITCHDEV=n, switchdev_port_attr_set simply returns EOPNOTSUPP.
> In this case we should not emit errors and warnings to the kernel log.
> 
> Reported-by: Sander Eikelenboom 
> Fixes: 0bc05d585d38 ("switchdev: allow caller to explicitly request
> attr_set as deferred")
> Fixes: 6ac311ae8bfb ("Adding switchdev ageing notification on port
> bridged")
> Signed-off-by: Ido Schimmel 
> Signed-off-by: Jiri Pirko 

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH net] switchdev: bridge: Check return code is not EOPNOTSUPP

2015-11-13 Thread Ido Schimmel
When NET_SWITCHDEV=n, switchdev_port_attr_set simply returns EOPNOTSUPP.
In this case we should not emit errors and warnings to the kernel log.

Reported-by: Sander Eikelenboom 
Fixes: 0bc05d585d38 ("switchdev: allow caller to explicitly request
attr_set as deferred")
Fixes: 6ac311ae8bfb ("Adding switchdev ageing notification on port
bridged")
Signed-off-by: Ido Schimmel 
Signed-off-by: Jiri Pirko 
---
 net/bridge/br_stp.c| 2 +-
 net/bridge/br_stp_if.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index f7e8dee..5f3f645 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -48,7 +48,7 @@ void br_set_state(struct net_bridge_port *p, unsigned int 
state)
 
p->state = state;
err = switchdev_port_attr_set(p->dev, );
-   if (err)
+   if (err && err != -EOPNOTSUPP)
br_warn(p->br, "error setting offload STP state on port 
%u(%s)\n",
(unsigned int) p->port_no, p->dev->name);
 }
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index fa53d7a..5396ff08 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -50,7 +50,7 @@ void br_init_port(struct net_bridge_port *p)
p->config_pending = 0;
 
err = switchdev_port_attr_set(p->dev, );
-   if (err)
+   if (err && err != -EOPNOTSUPP)
netdev_err(p->dev, "failed to set HW ageing time\n");
 }
 
-- 
2.4.10

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net] switchdev: bridge: Check return code is not EOPNOTSUPP

2015-11-13 Thread Sander Eikelenboom

On 2015-11-13 12:06, Ido Schimmel wrote:
When NET_SWITCHDEV=n, switchdev_port_attr_set simply returns 
EOPNOTSUPP.

In this case we should not emit errors and warnings to the kernel log.


Hi Ido,

Thanks for your patch!

It fixes these:
[  207.245442] vif vif-1-0 vif1.0: failed to set HW ageing time
[  207.245443] xen_bridge: error setting offload STP state on 
port1(vif1.0)


But i still have these:
[  335.412194] vif19.0-emu: set_features() failed (-1); wanted 
0x008048c1, left 0x0080001b48c9
[  335.412204] vif19.0-emu: set_features() failed (-1); wanted 
0x008048c1, left 0x0080001b48c9
[  335.412311] vif19.0-emu: set_features() failed (-1); wanted 
0x008248c9, left 0x0080001b48c9
[  335.412319] vif19.0-emu: set_features() failed (-1); wanted 
0x008048c1, left 0x0080001b48c9
[  335.412326] vif19.0-emu: set_features() failed (-1); wanted 
0x008048c1, left 0x0080001b48c9
[  335.535955] vif vif-19-0 vif19.0: set_features() failed (-1); wanted 
0x00044803, left 0x000400114813
[  335.535965] vif vif-19-0 vif19.0: set_features() failed (-1); wanted 
0x00044803, left 0x000400114813
[  335.615392] vif vif-19-0 vif19.0: set_features() failed (-1); wanted 
0x00044803, left 0x000400114813
[  335.615401] xen_bridge: set_features() failed (-1); wanted 
0x00801fdb78c9, left 0x00801fff78e9


--
Sander


Reported-by: Sander Eikelenboom 
Fixes: 0bc05d585d38 ("switchdev: allow caller to explicitly request
attr_set as deferred")
Fixes: 6ac311ae8bfb ("Adding switchdev ageing notification on port
bridged")
Signed-off-by: Ido Schimmel 
Signed-off-by: Jiri Pirko 
---
 net/bridge/br_stp.c| 2 +-
 net/bridge/br_stp_if.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index f7e8dee..5f3f645 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -48,7 +48,7 @@ void br_set_state(struct net_bridge_port *p,
unsigned int state)

p->state = state;
err = switchdev_port_attr_set(p->dev, );
-   if (err)
+   if (err && err != -EOPNOTSUPP)
br_warn(p->br, "error setting offload STP state on port 
%u(%s)\n",
(unsigned int) p->port_no, p->dev->name);
 }
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index fa53d7a..5396ff08 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -50,7 +50,7 @@ void br_init_port(struct net_bridge_port *p)
p->config_pending = 0;

err = switchdev_port_attr_set(p->dev, );
-   if (err)
+   if (err && err != -EOPNOTSUPP)
netdev_err(p->dev, "failed to set HW ageing time\n");
 }


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net] switchdev: bridge: Check return code is not EOPNOTSUPP

2015-11-13 Thread Ido Schimmel
Fri, Nov 13, 2015 at 02:34:45PM IST, li...@eikelenboom.it wrote:
>On 2015-11-13 12:06, Ido Schimmel wrote:
>> When NET_SWITCHDEV=n, switchdev_port_attr_set simply returns 
>> EOPNOTSUPP.
>> In this case we should not emit errors and warnings to the kernel log.
>
>Hi Ido,
>
>Thanks for your patch!
>
>It fixes these:
>[  207.245442] vif vif-1-0 vif1.0: failed to set HW ageing time
>[  207.245443] xen_bridge: error setting offload STP state on 
>port1(vif1.0)
>
>But i still have these:
>[  335.412194] vif19.0-emu: set_features() failed (-1); wanted 
>0x008048c1, left 0x0080001b48c9
>[  335.412204] vif19.0-emu: set_features() failed (-1); wanted 
>0x008048c1, left 0x0080001b48c9
>[  335.412311] vif19.0-emu: set_features() failed (-1); wanted 
>0x008248c9, left 0x0080001b48c9
>[  335.412319] vif19.0-emu: set_features() failed (-1); wanted 
>0x008048c1, left 0x0080001b48c9
>[  335.412326] vif19.0-emu: set_features() failed (-1); wanted 
>0x008048c1, left 0x0080001b48c9
>[  335.535955] vif vif-19-0 vif19.0: set_features() failed (-1); wanted 
>0x00044803, left 0x000400114813
>[  335.535965] vif vif-19-0 vif19.0: set_features() failed (-1); wanted 
>0x00044803, left 0x000400114813
>[  335.615392] vif vif-19-0 vif19.0: set_features() failed (-1); wanted 
>0x00044803, left 0x000400114813
>[  335.615401] xen_bridge: set_features() failed (-1); wanted 
>0x00801fdb78c9, left 0x00801fff78e9
>

Yes, this is a different issue and I see that Nik is already working on
it. Can you please try his patch?

http://patchwork.ozlabs.org/patch/544242/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net] switchdev: bridge: Check return code is not EOPNOTSUPP

2015-11-13 Thread Sander Eikelenboom

On 2015-11-13 13:43, Ido Schimmel wrote:

Fri, Nov 13, 2015 at 02:34:45PM IST, li...@eikelenboom.it wrote:

On 2015-11-13 12:06, Ido Schimmel wrote:

When NET_SWITCHDEV=n, switchdev_port_attr_set simply returns
EOPNOTSUPP.
In this case we should not emit errors and warnings to the kernel 
log.


Hi Ido,

Thanks for your patch!

It fixes these:
[  207.245442] vif vif-1-0 vif1.0: failed to set HW ageing time
[  207.245443] xen_bridge: error setting offload STP state on
port1(vif1.0)

But i still have these:
[  335.412194] vif19.0-emu: set_features() failed (-1); wanted
0x008048c1, left 0x0080001b48c9
[  335.412204] vif19.0-emu: set_features() failed (-1); wanted
0x008048c1, left 0x0080001b48c9
[  335.412311] vif19.0-emu: set_features() failed (-1); wanted
0x008248c9, left 0x0080001b48c9
[  335.412319] vif19.0-emu: set_features() failed (-1); wanted
0x008048c1, left 0x0080001b48c9
[  335.412326] vif19.0-emu: set_features() failed (-1); wanted
0x008048c1, left 0x0080001b48c9
[  335.535955] vif vif-19-0 vif19.0: set_features() failed (-1); 
wanted

0x00044803, left 0x000400114813
[  335.535965] vif vif-19-0 vif19.0: set_features() failed (-1); 
wanted

0x00044803, left 0x000400114813
[  335.615392] vif vif-19-0 vif19.0: set_features() failed (-1); 
wanted

0x00044803, left 0x000400114813
[  335.615401] xen_bridge: set_features() failed (-1); wanted
0x00801fdb78c9, left 0x00801fff78e9



Yes, this is a different issue and I see that Nik is already working on
it. Can you please try his patch?

http://patchwork.ozlabs.org/patch/544242/


Yeah that suppresses the warning, thx !

--
Sander
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html