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.
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.
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.
Make sure TSO is enabled on Tester if possible, so that packets are sent as fast as possible from it.
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.
Enable
TCP_NODELAY
option on the Tester socket so that packets are sent as soon as possible from it.Create a CSAP on IUT to capture packets sent from Tester.
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().
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 areTRUE
.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 |
lro_on |
If |
gro_on |
If |
gro_hw_on |
If |
rx_vlan_strip_on |
If |