TCP Segmentation OffloadΒΆ

Check that when TSO is enabled, larger-than-MSS packets are passed to NIC and split into MSS-sized ones by it.

  1. If tso_on is TRUE, try to enable related Tx checksum offloadings if they are disabled.

  2. Turn TSO on or off on IUT according to tso_on.

  3. Make sure LRO and GRO are turned off on Tester, so that CSAP captures IUT packets there exactly as they were sent and their sizes can be checked.

  4. Establish connection between a pair of TCP sockets on IUT and Tester, setting SO_SNDBUF on the IUT socket and SO_RCVBUF on the Tester socket to values large enough for the data to be sent.

  5. Create a CSAP on IUT to capture outgoing packets.

  6. Create a CSAP on Tester to capture incoming packets.

  7. Do send_calls times in a loop:

    • Pass a single bigger than MTU buffer to send() on the IUT socket.

    • Receive and check data on the Tester socket.

    • Examine outgoing packets captured by the IUT CSAP. Packets bigger than MSS should be encountered if and only if tso_on is TRUE.

    • Examine incoming packets captured by the Tester CSAP. All the captured packets except the last one must be of MSS size.

Parameters:

env

Testing environment:

tso_on

Should TCP Segmentation Offload be enabled?

min_size

Minimum size of data passed to send() call, in MTU units:

  • 2

max_size

Maximum size of data passed to send() call, in MTU units:

  • 5

send_calls

Number of send() calls:

  • 3