lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Delayed ACKs


From: Sergio R. Caprile
Subject: Re: [lwip-users] Delayed ACKs
Date: Mon, 1 Feb 2016 09:58:23 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

> There are restrictions on threading, and that depends on the API you
> use, and if you use NO_SYS=0 or =1.

lwIP is single-threaded, you can't call the RAW API functions from the
main loop and an interrupt handler. Some functions are safe, but the
general rule is to avoid the easy shortcut of pushing incoming frames
from the Eth chip handler.
The socket API and the netconn API do not present this restriction (and
that is all I know about them).
Since you have NO_SYS=0 and an OS, you should check how your OS amd your
port handle the polling and frame extraction from the Eth chip. I didn't
really dig into your problem but since you report problems at low delay
multiframe input, that looks consistent with the typical problem:
 a frame arrives
 the chip signals a frame has arrived
 the OS fires a task to poll the chip
 the task extracts the frame out
however, if another frame comes in before the first one is extracted,
the chip might not signal for a new frame arrival, since it already has one.
The driver must extract all frames inside the chip, and many driver
writers do not do this.
 a frame arrives
 the chip signals a frame has arrived
 the OS fires a task to poll the chip
 another frame arrives
 the task extracts the first frame out
 the second frame stays there until a third frame arrives, one of the
frames can be lost or overwritten.

Search the list on this subject, there are some examples on this bug. It
may or not apply to your problem, but my best guess is to start digging
there.

-- 
Sergio R. Caprile, Human Being, Bs.As., Argentina
        http://www.scaprile.ldir.com.ar/



reply via email to

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