lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Retransmit too quick?


From: Sergio R. Caprile
Subject: Re: [lwip-users] Retransmit too quick?
Date: Fri, 10 Jul 2015 09:22:14 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

>    So I don't understand why calling sys_check_timeouts without any
> delay yields a poorer performance than calling it or tcp_tmr at 250ms
> pace.

Neither do I.
Either your port is broken or your code is not properly written and this
condition masks that out.

>    I think tcp_sent callback is only an option, not a requirement, in
> lwip.

You are free to think whatever you want. However, that doesn't
necessarily need to be correct.
Do you actually know TCP ? If you understand TCP, you'll understand why
tcp_sent() is not an option, unless you know exactly what you are doing.
Now, in my opinion, that is the reason why you are observing that
strange timer dependent performance change.

>    So I think it is OK to use the following flow:
>
>    use tcp_sndbuf to check available buffer
>    use tcp_write to write data to queue
>    finally use tcp_output to send out data asap.
>
>    Is my understanding correct?

No, afaik it is not.
TCP can't send more data than the receiver allows for, so if you don't
pay attention to the receiver's ACKs, you will end up with a full
buffer, won't be able to send anything, and will be wasting precious
time calling functions that can't do anything, hogging your CPU. Then,
automagically, you will adjust your timers and suddenly it somehow
approaches the receiver's ACK speed and you see an increase in performance.
Comer is your friend, Stallings too, be a good boy and read them.






reply via email to

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