FreeRTOS-Plus-TCP Performance

I recently got the FreeRTOS TCP stack running on my SAME70 based design. While the stack is working fine, it’s performance is not near where it should be.

I’m using the DriverSAM driver. Here are my configuration options from my FreeRTOSIPConfig.h that are relavent:


#define ipconfigZERO_COPY_RX_DRIVER ( 1 )
#define ipconfigZERO_COPY_TX_DRIVER ( 1 )

#define ipconfigTCP_RX_BUFFER_LENGTH ( 3 * ipconfigTCP_MSS )
#define ipconfigTCP_TX_BUFFER_LENGTH ( 2 * ipconfigTCP_MSS )
#define ipconfigNETWORK_MTU 1500

And then from FreeRTOSIPConfigDefaults.h:
#ifndef ipconfigTCP_MSS
#define ipconfigTCP_MSS ( ipconfigNETWORK_MTU - ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) )

Any recomendations ??

What is your ipconfigUSE_TCP_WIN setting?

#define ipconfigUSE_TCP_WIN ( 1 )

I also forgot to mention that I’m using BufferAllocation_2.c

I am unclear on exactly what you mean by performance? Can you please explain what your expectations are and what you are seeing instead?

And what are you measuring? Are you running iPerf?
Or a TCP-connection with lots of data?
When tuning a TCP connection, I always recommend to use the socket option FREERTOS_SO_WIN_PROPERTIES, it lets you set both the size of the TCP sliding windows and the buffers.
There is a short description.

What you can also do is make a capture while the TCP connection is running and attach it to you post ( or email it to me if attaching doesn’t work ).

You probably know that BufferAllocation_1.c is more efficient than BufferAllocation_2.c because it preallocates the memory at startup.

Hello @charliefjohnson, any updates on this?

Did you figure out the problem? Can we help in some way?