lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 5 Mar 2012 09:09:43 +0100
From:	Joakim Tjernlund <joakim.tjernlund@...nsmode.se>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] bridge: Adjust min age inc for HZ > 256

Stephen Hemminger <shemminger@...tta.com> wrote on 2012/03/05 06:03:50:
>
> On Thu, 1 Mar 2012 19:12:18 +0100
> Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se> wrote:
>
> > min age increment needs to round up its min age tick for all
> > HZ values to guarantee message age is increasing.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>
> > ---
> >
> > The bridge list seems very slow so try netdev instead.
> >
> >  net/bridge/br_stp.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
> > index a04eeb6..9a8aebd 100644
> > --- a/net/bridge/br_stp.c
> > +++ b/net/bridge/br_stp.c
> > @@ -17,9 +17,9 @@
> >  #include "br_private_stp.h"
> >
> >  /* since time values in bpdu are in jiffies and then scaled (1/256)
> > - * before sending, make sure that is at least one.
> > + * before sending, make sure that is at least one STP tick.
> >   */
> > -#define MESSAGE_AGE_INCR   ((HZ < 256) ? 1 : (HZ/256))
> > +#define MESSAGE_AGE_INCR   ((HZ / 256) + 1)
> >
> >  static const char *const br_port_state_names[] = {
> >     [BR_STATE_DISABLED] = "disabled",
>
> I don't understand why this is required.
>   HZ = 100 then incr = 1
>   HZ = 1000 then incr = 3 (your patch would make it for 4).

Since message age is rounded down, DIV_ROUND_UP(ticks * HZ, STP_HZ), I wanted
to make sure that message age won't decrease or stay the same by adding at least one
STP tick. We did see such age times when we were debugging this. They went away with
both patches applied so there is a chance that only patch 2 is strictly required but
I did not test that combo.

 Jocke

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ