Versions Compared

Key

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

...

Anchor10098571009857 Testing TCP Reception

1009849
Anchor
1009849
Table of Contents

Along with the reception of UDP traffic, you should test your device driver for TCP traffic. The following are two tests that measure the driver performance under different conditions. Anchor10098501009850

Test 1: Receive TCP Test with using NDIT

...

To achieve the best possible throughput, you might have to increase the number of receive descriptors and receive buffers. On the other hand, it is also possible to reserve too many buffers for reception. To find out the ideal number of descriptors and buffers, there are two things you need to measure. Anchor10043831004383

First, you must determine the rate at which the target can receive data. This value, in bits per second, will be referred to as the bandwidth. You can obtain this value by running the receive UDP test. Anchor10170101017010

Second, you must determine the round trip time (RTT) of a message between the test station and the target. This is achieved by sending an ICMP echo request to the target and measuring the RTT of the reply. You can use ping (or preferably fping) to acquire this value. Anchor10170111017011

Then take these two value and multiply them to determine the Bandwidth-Delay Product. Anchor10171081017108

BDP (bytes) = total_available_bandwidth (KBytes/sec) • round_trip_time (ms) Anchor10171091017109

The BDP is approximately equal to the Receive TCP Window Size. It is recommended to round up the calculated value to a multiple of the Maximum Segment Size (MSS), typically 1460 bytes. Anchor10168451016845

For example, the bandwidth of a test station-target link is 32.461 Mbps as found by the Receive UDP test. The measured RTT is 0.9 millisecond. It gives us a BDP of 28315 bits (32.461 Mbps x 0.9 ms) or 3539 bytes. Rounding up this result to a multiple of the MSS value gives us 4380 bytes. If the combined size of the receive buffers cannot hold the BDP, the receive buffers must be increased in order to have optimal performances. It is important to increase the number of receive descriptors (RxDescNbr) accordingly.anchor

...

Panel

...

titleFigure - TCPs test tab

...

Image Added


There are four options for the TCP receive test:anchor

10043951004395Rx Window Size Anchor10043961004396

The size of the receive socket window on the target host.

...

Buffer Size Anchor10043981004398

The length of the buffer to transmit to the target.

...

Tx Window Size Anchor10044001004400

The size of the transmit socket window on the test station.

...

Test Duration Anchor10044021004402

Located in the General Options tab.

...

The TCPs test parameters must be adjusted to the following: both Buffer Size and Tx Window Size should be set to 65500. These settings will minimize the overhead of socket creation on the test station, and make full use of the available processing power of the target. The Receive Window Size must be set to the value of the BDP, rounded up to a multiple of the MSS. Anchor10173801017380

You should set the TCP Receive Window size in net_cfg.h as follows: Anchor10044041004404

#define NET_TCP_CFG_RX_WIN_SIZE_OCTET (RxDescNbr * 1460)u Anchor10044051004405

Expected Results

...

  • Driver throughput should be optimized.

...

  • Few transitory errors.

...

  • See the section on transitory errors on

...

  • for more information.

...

  • No retransmission.

...

  • See the section on retransmission on

...

  • for more details.

...

  • The messages “Window update”, “Zero window” and “Window probe” are acceptable.

...

  • These messages are part of a flow control mechanism that prevents the receiver from getting more packets that it can actually handle, or for the transmitter to wait indefinitely for acknowledgement to resume the transmission.

...

...

  • No buffer leaks.

...

...

  • for more details.

...

  • Logging performance results (with the target directly connected, and networked).