]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Second step of TSO (TCP segmentation offload) support in our network stack.
authorandre <andre@FreeBSD.org>
Thu, 7 Sep 2006 12:53:01 +0000 (12:53 +0000)
committerandre <andre@FreeBSD.org>
Thu, 7 Sep 2006 12:53:01 +0000 (12:53 +0000)
commitc9b5882a6eb5b95543c8cc67df0fa602a275d2e5
tree51d8d16aaacf803627a56c901c7f26fe11f9193e
parent8f497b5c529716cb2391b174536027dc3d20b763
Second step of TSO (TCP segmentation offload) support in our network stack.

TSO is only used if we are in a pure bulk sending state.  The presence of
TCP-MD5, SACK retransmits, SACK advertizements, IPSEC and IP options prevent
using TSO.  With TSO the TCP header is the same (except for the sequence number)
for all generated packets.  This makes it impossible to transmit any options
which vary per generated segment or packet.

The length of TSO bursts is limited to TCP_MAXWIN.

The sysctl net.inet.tcp.tso globally controls the use of TSO and is enabled.

TSO enabled sends originating from tcp_output() have the CSUM_TCP and CSUM_TSO
flags set, m_pkthdr.csum_data filled with the header pseudo-checksum and
m_pkthdr.tso_segsz set to the segment size (net payload size, not counting
IP+TCP headers or TCP options).

IPv6 currently lacks a pseudo-header checksum function and thus doesn't support
TSO yet.

Tested by: Jack Vogel <jfvogel-at-gmail.com>
Sponsored by: TCP/IP Optimization Fundraise 2005
sys/netinet/tcp_output.c