[Top][All Lists]

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

Re: [lwip-users] TCP Retransmission when receiving consecutive packets

From: Sergio R. Caprile
Subject: Re: [lwip-users] TCP Retransmission when receiving consecutive packets
Date: Thu, 20 Mar 2014 13:18:02 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

> I am a bit surprised that the ethernet interrupt just raises a flag :

Don't be surprised, lwIP is single threaded, meaning you shouldn't call
an lwIP memory allocation routine from inside an interrupt, since it
might have interrupted another lwIP memory allocation routine... (I
might be wrong since I didn't write the code, but that is what I
understand by "single-threaded" and what I did on my driver)

As you are using an RTOS, it surely dispatches a task to get the
frame(s) later. The frames should happily rest inside the eth chip (or
equivalent) until them, providing there is enough memory for them. The
chip I use has 13K devoted to that.

> It seems to imply that calling ethernetif_poll in an IDLE thread will
> only process on packet even if multiple interrupts have been raised :

Many eth chips issue only one interrupt for the first frame, the driver
then checks for how many outstanding frames there are.

check here -->  ethernetif_input (netif);
it should have some form of a do while loop

> Could that have anything to do with my problem ?

IMHO, yes, quite probably, if that function does not perform a loop to
get all the outstanding frames.
Sorry but you'll have to learn your chip to check how it issues
interrupts and buffers frames, and then check the driver.
One quick try: send ping floods and see if you get the same behaviour.
Pings are answered at the very first part of the IP processing, so if
pings are OK, the issue is not probably inside the driver (do check
inter-ping time with wireshark)


reply via email to

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