I am trying to understand if these NDK performance issues that I am seeing are normal. I am using NDK version 2.0
In my test case I am sending an 8 byte test packet to another application packet using tcp ip. All the code and data buffers used by the NDK are stored in external SDRAM memory. I have profiled the send command for sending this packet and the profiling results are saying that it takes approximately 50,000 cycles to send this packet. The application processor on the other side sends a confirmation packet. I profiled the recv function used to receive this packet and the profiling results state that it takes approximately 1.4 million cycles to receive a 2 byte confirmation packet. So I would like to know if putting the code and data memory in external sdram can cause this much of a performance degradation?
In my application I will periodically have to send and receive similar sized data packets to the application processor. Currently because of the latency issues that I am seeing I am not able to meet timing. Therefore I tried to not receive the confirmation packet coming from application processor. Doing this has caused other problems during application run time. This is my application setup, I have an ISR which runs every 1 ms. During this ISR I periodically post a DSP/BIOS semaphore to a task which I use to send data to the application processor. What I have noticed when I dont receive the data packet is that eventually the NDK blocks my transmission task with another sempahore. That is even though I am posting the correct semaphore from the ISR the transmission task will not run. This is because the transmission task is now blocked by another sempahore. The only logical conclusion that I could draw was that since there are data packets waiting in the NDK receive buffer that have not been acted upon, the NDK has blocked further transmission on that socket until this data has been received. Is this assumption correct and are there ways to get around this NDK issue? Is there an option in the NDK that I can use to ignore data received on a particular socket?