Receive Offload for TCP packets

Check that when LRO or GRO is enabled, received TCP packets are coalesced into bigger ones before they reach OS.

  1. Set rx-checksum, rx-lro, rx-gro and rx-gro-hw features on the IUT interface according to values of rx_csum_on, lro_on, gro_on, gro_hw_on and rx_vlan_strip_on test parameters.

  2. Try to disable adaptive Rx interrupt coalescing and set rx_coalesce_usecs to a big value on the IUT interface to make sure that LRO or GRO often coalesces incoming packets.

  3. Make sure TSO is enabled on Tester if possible, so that packets are sent as fast as possible from it.

  4. If rx_vlan_strip_on, create VLANs, assign addresses and use it for traffic checks below.

  5. Establish connection between a pair of TCP sockets on IUT and Tester.

  6. Enable TCP_NODELAY option on the Tester socket so that packets are sent as soon as possible from it.

  7. Create a CSAP on IUT to capture packets sent from Tester.

  8. Send a lot of data from Tester in multiple bursts with help of rpc_pattern_sender(), receiving it all on IUT with rpc_pattern_receiver().

  9. Process packets captured by CSAP on IUT. Check that larger-than-MSS packets are encountered if and only if either gro_on and/or gro_hw_on are TRUE or both lro_on and rx_csum_on are TRUE.

    • If LRO is enabled (i.e. both lro_on and rx_csum_on are TRUE) and 'sfc' driver is tested, check that the first large packet is received after a number of packets specified by lro_slow_start_packets driver module parameter.

Parameters:

env

Testing environment:

rx_csum_on

If TRUE, Rx checksum offload is enabled.

lro_on

If TRUE, LRO is enabled.

gro_on

If TRUE, GRO is enabled.

gro_hw_on

If TRUE, Hardware GRO is enabled.

rx_vlan_strip_on

If TRUE, VLAN strip is enabled.