[Top][All Lists]

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

Re: [lwip-users] Improving LWIP performance

From: Karthik Vadambacheri Manian
Subject: Re: [lwip-users] Improving LWIP performance
Date: Tue, 17 Aug 2010 14:46:40 -0400

Hello Kieran,

> 3) Is the data that is checksummed at the receiver (including headers
and payload) exactly the same as sent at the receiver, or has some error
been introduced.  i.e. is it a checksum problem or is the failing
checksum correct because the data have been corrupted.

Thanks for your insights. As you doubted above, the data that is received is correct, but some error is introduced by the driver when the data is passed to the tcpip_thread. When I fixed it the checksumming is proper. Also should I enable checksumming in the virtual machine environment when everything is software?

As I said earlier, the performance also gets degraded due to few retransmissions due to missing acknowledgement. I used LWIP_STATS and found that there is no issues with the resources. Then when I debugged further I came to know the following:

1) Master sends some data to Slave
2) Slave receives it and sends an acknowledgement to Master. Slave then returns the same data to Master
3) Master receives both acknowledgement and the data

The problem occurs in the 3 step. The master receives a single interrupt for both the acknowledgement packet and data packet. So the driver tries to read and reads the acknowledgement packet first and then checks again whether there is more data in the buffer and it reads the data packet. But sometimes the data packet is available in the buffer after 90-100 microseconds after acknowledgement packet, hence the driver thinks there is no more packet to receive. So the receive is failed. This causes the slave to resend the packet which leads to great performance loss.

Also if interrupt occurs for both the acknowledgement packet and data packet receive separately it may solve the issue. Please let me know your views on whats wrong?.

Thanks for your time,

reply via email to

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