[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201203051215.38210.vitas@nppfactor.kiev.ua>
Date: Mon, 5 Mar 2012 12:15:37 +0200
From: Vitalii Demianets <vitas@...factor.kiev.ua>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>,
netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] bridge: Adjust min age inc for HZ > 256
On Monday 05 March 2012 07:03:50 Stephen Hemminger wrote:
> >
> > /* 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).
And then we have in br_transmit_config():
bpdu.message_age = (jiffies - root->designated_age)
+ MESSAGE_AGE_INCR;
So in the corner case when jiffies == root->designated_age the message age
increase only by 3 (when HZ=1000).
Then, in br_set_ticks() we have:
ticks = (STP_HZ * j)/ HZ;
So, again in the corner case, the increase in age is (256*3)/1000 == 0.
That's the case Joakim wanted to avoid.
--
Vitalii Demianets
--
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