TCP issue with large packet under RTEMS
joel.sherrill at OARcorp.com
Wed Feb 9 16:44:25 UTC 2011
On 02/09/2011 10:36 AM, João Rasta wrote:
> I'm using RTEMS 4.10 and GRETH MAC in order to exchange data with a
> client PC via TCP. I have a LEON-3 based processor architecture. I can
> successfully attach the GRETH ethernet driver using the RTEMS driver
> manager and exchange small ammounts of data. However, when i need to
> transfer an image array (436160Bytes) from the PC to the RTEMS system,
> the read() call only returns 17508Bytes read instead of 436160Bytes .
> The send() directive in the PC side returns the correct number of
> bytes sent so the problem must be on the RTEMS side. The read buffer
> has the correct size.
> 1) Is there any programmable limitation related to the number of bytes
> to receive? Since i'm using a TCP socket, there is no apparent reason
> for byte loss i guess..
> 2) In what circumstances should read() from a TCP socket return less
> bytes than the ones sent?
Is there more data available if you do a second read?
Do you have enough buffers allocated to the TCP/IP stack to handle getting
400+K data shoved into the stack quickly before the application can
pull it out?
What happens to the application? Does it lock up?
I suspect you don't have enough memory allocated to the TCP/IP stack.
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users