[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Antw: Re: [lwip-users] TCP retransmissions and some general question
From: |
Matthias Weisser |
Subject: |
Re: Antw: Re: [lwip-users] TCP retransmissions and some general questions |
Date: |
Wed, 20 Jun 2007 14:24:50 +0200 |
>>> Kieran Mansley <address@hidden> schrieb am 20.06.2007 um 13:41:
> On Wed, 2007-06-20 at 13:06 +0200, Matthias Weisser wrote:
>> >>> Kieran Mansley <address@hidden> schrieb am 20.06.2007 um 12:14:
>> > Were there any ACKs from the other side between the sending of the
>> > packet and its retransmission? If so, it could be fast retransmission
>>
>> No. There where no ACKs from the PC side.
>> BTW:
>> Its a simple echo server.
>>
>> > and not a problem. If not, it does seem a bit early. Perhaps you could
>> > send a wireshark/ethereal capture file to illustrate the problem?
>>
>> Attached to this mail you find a pcap file. 210 is the PC (echo
>> client) and 34 is the lwIP device running the echo server on port
>> 6666.
>
> Hmm, I'd agree with you that it looks like something is wrong. My first
> guess would be something to do with how the TCP timers are being called
> in your port, as it is that that controls the timing of retransmissions.
You are right. A had a quick look into the timer function calls in api/tcpip.c
and they get called way to fast. What can be the case for that? In
sys_arch_timeouts() I return a pointer to a sys_timeouts structure on a per
thread basis (using something like thread local storage) and thats all. I also
looked into the code where the actual waiting is done to realize the timeouts
but I couldn't find it.
Another point is: Maybe I still call the wrong init functions of lwIP. Here is
my init code:
sys_init();
mem_init();
memp_init();
pbuf_init();
netif_init();
tcpip_init(NULL, NULL);
lwip_socket_init();
netif_add(&nif, &ipaddr, &netmask, &gw, NULL, ethernetif_init,
tcpip_input);
netif_set_default(&nif);
netif_set_up(&nif);
Is there anything missing? Or do I have to wait for tcpip_init to be done
before calling any other functions of lwIP?
Matthias