I would be curious to see a recording of the FTP-session with Wireshark. It would be interesting to see a normal transfer, and a slow one. Could you ZIP a PCAP file and attach it to your post?
As you probably know, the latest releases of the FTP and HTTP servers can be found here.
The FAT library is available from here.
Note that both the FTP/HTTP-servers, as well as the +FAT library are still in the Labs stage.
And needless to say that the latest +TCP library can be found here.
Some remarks about your FreeRTOSIPConfig.h:
#define ipconfigNETWORK_MTU 1526
Unless you have a special reason to make MTU so big, I would recommend putting it to a more compatible size of 1500 bytes. MTU is the maximum transmission size, without the 14-byte Ethernet header, and without the (invisible) trailing Ethernet checksum. So in fact, 1518 can be transmitted.
#define ipconfigTCP_MSS 1460
1460 is indeed the largest (TCP) segment size, but I would recommend not to define it, because the default definition of
ipconfigTCP_MSS will follow the size of MTU.
Xilinx has this logging function:
extern void xil_printf ( const char8 *ctrl1, ...);
If you use
xil_printf(), make sure it is re-entrant, or use it from a single task only.
I miss the TCP settings for the FTP server, like e.g. :
#define ipconfigFTP_TX_BUFSIZE ( 24 * ipconfigTCP_MSS )
#define ipconfigFTP_TX_WINSIZE ( 18 )
#define ipconfigFTP_RX_BUFSIZE ( 24 * ipconfigTCP_MSS )
#define ipconfigFTP_RX_WINSIZE ( 18 )
Without these defines, the drive will use the defaults, also from your FreeRTOSIPConfig.h::
/* Each TCP socket has a circular buffers for Rx and Tx, which have a fixed
maximum size. Define the size of Rx buffer for TCP sockets. */
#define ipconfigTCP_RX_BUFFER_LENGTH ( 0x4000 )
/* Define the size of Tx buffer for TCP sockets. */
#define ipconfigTCP_TX_BUFFER_LENGTH ( 0x4000 )
This means that the sockets will have stream buffers that can hold 16 KB in each direction.
When I played with FTP on Zynq, I gave it very large TCP buffers:
#define ipconfigFTP_TX_BUFSIZE ( 256 * 1024 )
#define ipconfigFTP_TX_WINSIZE ( 24 )
#define ipconfigFTP_RX_BUFSIZE ( 24 * 1024 )
#define ipconfigFTP_RX_WINSIZE ( 12 )