Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuring TCP window sizes

Receive and transmit queue size MUST be properly configured to optimize performance. It represents the number of bytes that can be queued by one socket. It's important that all socket are not able to queue more data than what the device can hold in its buffers. The size should be also a multiple of the maximum segment size (MSS) to optimize performance. UDP MSS is 1470 and TCP MSS is 1460. RX and TX queue size can be reduce at run time using socket option API. The following listing shows a calculation example: 

 

Once number and size of the transmit and receive buffers are configured, as explained in the previous section, the last thing that need to be done is to configure the TCP Transmit and Receive Window sizes. These parameters are found in the net_cfg.h file in the TRANSMISSION CONTROL PROTOCOL LAYER CONFIGURATION section.

...

The number of transmit buffer should be increased. Additionally, it may be helpful to add a short delay between successive calls to socket transmit functions.TODO Tx suspend ??