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.
If tso_on is
TRUE
, try to enable related Tx checksum offloadings if they are disabled.Turn TSO on or off on IUT according to tso_on.
Turn Tx VLAN HW insertion on or off on IUT according to vlan_hw_insert_on.
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.
If rx_vlan_strip_on, create VLANs, assign addresses and use it for traffic checks below.
Establish connection between a pair of TCP sockets on IUT and Tester, setting
SO_SNDBUF
on the IUT socket andSO_RCVBUF
on the Tester socket to values large enough for the data to be sent.Create a CSAP on IUT to capture outgoing packets.
Create a CSAP on Tester to capture incoming packets.
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:
|
max_size |
Maximum size of data passed to send() call, in MTU units:
|
send_calls |
Number of send() calls:
|