qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/16] slirp: Adding IPv6, ICMPv6 Echo and NDP a


From: Samuel Thibault
Subject: Re: [Qemu-devel] [PATCH 04/16] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration
Date: Thu, 24 Oct 2013 00:49:44 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Paolo Bonzini, le Wed 23 Oct 2013 08:51:21 +0100, a écrit :
> > +void icmp6_init(Slirp *slirp)
> > +{
> > +    srand(time(NULL));
> > +    ra_timer = timer_new_s(QEMU_CLOCK_VIRTUAL, ra_timer_handler, slirp);
> > +    timer_mod(ra_timer, qemu_clock_get_s(QEMU_CLOCK_VIRTUAL) + 
> > NDP_Interval);
> > +}
> 
> Should the granularity of the timer really be seconds?  Or should you
> use the existing milli/nanosecond interface and scale the interval, so
> that you really get a uniformly distributed random value, even for very
> small MaxRtrAdvInterval (e.g. for min=3, max=4 you won't get any other
> value than 3 or 4, which is not really uniformly distributed).

I don't think we need to care about fine granularity. We are not going
to run more than one RA anyway.

Actually, the RFC itself says that when the max value is less than 9,
the default for the min value would be equal to the max value, i.e. the
delay being always just the same.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]