Cannot set ageing to zero
Subsystems (2)
Flavio Leitner
Acked-by Jiri PirkoHi,
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 <[email protected]> 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.
Signature · 1 line
fbl
Quoted 6 lines · Tue, Jan 26, 2016 at 06:26:30PM CET, [email protected] 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?
Quoted 24 lines
[1] commit
c62987bbd8a1a1664f99e89e3959339350a6131eAuthor: Scott Feldman <[email protected]> Date: Thu Oct 8 19:23:19 2015 -0700bridge: push bridge setting
ageing_timedown to switchdevUse
SWITCHDEV_F_SKIP_EOPNOTSUPPto skip over ports in bridge that don't support settingageing_time(or setting bridge attrs in general).
If push fails, don't updateageing_timein bridge and return err to user.
If push succeeds, updateageing_timein bridge and rungc_timernow to recalabrate when to rungc_timernext, based on newageing_time.Signed-off-by Scott Feldman <[email protected]>Signed-off-by Jiri Pirko <[email protected]>Acked-by Jiri Pirko <[email protected]>Signed-off-by David S. Miller <[email protected]>Signature · 1 line
fbl
Quoted 8 lines · On Tue, 26 Jan 2016 18:30:41 +0100 Jiri Pirko <[email protected]> wrote:
Quoted 6 lines · Tue, Jan 26, 2016 at 06:26:30PM CET, [email protected] 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.
Quoted 5 lines
The commit below adds check if the value being set is within
BR_MIN_AGEING_TIMEandBR_MAX_AGEING_TIME. I believe that the check is correct as it implements the standard.Why do you set
ageing_timeto 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
Quoted 26 lines
Quoted 26 lines
[1] commit
c62987bbd8a1a1664f99e89e3959339350a6131eAuthor: Scott Feldman <[email protected]> Date: Thu Oct 8 19:23:19 2015 -0700bridge: push bridge setting
ageing_timedown to switchdevUse
SWITCHDEV_F_SKIP_EOPNOTSUPPto skip over ports in bridge that don't support settingageing_time(or setting bridge attrs in general).
If push fails, don't updateageing_timein bridge and return err
to user.
If push succeeds, updateageing_timein bridge and rungc_timer
now to recalabrate when to rungc_timernext, based on newageing_time.Signed-off-by Scott Feldman <[email protected]>Signed-off-by Jiri Pirko <[email protected]>Acked-by Jiri Pirko <[email protected]>Signed-off-by David S. Miller <[email protected]>Signature · 1 line
fbl
Signature · 1 line
fbl
Quoted 15 lines · Tue, Jan 26, 2016 at 06:44:24PM CET, [email protected] wrote:
Quoted 12 lines · On Tue, 26 Jan 2016 18:30:41 +0100 Jiri Pirko <[email protected]> wrote:
Quoted 6 lines · Tue, Jan 26, 2016 at 06:26:30PM CET, [email protected] 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_TIMEandBR_MAX_AGEING_TIME. I believe that the check is correct as it implements the standard.
Quoted 6 lines
Quoted 1 line
Why do you set
ageing_timeto 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!
Quoted 35 lines
fbl
Quoted 26 lines
Quoted 26 lines
[1] commit
c62987bbd8a1a1664f99e89e3959339350a6131eAuthor: Scott Feldman <[email protected]> Date: Thu Oct 8 19:23:19 2015 -0700bridge: push bridge setting
ageing_timedown to switchdevUse
SWITCHDEV_F_SKIP_EOPNOTSUPPto skip over ports in bridge that don't support settingageing_time(or setting bridge attrs in general).
If push fails, don't updateageing_timein bridge and return err
to user.
If push succeeds, updateageing_timein bridge and rungc_timer
now to recalabrate when to rungc_timernext, based on newageing_time.Signed-off-by Scott Feldman <[email protected]>Signed-off-by Jiri Pirko <[email protected]>Acked-by Jiri Pirko <[email protected]>Signed-off-by David S. Miller <[email protected]>Signature · 1 line
fblSignature · 1 line
fbl