public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* Cannot set ageing to zero
@ 2016-01-26 17:26 Flavio Leitner
  2016-01-26 17:30 ` Jiri Pirko
  0 siblings, 1 reply; 4+ messages in thread
From: Flavio Leitner @ 2016-01-26 17:26 UTC (permalink / raw)
  To: netdev, Scott Feldman; +Cc: Jiri Pirko


Hi,

After the commit[1] below, we can't set ageing on a Linux bridge device
to zero.  It seems rocker needs the minimum value, but we can't break
an old and valid Linux bridge behavior. 

[1] commit c62987bbd8a1a1664f99e89e3959339350a6131e
Author: Scott Feldman <sfeldma@gmail.com>
Date:   Thu Oct 8 19:23:19 2015 -0700

    bridge: push bridge setting ageing_time down to switchdev
    
    Use SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that
    don't support setting ageing_time (or setting bridge attrs in
    general). 
    If push fails, don't update ageing_time in bridge and return err to
    user. 
    If push succeeds, update ageing_time in bridge and run gc_timer now
    to recalabrate when to run gc_timer next, based on new ageing_time.
    
    Signed-off-by: Scott Feldman <sfeldma@gmail.com>
    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
    Acked-by: Jiri Pirko <jiri@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>


-- 
fbl

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

* Re: Cannot set ageing to zero
  2016-01-26 17:26 Cannot set ageing to zero Flavio Leitner
@ 2016-01-26 17:30 ` Jiri Pirko
  2016-01-26 17:44   ` Flavio Leitner
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2016-01-26 17:30 UTC (permalink / raw)
  To: Flavio Leitner; +Cc: netdev, Scott Feldman

Tue, Jan 26, 2016 at 06:26:30PM CET, fbl@sysclose.org wrote:
>
>Hi,
>
>After the commit[1] below, we can't set ageing on a Linux bridge device
>to zero.  It seems rocker needs the minimum value, but we can't break
>an old and valid Linux bridge behavior. 

The commit below adds check if the value being set is within
BR_MIN_AGEING_TIME and BR_MAX_AGEING_TIME. I believe that the check is
correct as it implements the standard.

Why do you set ageing_time to 0? Why don't just just disable learning?


>
>[1] commit c62987bbd8a1a1664f99e89e3959339350a6131e
>Author: Scott Feldman <sfeldma@gmail.com>
>Date:   Thu Oct 8 19:23:19 2015 -0700
>
>    bridge: push bridge setting ageing_time down to switchdev
>    
>    Use SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that
>    don't support setting ageing_time (or setting bridge attrs in
>    general). 
>    If push fails, don't update ageing_time in bridge and return err to
>    user. 
>    If push succeeds, update ageing_time in bridge and run gc_timer now
>    to recalabrate when to run gc_timer next, based on new ageing_time.
>    
>    Signed-off-by: Scott Feldman <sfeldma@gmail.com>
>    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>    Acked-by: Jiri Pirko <jiri@mellanox.com>
>    Signed-off-by: David S. Miller <davem@davemloft.net>
>
>
>-- 
>fbl
>

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

* Re: Cannot set ageing to zero
  2016-01-26 17:30 ` Jiri Pirko
@ 2016-01-26 17:44   ` Flavio Leitner
  2016-01-26 17:48     ` Jiri Pirko
  0 siblings, 1 reply; 4+ messages in thread
From: Flavio Leitner @ 2016-01-26 17:44 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, Scott Feldman

On Tue, 26 Jan 2016 18:30:41 +0100
Jiri Pirko <jiri@resnulli.us> wrote:

> Tue, Jan 26, 2016 at 06:26:30PM CET, fbl@sysclose.org wrote:
> >
> >Hi,
> >
> >After the commit[1] below, we can't set ageing on a Linux bridge
> >device to zero.  It seems rocker needs the minimum value, but we
> >can't break an old and valid Linux bridge behavior.   
> 
> The commit below adds check if the value being set is within
> BR_MIN_AGEING_TIME and BR_MAX_AGEING_TIME. I believe that the check is
> correct as it implements the standard.
>
> Why do you set ageing_time to 0? Why don't just just disable learning?

It's a documented behavior:
http://www.linuxcertif.com/man/5/ifcfg-bridge/
http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
http://comments.gmane.org/gmane.linux.network.bridge/2060

fbl

> 
> 
> >
> >[1] commit c62987bbd8a1a1664f99e89e3959339350a6131e
> >Author: Scott Feldman <sfeldma@gmail.com>
> >Date:   Thu Oct 8 19:23:19 2015 -0700
> >
> >    bridge: push bridge setting ageing_time down to switchdev
> >    
> >    Use SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that
> >    don't support setting ageing_time (or setting bridge attrs in
> >    general). 
> >    If push fails, don't update ageing_time in bridge and return err
> > to user. 
> >    If push succeeds, update ageing_time in bridge and run gc_timer
> > now to recalabrate when to run gc_timer next, based on new
> > ageing_time. 
> >    Signed-off-by: Scott Feldman <sfeldma@gmail.com>
> >    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> >    Acked-by: Jiri Pirko <jiri@mellanox.com>
> >    Signed-off-by: David S. Miller <davem@davemloft.net>
> >
> >
> >-- 
> >fbl
> >  



-- 
fbl

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

* Re: Cannot set ageing to zero
  2016-01-26 17:44   ` Flavio Leitner
@ 2016-01-26 17:48     ` Jiri Pirko
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2016-01-26 17:48 UTC (permalink / raw)
  To: Flavio Leitner; +Cc: netdev, Scott Feldman

Tue, Jan 26, 2016 at 06:44:24PM CET, fbl@sysclose.org wrote:
>On Tue, 26 Jan 2016 18:30:41 +0100
>Jiri Pirko <jiri@resnulli.us> wrote:
>
>> Tue, Jan 26, 2016 at 06:26:30PM CET, fbl@sysclose.org wrote:
>> >
>> >Hi,
>> >
>> >After the commit[1] below, we can't set ageing on a Linux bridge
>> >device to zero.  It seems rocker needs the minimum value, but we
>> >can't break an old and valid Linux bridge behavior.   
>> 
>> The commit below adds check if the value being set is within
>> BR_MIN_AGEING_TIME and BR_MAX_AGEING_TIME. I believe that the check is
>> correct as it implements the standard.
>>
>> Why do you set ageing_time to 0? Why don't just just disable learning?
>
>It's a documented behavior:
>http://www.linuxcertif.com/man/5/ifcfg-bridge/
>http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
>http://comments.gmane.org/gmane.linux.network.bridge/2060

0 makes entries permanent. Fair enough. Feel free to send patch moving
the check inside switchdev_port_attr_set or into drivers. I can put it
in my todo list if you want.

Thanks!


>
>fbl
>
>> 
>> 
>> >
>> >[1] commit c62987bbd8a1a1664f99e89e3959339350a6131e
>> >Author: Scott Feldman <sfeldma@gmail.com>
>> >Date:   Thu Oct 8 19:23:19 2015 -0700
>> >
>> >    bridge: push bridge setting ageing_time down to switchdev
>> >    
>> >    Use SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that
>> >    don't support setting ageing_time (or setting bridge attrs in
>> >    general). 
>> >    If push fails, don't update ageing_time in bridge and return err
>> > to user. 
>> >    If push succeeds, update ageing_time in bridge and run gc_timer
>> > now to recalabrate when to run gc_timer next, based on new
>> > ageing_time. 
>> >    Signed-off-by: Scott Feldman <sfeldma@gmail.com>
>> >    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>> >    Acked-by: Jiri Pirko <jiri@mellanox.com>
>> >    Signed-off-by: David S. Miller <davem@davemloft.net>
>> >
>> >
>> >-- 
>> >fbl
>> >  
>
>
>
>-- 
>fbl
>

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

end of thread, other threads:[~2016-01-26 17:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 17:26 Cannot set ageing to zero Flavio Leitner
2016-01-26 17:30 ` Jiri Pirko
2016-01-26 17:44   ` Flavio Leitner
2016-01-26 17:48     ` Jiri Pirko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox