TCP fusion

From HandWiki

TCP Fusion is a feature for providing TCP loopback and is implemented in the transmission control protocol stack within Oracle' Solaris-10 and Solaris-11 operating systems as well as a number of software projects based on the open source codebase from the OpenSolaris project. The idea is trivial in that a client and server connection on a local loopback interface within the same system should not need the entire TCP/IP protocol stack to exchange data. Therefore, provide a faster data path with the fusion of the two end points.

The source code is well documented in inet/tcp/tcp_fusion.c which clearly states :

TCP fusion is a protocol-less data path for TCP loopback connections. The fusion of two local TCP endpoints occurs at connection establishment time. Various conditions (see details in tcp_fuse()) need to be met for fusion to be successful. If it fails, we fall back to the regular TCP data path; if it succeeds, both endpoints proceed to use tcp_fuse_output() as the transmit path. tcp_fuse_output() enqueues application data directly onto the peer's receive queue; no protocol processing is involved. Sychronization is handled by squeue and the mutex tcp_non_sq_lock. One of the requirements for fusion to succeed is that both endpoints need to be using the same squeue. This ensures that neither side can disappear while the other side is still sending data. Flow control information is manipulated outside the squeue, so the tcp_non_sq_lock must be held when touching tcp_flow_stopped.

The feature may be enabled or disabled via the /etc/system config file for the solaris or genunix kernel and the only line required is "set ip:do_tcp_fusion = 0x0" which set the feature off or FALSE while of "0x1" for hexadecimal TRUE.