Enabling TSO
Principles
When a system needs to send a large segment of data through a network, a computer needs to split the segment of data into multiple segments of shorter data, so that the data can pass through all network devices in the network. This process is referred to as segmentation. TCP Segmentation Offload (TSO) enables the NIC to perform TCP segmentation calculation (for example, splitting 1 MB data to be sent into maximum transmission unit (MTU) packets) without involving the protocol stack.
Modification Method
Use ethtool to enable the NIC and driver to support TSO. In the following command, $eth indicates the name of the NIC whose configuration is to be modified, for example, eth0 and eth1.
1 | # ethtool -K $eth tso on
|
To use the TSO function, the physical NIC must support both the TCP check calculation and scatter-gather functions.
Check whether the NIC supports TSO:
1 2 3 4 5 | # ethtool -k$eth rx-checksumming: on tx-checksumming: on scatter-gather: on tcp-segmentation-offload: on |