EF_TCP_SHARED_LOCAL_PORTS

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English
Name
tcp_shared_local_ports
Default
0
Minimum
0
Scope
per-stack

This feature improves the performance of TCP active-opens. It reduces the cost of both blocking and non-blocking connect() calls, reduces the latency to establish new connections, and enables scaling to large numbers of active-open connections. It also reduces the cost of closing these connections.

These improvements are achieved by sharing a set of local port numbers amongst active-open sockets, which saves the cost and scaling limits associated with installing packet steering filters for each active-open socket. Shared local ports are only used when the local port is not explicitly assigned by the application. Set this option to >=1 to enable local port sharing.

The value set gives the initial number of local ports to allocate when the Onload stack is created. More shared local ports are allocated on demand as needed up to the maximum given by EF_TCP_SHARED_LOCAL_PORTS_MAX.

Note: Typically only one local shared port is needed, as different local ports are only needed when multiple connections are made to the same remote IP:port.