[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] Small request regarding autoip.h
From: |
Bill Auerbach |
Subject: |
RE: [lwip-devel] Small request regarding autoip.h |
Date: |
Wed, 14 Apr 2010 15:39:26 -0400 |
> Simon Goldschmidt:
>
>I guess for AutoIP, 250ms are OK: the minimum delay used is 1 second. We
>only have to keep an eye on the jitter: Currently, when we want to delay
>1 second, we might end up with 900ms (which is OK, I guess). However,
>when increasing the timer to 250ms, we could end up with a 750ms delay
>only, so we might have to increase ttw by one.
I don't see this much jitter - or it's not apparent :)
autoip->ttw = (u16_t)(LWIP_AUTOIP_RAND(netif) % (PROBE_WAIT *
AUTOIP_TICKS_PER_SECOND));
Doesn't it mean now ttw is 0 to 3 (it was 0 to 9 with AUTOIP_TMR_INTERVAL
100). I would think that changes from being 0 to 149 mS longer because of
the larger value.
I tested it with AUTOIP_TMR_INTERVAL set to 250 and the functionality is the
same. I didn't specifically time things, but the speed of AutoIP providing
an address was the same as determined by the speed of the debug message I
output. Because AutoIP takes so long, the change to the interval is likely
negligible in the end. I also had LWIP_DHCP_AUTOIP_COOP_TRIES set to 2 -
otherwise by default it is long enough for a user to think our product is
faulty because it doesn't connect. I'm of the opinion that the default of 9
for LWIP_DHCP_AUTOIP_COOP_TRIES is much too long. DHCP is in the order of a
couple of seconds, not a couple of 10's of seconds.
>For IGMP, I'm not totally sure: The protocol includes a "Max Response
>Time" given in 1/10 seconds (which is why the igmp_timer is set to
>100ms, I guess). However, I don't suspect it to be smaller than 250ms,
>so increasing the timer should be OK when the code is adjusted
>accordingly.
I would test this if I used it or if I knew what effect to look for by
changing the timer. It sounds like with 1/10th of seconds timing that it's
not a good candidate to change.
Did your timer additions do anything to handle the lwIP timer calls? Would
it be a nice feature to have a single function that monitors elapsed time
(in whatever resolution the user will call this function) and have this
feature make the appropriate calls at the right intervals to lwIP functions?
I do this but the time base is hard coded.
Thanks Simon!
Bill