lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip-users Digest, Vol 143, Issue 10


From: Xun Chen
Subject: Re: [lwip-users] lwip-users Digest, Vol 143, Issue 10
Date: Wed, 22 Jul 2015 09:41:56 -0400
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Hi Sergio,

I took your suggestion of only sending out more data in tcp_sent callbak and rewrite the codes

And I run into another problem: The data stream is very jerky (I am streaming 200kb/s)

So I used a scope to see how often the tcp_sent callback is invoked, it turns out:

I will get about 10-20 callbacks within a short burst of 5 to 10ms, then there is NO callback for 200ms, then repeat

I tried to tune lwip based on various previous suggestions on the forum and didn't have much luck.

With this callback frequency, it is impossible to plot data in real time smoothly (data acquisition application)

Any suggestion? Thanks!

Chen

On 7/11/2015 12:00 PM, address@hidden wrote:
Send lwip-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.nongnu.org/mailman/listinfo/lwip-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."


Today's Topics:

    1. Re: Retransmit too quick? (Sergio R. Caprile)


----------------------------------------------------------------------

Message: 1
Date: Fri, 10 Jul 2015 13:31:37 -0300
From: "Sergio R. Caprile" <address@hidden>
To: address@hidden
Subject: Re: [lwip-users] Retransmit too quick?
Message-ID: <address@hidden>
Content-Type: text/plain; charset=utf-8

The RAW API is event driven code.
The ACK is handled as an ACK by lwIP. This means the window is updated,
the sent pbufs are freed, and you can send data again.
You can't send more data until you receive an ACK for your window size.
You can't queue more data until lwIP frees pbus (when you receive an ACK).
There is no point in calling the send function when you don't have room
to queue/send more data, this causes CPU hog.
There is no point in calling the send function at specific intervals
(assuming you need to send a big bunch of data); if the ACK gets
received in between the interval, you'll have dead times where nothing
is sent.
The write time to call the send function is when the sent callback is fired.
You are free to choose and write your app the way you want; but, if it
does not work and you ask for help...
Good luck.





reply via email to

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