[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Crash in ip_init and very slow ping times
From: |
Leon Woestenberg |
Subject: |
Re: [lwip-users] Crash in ip_init and very slow ping times |
Date: |
Mon, 03 May 2004 20:16:58 +0200 |
User-agent: |
Mozilla Thunderbird 0.5 (Windows/20040207) |
Hello Eric,
Eric Shufro wrote:
I have lwip 7.1 working (barely) with ucos-ii and a Motorola hcs12
micro-controller. I have some questions.
>
> First, it crashes within ip_init when a dhcp response arrives.
ip_init() is empty, there is nothing that could crash there.
void ip_init(void) { }
I noticed ip_init checks to see if netif == NULL and in this case, the
netif is not null.
You probably mean some other function. Could you re-cap on this please?
Why would lwip check for a null netif when receiving a dhcp response
message?
Idem.
Also, I know this may be more of an open ended question, but why on
earth are the ping times soooo slow!?
How slow? Should be a few ms for any general microcontroller or processor.
When I wrote a custom protocol stack in motorola assembly, I was getting
ping times of <1ms on the same hardware platform. Additionally, when I
look at the cpu utilization, it doesn’t seem very busy, even when
generating responses.
You should merely find minor overhead from C versus assembly, and so
your ping times should be approx. 1 ms as well with lwIP.
lwIP does the minimal stuff *required* by any TCP/IP stack, and cannot
be very much more optimized in its code paths, except for replacing
linear search loops by smarter algorithms.
Regards,
Leon.