--- Quote Start ---
You might throw something into the eth_ocm driver to output to your LED just to verify the time between when the data is given to the TCP/IP stack and when it's delivered to the MAC driver.
--- Quote End ---
I have done it just now. I confirm what I wrote above:
If there was a previous transmit, then tcp unacknowledged data:
- my app call the socket send() function at time 0
- eth_ocm_raw_send() function is called after a delay 100 to 200ms
- I have data on wire immediately, even before the eth_ocm_raw_send returns.
If there is no tcp unacknowledged data:
- my app call the socket send() function at time 0
- eth_ocm_raw_send() function is called after minimal delay (< 2ms)
- again, I have data on wire immediately
I further analyzed packets with Wireshark and I am almost sure the problem is definitely due to management of unacknowledged data.
Infact, the client (PC with Win XP) delays tcp ACKs those 100 to 200ms, because of the Nagle algorithm, and nichestack transmit next data ONLY AFTER all previous data has been acknowledged. Is this a Nichestack bug? From my TCP/IP protocol knowledge, it should't behave this way.
Cris