onload--parameter reference

Parameter List

The parameter list details the following:
•The environment variable used to set the parameter.
•Parameter name: the name used by onload_stackdump.
•The default, minimum and maximum values.
•Whether the variable scope applies per‐stack or per‐process.
•Description.

EF_ACCEPTQ_MIN_BACKLOG

Name: acceptq_min_backlog
Default: 1
Scope: per‐stack
Sets a minimum value to use for the 'backlog' argument to the listen() call. 
If the application requests a smaller value, use this value instead.

EF_ACCEPT_INHERIT_NONBLOCK

Name: accept_force_inherit_nonblock
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
If set to 1, TCP sockets accepted from a listening socket inherit the O_NONBLOCK flag 
from the listening socket.

EF_BINDTODEVICE_HANDOVER

Name: bindtodevice_handover
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
Hand sockets over to the kernel stack 
that have the SO_BINDTODEVICE socket option enabled.

EF_BURST_CONTROL_LIMIT

Name: burst_control_limit
Default: 0
Scope: per‐stack
If non‐zero, 
limits how many bytes of data are transmitted in a single burst. 
This can be useful to avoid drops on low‐end switches 
which contain limited buffering or limited internal bandwidth. 
This is not usually needed for use with most modern, high‐performance switches.

EF_BUZZ_USEC

Name: buzz_usec
Default: 0
Scope: per‐stack
Sets the timeout in microseconds for lock buzzing options. 
Set to zero to disable lock buzzing (spinning). 
Will buzz forever if set to ‐1. 
Also set by the EF_POLL_USEC option.

EF_CLUSTER_HOT_RESTART

Name: cluster_hot_restart_opt
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
This option controls whether or not clusters support the hot/seamless restart of applications. 
Enabling this reuses existing stacks in the cluster 
to allow up to two processes per stack 
to bind to the same port simultaneously. 
Note that it is required 
there will be as many new sockets on the port as old ones; 
traffic will be lost otherwise when the old sockets close.
•0 ‐ disable per‐port stack sharing (default)
•1 ‐ enable per‐port stack sharing for hot restarts.

EF_CLUSTER_IGNORE

Name: cluster_ignore
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
When set, this option instructs Onload to ignore attempts 
to use clusters and effectively ignore attempts to set SO_REUSEPORT.

EF_CLUSTER_NAME

Name: cluster_name
Default: none
Minimum: none
Maximum: none
Scope: per‐process
This option sets the name for an Onload stack 
that is created when using clusters. 
The name should have the following maximum length:
•5 characters in scalable mode
•7 characters in normal mode with EF_CLUSTER_SIZE ≥ 10
•8 characters in normal mode with EF_CLUSTER_SIZE < 10.

EF_CLUSTER_RESTART

Name: cluster_restart_opt
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
This option controls the behavior 
when recreating a stack (e.g. due to restarting a process) 
in an SO_REUSEPORT cluster 
and it encounters a resource limitation 
such as an orphan stack from the previous process:
•0 ‐ return an error
•1 ‐ terminate the orphan to allow the new process to continue.

EF_CLUSTER_SIZE

Name: cluster_size
Default: 2
Minimum: 1
Scope: per‐process
If use of SO_REUSEPORT creates a cluster, 
this option specifies sizeof the cluster to be created. 
This option has no impact 
if use of SO_REUSEPORT joins a cluster that already exists. 
Note that if fewer sockets than specified here 
join the cluster, 
then some traffic will‐be lost. 
Refer to Application Clustering on page 90 for more detail.

EF_COMPOUND_PAGES_MODE

Name: compound_pages
Default: 0
Minimum: 0
Maximum: 2
Scope: per‐stack
Debug option, not suitable for normal use.
For packet buffers, allocate system pages in the following way:
•0 ‐ try to use compound pages if possible (default)
•1 ‐ do not use compound pages of high order
•2 ‐ do not use compound pages at all.

EF_CONG_AVOID_SCALE_BACK

Name: cong_avoid_scale_back
Default: 0
Scope: per‐stack
When >0, 
this option slows down the rate 
at which the TCP congestion window is opened. 
This can help to reduce loss in environments 
where there is lots of congestion and loss.

EF_CTPIO

Name: ctpio
Default: 1
Minimum: 0
Maximum: 2
Scope: per‐stack
Controls whether the CTPIO low‐latency transmit mechanism is enabled:
•0 – no (use DMA and/or PIO)
•1 – enable CTPIO if available (default)
•2 – enable CTPIO and fail stack creation if not available.
Mode 1 will fall back to DMA or PIO 
if CTPIO is not currently available. 
Mode 2 will fail to create the stack 
if the hardware supports CTPIO 
but CTPIO is not currently available. 
On hardware that does not support CTPIO 
there is no difference between mode 1 and mode 2.
In all cases, 
CTPIO is only be used for packets 
if length ≤ EF_CTPIO_MAX_FRAME_LEN 
and when the VI's transmit queue is empty. 
If these conditions are not met DMA or PIO is used, 
even in mode 2.

EF_DEFER_WORK_LIMIT

Name: defer_work_limit
Default: 32
Scope: per‐stack
The maximum number of times 
that work can be deferred 
to the lock holder 
before we force the unlocked thread 
to block and wait for the lock

EF_DELACK_THRESH

Name: delack_thresh
Default: 1
Minimum: 0
Maximum: 65535
Scope: per‐stack
This option controls the delayed acknowledgment algorithm. 
A socket may receive up to the specified number of TCP segments 
without generating an ACK. 
Setting this option to 0 disables delayed acknowledgments.

EF_DONT_ACCELERATE–重要

Name: dont_accelerate
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Do not accelerate by default. 
This option is usually used in conjunction with onload_set_stackname() 
to allow individual sockets to be accelerated selectively.

EF_DYNAMIC_ACK_THRESH

Name: dynack_thresh
Default: 16
Minimum: 0
Maximum: 65535
Scope: per‐stack
If set to >0 this will turn on dynamic adaptation 
of the ACK rate 
to increase efficiency 
by avoiding ACKs 
when they would reduce throughput. 
The value is used 
as the threshold 
for number of pending ACKs 
before an ACK is forced. 
If set to zero 
then the standard delayed‐ack algorithm is used.

EF_EPOLL_CTL_FAST

Name: ul_epoll_ctl_fast
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Avoid system calls in epoll_ctl() 
when using an accelerated epoll implementation. 
System calls are deferred 
until epoll_wait() blocks, 
and in some cases removed completely. 
This option improves performance 
for applications that call epoll_ctl() frequently.
Caveats:
•This option has no effect when EF_UL_EPOLL=0.
•Do not turn this option on if your application uses dup(), fork() or exec() 
in conjunction with epoll file descriptors or with the sockets monitored by epoll.
•If you monitor the epoll fd in another poll, select or epoll set, 
and have this option enabled, it may not give correct results.
•If you monitor the epoll fd in another poll, select or epoll set, 
and the effects of epoll_ctl() are latency critical, 
then this option can cause latency spikes or even deadlock.
•With EF_UL_EPOLL=2, 
this option is harmful 
if you are calling epoll_wait() and epoll_ctl() simultaneously from different threads or processes.

EF_EPOLL_CTL_HANDOFF

Name: ul_epoll_ctl_handoff
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Allow epoll_ctl() calls to be passed 
from one thread to another 
in order to avoid lock contention, 
in EF_UL_EPOLL=1 or 3 case. 
This optimization is particularly important 
when epoll_ctl() calls are made concurrently 
with epoll_wait() 
and spinning is enabled.
This option is enabled by default.
Caveat:
•This option may cause an error code returned by epoll_ctl() 
to be hidden from the application 
when a call is deferred. 
In such cases an error message is emitted to stderr or the system log.

EF_EPOLL_MT_SAFE

Name: ul_epoll_mt_safe
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
This option disables concurrency control 
inside the accelerated epoll implementations, 
reducing CPU overhead. 
It is safe to enable this option if, 
for each epoll set, 
all calls on the epoll set 
and all calls that may modify a member of the epoll set are concurrency safe. 
Calls that may modify a member are bind(), connect(), listen() and close().
This option improves performance with EF_UL_EPOLL=1 or 3 
and also with EF_UL_EPOLL=2 and EF_EPOLL_CTL_FAST=1.

EF_EPOLL_SPIN

Name: ul_epoll_spin	
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in epoll_wait() calls 
until an event is satisfied 
or the spin timeout expires (whichever is the sooner). 
If the spin timeout expires, 
enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_EVS_PER_POLL

Name: evs_per_poll
Default: 64
Minimum: 0
Maximum: 0x7fffffff
Scope: per‐stack
Sets the number of hardware network events to handle 
before performing other work. 
This is a hint for internal tuning, 
and the actual number handled might differ. 
The value chosen represents a trade‐off: 
Larger values increase batching (which typically improves efficiency) 
but may also increase the working set size (which harms cache efficiency).

EF_FDS_MT_SAFE

Name: fds_mt_safe
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
This option allows less strict concurrency control 
when accessing the user‐level file descriptor table, 
resulting in increased performance, 
particularly for multi‐threaded applications. 
Single‐threaded applications get a small latency benefit, 
but multi‐threaded applications benefit most 
due to decreased cache‐line bouncing between CPU cores.
This option is unsafe for applications 
that make changes to file descriptors in one thread 
while accessing the same file descriptors in other threads. 
For example, 
closing a file descriptor in one thread 
while invoking another system call on that file descriptor in a second thread. 
Concurrent calls that do not change the object underlying the file descriptor remain safe.
Calls to bind(), connect(), listen() may change the underlying object. 
If you call such functions in one thread 
while accessing the same file descriptor from the other thread, 
this option is also unsafe. 
In some special cases, 
any functions may change the underlying object.
Also concurrent calls may happen from signal handlers, 
so set this to 0 if your signal handlers call bind(), connect(), listen() or close()

EF_FDTABLE_SIZE

Name: fdtable_size
Default: 0
Scope: per‐process
Limit the number of opened file descriptors by this value. 
If zero, the initial hard limit of open files (`ulimit ‐n ‐H`) is used. 
Hard and soft resource limits for opened file descriptors (help ulimit, man 2 setrlimit) are bound 
by this value.

EF_FDTABLE_STRICT

Name: fdtable_strict
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Enables more strict concurrency control for the user‐level file descriptor table. 
Enabling this option can reduce performance for applications 
that create and destroy many connections per second.

EF_FORCE_SEND_MULTICAST

Name: force_send_multicast
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
This option causes all multicast sends to be accelerated. 
When disabled, 
multicast sends are only accelerated for sockets 
that have cleared the IP_MULTICAST_LOOP flag.
This option disables loopback of multicast traffic 
to receivers on the same host, 
unless (a) those receivers are sharing an Onload stack with the sender 
(see EF_NAME on page 230) 
and EF_MCAST_SEND is set to 1 or 3, 
or(b) prerequisites to support loopback to other Onload stacks are met 
(see EF_MCAST_SEND on page 229).

EF_FORCE_TCP_NODELAY

Name: tcp_force_nodelay
Default: 0
Minimum: 0
Maximum: 2
Scope: per‐stack
This option allows the user to override the use of TCP_NODELAY. 
This may be useful in cases 
where 3rd‐party software is (not) setting this value 
and the user would like to control its behavior:
•0 ‐ do not override
•1 ‐ always set TCP_NODELAY
•2 ‐ never set TCP_NODELAY

EF_FORK_NETIF

Name: fork_netif
Default: 3
Minimum: CI_UNIX_FORK_NETIF_NONE
Maximum: CI_UNIX_FORK_NETIF_BOTH
Scope: per‐process
This option controls behavior after an application calls fork():
•0 ‐ Neither fork parent nor child creates a new Onload stack
•1 ‐ Child creates a new stack for new sockets
•2 ‐ Parent creates a new stack for new sockets
•3 ‐ Parent and child each create a new stack for new sockets.

EF_FREE_PACKETS_LOW_WATERMARK

Name: free_packets_low
Default: 0
Scope: per‐stack
Keep free packets number to be at least this value. 
EF_MIN_FREE_PACKETS defines initialization behavior, 
and this value is about normal application runtime. 
In some combinations of hardware and software, 
Onload is not able allocate packets at any context, 
so it makes sense to keep some spare packets. 
Default value 0 is interpreted as EF_RXQ_SIZE/2.

EF_HELPER_PRIME_USEC

Name: timer_prime_usec
Default: 250
Scope: per‐stack
Sets the frequency with which software should reset the count‐down timer. 
Usually set to a value that is significantly smaller than EF_HELPER_USEC 
to prevent the count‐down timer 
from firing unless needed. 
Defaults to (EF_HELPER_USEC / 2).

EF_HELPER_USEC

Name: timer_usec
Default: 500
Scope: per‐stack
Timeout in microseconds for the count‐down interrupt timer. 
This timer generates an interrupt 
if network events are not handled 
by the application within the given time. 
It ensures that network events are handled promptly 
when the application is not invoking the network, or is descheduled.
Set this to 0 to disable the count‐down interrupt timer. 
It is disabled by default for stacks that are interrupt driven.

EF_INTERFACE_BLACKLIST

Name: iface_blacklist
Default: none
Minimum: none
Maximum: none
Scope: per‐stack
List of names of interfaces not to be used by the stack. 
Space separated.
See EF_INTERFACE_WHITELIST for notes as the same caveats apply.

EF_INTERFACE_WHITELIST

Name: iface_whitelist
Default: none
Minimum: none
Maximum: none
Scope: per‐stack
Space separated list of names of interfaces 
to use by the stack. 
Note that beside passing the network interface of Solarflare NIC itself, 
it is allowed to provide name of higher order interface 
such as VLAN, MACVLAN, team or bond. 
At stack creation time 
these names will be used to identify underlaying Solarflare NICs 
on which the whitelisting operates.

EF_INT_DRIVEN

Name: int_driven
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
Put the stack into an 'interrupt driven' mode of operation. 
When this option is not enabled 
Onload uses heuristics to decide when to enable interrupts, 
and this can cause latency jitter in some applications. 
So enabling this option can help avoid latency outliers.
This option is enabled by default except when spinning is enabled.
This option can be used in conjunction with spinning to prevent outliers 
caused when the spin timeout is exceeded 
and the application blocks, 
or when the application is descheduled. 
In this case we recommend 
that interrupt moderation be set to a reasonably high value 
(e.g. 100us) to prevent too high a rate of interrupts.

EF_INT_REPRIME

Name: int_reprime
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
Enable interrupts more aggressively than the default.

EF_IRQ_CHANNEL

Name: irq_channel
Default: ‐1
Minimum: ‐1
Maximum: SMAX
Scope: per‐stack
Set the net‐driver receive channel 
that will be used to handle interrupts for this stack. 
The core that receives interrupts for this stack 
will be whichever core 
is configured to handle interrupts for the specified net driver receive channel.
This option only takes effect if EF_PACKET_BUFFER_MODE=0 (default) or 2.

EF_KERNEL_PACKETS_BATCH_SIZE

Name: kernel_packets_batch_size
Default: 1
Minimum: 0
Maximum: 64
Scope: per‐stack
In some cases (for example, when using scalable filters), 
packets that should be delivered to the kernel stack are instead delivered to Onload. 
Onload will forward these packets to the kernel, 
and may do so in batches of size up to the value of this option.

EF_LOAD_ENV

Name: load_env
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Onload will only consult other environment variables if this option is set.
 i.e. Clearing this option will cause all other EF_ environment variables to be ignored.

EF_MAX_ENDPOINTS

Name: max_ep_bufs
Default: 8192
Minimum: 4
Maximum: CI_CFG_NETIF_MAX_ENDPOINTS_MAX (default 1<<21)
Scope: per‐stack
This option places an upper limit on the number of accelerated endpoints 
(sockets, pipes etc.) in an Onload stack. 
This option should be set to a power of two between 4 and 2^21. 
When this limit is reached 
listening sockets are not able to accept new connections over accelerated interfaces. 
New sockets and pipes created via socket() and pipe() 
etc. are handed over to the kernel stack 
and so are not accelerated.
~4 syn‐receive states consume one endpoint, see also EF_TCP_SYNRECV_MAX on page 264.

EF_MAX_PACKETS

Name: max_packets
Default: 32768
Minimum: 1024
Scope: per‐stack
Upper limit on number of packet buffers in each Onload stack. 
Packet buffers require hardware resources 
which may become a limiting factor 
if many stacks are each using many packet buffers. 
This option can be used to limit how much hardware resource and memory a stack uses. 
This option has an upper limit determined by the max_packets_per_stack onload module option.

EF_MAX_RX_PACKETS

Name: max_rx_packets
Default: 24576
Minimum: 0
Maximum: 1000000000
Scope: per‐stack
The maximum number of packet buffers in a stack 
that can be used by the receive data path. 
This should be set to a value smaller than EF_MAX_PACKETS 
to ensure that some packet buffers are reserved for the transmit path.

EF_MAX_TX_PACKETS

Name: max_tx_packets
Default: 24576
Minimum: 0
Maximum: 1000000000
Scope: per‐stack
The maximum number of packet buffers in a stack 
that can be used by the transmit data path. 
This should be set to a value smaller than EF_MAX_PACKETS 
to ensure that some packet buffers are reserved for the receive path.

EF_MCAST_JOIN_BINDTODEVICE

Name: mcast_join_bindtodevice
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
When a UDP socket joins a multicast group (using IP_ADD_MEMBERSHIP or similar), 
this option causes the socket to be bound to the interface that the join was on. 
The benefit of this is that it ensures the socket will not accidentally receive packets 
from other interfaces that happen to match the same group and port. 
This can sometimes happen 
if another socket joins the same multicast group on a different interface, 
or if the switch is not filtering multicast traffic effectively.
If the socket joins multicast groups on more than one interface, 
then the binding is automatically removed.

EF_MCAST_JOIN_HANDOVER

Name: mcast_join_handover
Default: 0
Minimum: 0
Maximum: 2
Scope: per‐stack
When this option is set to 1, 
and a UDP socket joins a multicast group on an interface that is not accelerated, 
the UDP socket is handed‐over to the kernel stack. 
This can be a good idea 
because it prevents that socket from consuming Onload resources, 
and may also help avoid spinning when it is not wanted.
When set to 2, 
UDP sockets that join multicast groups are always handed‐over to the kernel stack.

EF_MCAST_RECV

Name: mcast_recv
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
Controls whether or not to accelerate multicast receives. 
When set to zero, 
multicast receives are not accelerated, 
but the socket continues to be managed by Onload.
See also EF_MCAST_JOIN_HANDOVER on page 228.

EF_NAME–重要

Default: none
Maximum: 8 chars
Scope: per‐stack
The environment variable EF_NAME will be honored to control Onload stack sharing. 
However, a call to onload_set_stackname() overrides this variable, 
and EF_DONT_ACCELERATE and EF_STACK_PER_THREAD 
both take precedence over EF_NAME.

EF_NETIF_DTOR

Name: netif_dtor
Default: 1
Minimum: 0
Maximum: 2
Scope: per‐process
This option controls the lifetime of Onload stacks when the last socket in a stack is closed.

EF_NO_FAIL

Name: no_fail
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
This option controls 
whether failure to create an accelerated socket (due to resource limitations) is hidden 
by creating a conventional unaccelerated socket. 
Set this option to 0 to cause out‐of‐resources errors 
to be propagated as errors to the application, 
or to 1 to have Onload use the kernel stack instead 
when out of resources.
Disabling this option can be useful to ensure 
that sockets are being accelerated as expected (i.e. to find out when they are not).

EF_ONLOAD_FD_BASE

Name: fd_base
Default: 4
Scope: per‐process
Onload uses fds internally 
that are not visible to the application. 
This can cause problems for applications 
that make assumptions 
about their use of the fd space, 
for example by doing dup2/3 onto a specific file descriptor. 
If this is done on an fd 
that is internally used by Onload than an error of the form 'citp_ep_dup3(29, 3): target is reserved, 	
see EF_ONLOAD_FD_BASE' will be generated.
This option specifies a base file descriptor value, 
that Onload should try to make its internal file descriptors greater than or equal to. 
This allows the application to direct Onload to a part of the fd space 
that it is not expecting to explicitly use.

EF_PACKET_BUFFER_MODE

Name: packet_buffer_mode
Default: 0
Minimum: 0
Maximum: 3
Scope: per‐stack
This option affects how DMA buffers are managed. 
The default packet buffer mode uses a limited hardware resource, 
and so restricts the total amount of memory that can be used by Onload for DMA.
Setting EF_PACKET_BUFFER_MODE!=0 enables 'scalable packet buffer mode' 
which removes that limit. See details for each mode below:
•1 ‐ SR‐IOV with IOMMU.
Each stack allocates a separate PCI Virtual Function. 
IOMMU guarantees that different stacks do not have any access to each other data.
•2 ‐ Physical address mode.
Inherently unsafe, with no address space separation between different stacks or net driver packets.
•3 ‐ SR‐IOV with physical address mode.
Each stack allocates a separate PCI Virtual Function. 
IOMMU is not used, so this mode is unsafe in the same way as (2).
To use odd modes (1 and 3) SR‐IOV must be enabled 
in the BIOS, 
OS kernel 
and on the network adapter. 
In these modes 
you also get faster interrupt handler which can improve latency for some workloads.
For mode (1) you also have to enable IOMMU (also known as VT‐d) in BIOS and in your kernel.
For unsafe physical address modes (2) and (3), 
you should tune phys_mode_gid module parameter of the onload module.

EF_PER_SOCKET_CACHE_MAX

Name: per_sock_cache_max
Default: ‐1
Minimum: ‐1
Maximum: SMAX
Scope: per‐stack
When socket caching is enabled, 
(i.e. when EF_SOCKET_CACHE_MAX > 0), 
this sets a further limit on the size of the cache for each socket.
•If set to ‐1 in Onload 201805 onwards, or to 0 in earlier versions, 
no limit is set beyond the global limit specified by EF_SOCKET_CACHE_MAX.
This behavior is the default.
•If set to 0 in Onload 201805 onwards, 
no accepted sockets will be cached for any listening sockets. 
This allows active‐open socket caching to be enabled 
without also enabling passive‐open socket caching.

EF_PIPE

Name: ul_pipe
Default: 2
Minimum: 0
Maximum: 2
Scope: per‐process
•0 ‐ disable pipe acceleration
•1 ‐ enable pipe acceleration
•2 ‐ accelerate pipes only if an Onload stack already exists in the process.

EF_PIPE_RECV_SPIN

Name: pipe_recv_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in pipe receive calls 
until data arrives or the spin timeout expires (whichever is the sooner). 
If the spin timeout expires, enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_PIPE_SEND_SPIN

Name: pipe_send_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in pipe send calls until space becomes available in the socket buffer 
or the spin timeout expires (whichever is the sooner). 
If the spin timeout expires, enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_PIPE_SIZE

Name: pipe_size
Default: 237568
Minimum: OO_PIPE_MIN_SIZE (default 4096)
Maximum: CI_CFG_MAX_PIPE_SIZE (default 1<<20)
Scope: per‐process
Default size of the pipe in bytes. 
Actual pipe size will be rounded up to the size of packet buffer 
and subject to modifications by fcntl F_SETPIPE_SZ where supported.

EF_POLL_FAST

Name: ul_poll_fast
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Allow a poll() call to return without inspecting the state 
of all polled file descriptors 
when at least one event is satisfied. 
This allows the accelerated poll() call 
to avoid a system call 
when accelerated sockets are 'ready', 
and can increase performance substantially.
This option changes the semantics of poll(), 
and as such could cause applications to misbehave. 
It effectively gives priority to accelerated sockets 
over non‐accelerated sockets 
and other file descriptors. 
In practice a vast majority of applications work fine with this option.

EF_POLL_FAST_USEC

Name: ul_poll_fast_usec
Default: 32
Scope: per‐process
When spinning in a poll() call, 
causes accelerated sockets 
to be polled for N usecs 
before unaccelerated sockets are polled. 
This reduces latency for accelerated sockets, 
possibly at the expense of latency on unaccelerated sockets. 
Since accelerated sockets are typically the parts of the application 
which are most performance‐sensitive this is typically a good tradeoff.

EF_POLL_NONBLOCK_FAST_USEC

Name: ul_poll_nonblock_fast_usec
Default: 200
Scope: per‐process
When invoking poll() with timeout==0 (non‐blocking), 
this option causes non‐accelerated sockets to be polled only every N usecs.

This reduces latency for accelerated sockets, 
possibly at the expense of latency on unaccelerated sockets. 
Since accelerated sockets are typically the parts 
of the application which are most performance‐sensitive 
this is often a good tradeoff.
Set this option to zero to disable, 
or to a higher value to further improve latency for accelerated sockets.
This option changes the behavior of poll() calls, 
so could potentially cause an application to misbehave.

EF_POLL_ON_DEMAND

Name: poll_on_demand
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
Poll for network events in the context of the application calls 
into the network stack. 
This option is enabled by default.
This option can improve performance 
in multi‐threaded applications 
where the Onload stack is interrupt‐driven (EF_INT_DRIVEN=1), 
because it can reduce lock contention. 
Setting EF_POLL_ON_DEMAND=0 ensures that 
network events are (mostly) processed in response to interrupts.

EF_POLL_SPIN

Name: ul_poll_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in poll() calls 
until an event is satisfied or the spin timeout expires 
(whichever is the sooner). 
If the spin timeout expires, 
enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_POLL_USEC

Name: ef_poll_usec_meta_option
Default: 0
Scope: per‐process
This option enables spinning and sets the spin timeout in microseconds.
Setting this option is equivalent to: 
Setting EF_SPIN_USEC and EF_BUZZ_USEC, 
enabling spinning for UDP sends and receives, 
TCP sends and receives, select, poll and epoll_wait(), 
and enabling lock buzzing.

Spinning typically reduces latency 
and jitter substantially, 
and can also improve throughput. 
However, in some applications spinning can harm performance, 
particularly application that have many threads. 
When spinning is enabled 
you should normally dedicate a CPU core 
to each thread that spins.
You can use the EF_*_SPIN options 
to selectively enable or disable spinning for each API and transport. 
You can also use the onload_thread_set_spin() extension API 
to control spinning on a per‐thread and per‐API basis.
See also EF_POLL_USEC on page 276.

EF_PREALLOC_PACKETS

Name: prealloc_packets
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
If set ensures all packet buffers (EF_MAX_PACKETS) get allocated 
during stack creation or the stack creation fails. 
Also when set EF_MIN_FREE_PACKETS option is not taken into account.

EF_PREFAULT_PACKETS

Name: prefault_packets
Default: 1
Minimum: 0
Maximum: 1000000000
Scope: per‐stack
When set, 
this option causes the process to 'touch' the specified number of packet buffers 
when the Onload stack is created. 
This causes memory for the packet buffers to be pre‐allocated, 
and also causes them to be memory‐mapped into the process address space. 
This can prevent latency jitter 
caused by allocation and memory‐mapping overheads.
The number of packets requested is in addition to the packet buffers 
that are allocated to fill the RX rings. 
There is no guarantee 
that it will be possible to allocate the number of packet buffers requested.
The default setting causes all packet buffers 
to be mapped into the user‐level address space, 
but does not cause any extra buffers to be reserved. 
Set to 0 to prevent prefaulting.

EF_PROBE

Name: probe
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
When set, 
file descriptors accessed following exec() 
will be 'probed' 
and Onload sockets will be mapped to user‐land 
so that they can be accelerated. 
Otherwise Onload sockets are not accelerated following exec().

EF_RETRANSMIT_THRESHOLD

Name: retransmit_threshold
Default: 15
Minimum: 0
Maximum: SMAX
Scope: per‐stack
Number of retransmit timeouts before a TCP connection is aborted.

EF_RETRANSMIT_THRESHOLD_ORPHAN

Name: retransmit_threshold_orphan
Default: 8
Minimum: 0
Maximum: SMAX
Scope: per‐stack
Number of retransmit timeouts 
before a TCP connection is aborted in case of orphaned connection.

EF_RETRANSMIT_THRESHOLD_SYN

Name: retransmit_threshold_syn
Default: 4
Minimum: 0
Maximum: SMAX
Scope: per‐stack
Number of times a SYN will be retransmitted 
before a connect() attempt will be aborted.

EF_RETRANSMIT_THRESHOLD_SYNACK

Name: retransmit_threshold_synack
Default: 5
Minimum: 0
Maximum: CI_CFG_TCP_SYNACK_RETRANS_MAX (default 10)
Scope: per‐stack
Number of times a SYN‐ACK will be retransmitted 
before an embryonic connection will be aborted.

EF_RFC_RTO_INITIAL

Name: rto_initial
Default: 1000
Scope: per‐stack
Initial retransmit timeout in milliseconds. 
i.e. The number of milliseconds to wait for an ACK before retransmitting packets.

EF_RFC_RTO_MAX

Name: rto_max
Default: 120000
Scope: per‐stack
Maximum retransmit timeout in milliseconds.

EF_RFC_RTO_MIN

Name: rto_min
Default: 200
Scope: per‐stack
Minimum retransmit timeout in milliseconds.

EF_RXQ_LIMIT

Name: rxq_limit
Default: 65535
Minimum: CI_CFG_RX_DESC_BATCH (default 16)
Maximum: 65535
Scope: per‐stack
Maximum fill level for the receive descriptor ring. 
This has no effect 
when it has a value larger than the ring size (EF_RXQ_SIZE).

EF_RXQ_MIN

Name: rxq_min
Default: 256
Minimum: 2 * CI_CFG_RX_DESC_BATCH + 1 (default 33)
Scope: per‐stack
Minimum initial fill level for each RX ring. 
If Onload is not able to allocate sufficient packet buffers to fill each RX ring to this level, 
then creation of the stack will fail.

EF_RXQ_SIZE

Name: rxq_size
Default: 512
Minimum: 512
Maximum: 4096
Scope: per‐stack
Set the size of the receive descriptor ring. 
Valid values: 512, 1024, 2048 or 4096.
A larger ring size can absorb larger packet bursts without drops, 
but may reduce efficiency because the working set size is increased.

EF_RX_TIMESTAMPING

Name: rx_timestamping
Default: 0
Minimum: 0
Maximum: 3
Scope: per‐stack
Control of hardware timestamping of received packets, possible values:
•0 ‐ do not do timestamping (default)
•1 ‐ request timestamping but continue if hardware is not capable or it does not succeed
•2 ‐ request timestamping and fail if hardware is capable and it does not succeed
•3 ‐ request timestamping and fail if hardware is not capable or it does not succeed.

EF_SA_ONSTACK_INTERCEPT

Name: sa_onstack_intercept
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Intercept signals when signal handler is installed with SA_ONSTACK flag.
•0 ‐ Don't intercept.
If you call socket‐related functions such as send, 
file‐related functions such as close or dup from your signal handler, 
then your application may deadlock. (default)
•1 ‐ Intercept.
There is no guarantee that SA_ONSTACK flag will really work, but Onload library will do its best.

EF_SCALABLE_ACTIVE_WILDS_NEED_FILTER

Name: scalable_active_wilds_need_filter
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
When set to 1, IP filter is installed for every cached active‐opened socket 
(see EF_TCP_SHARED_LOCAL_PORTS on page 261). 
Otherwise it is assumed that scalable filters do the job.
Default: 1 if EF_SCALABLE_FILTERS_ENABLE=1 
and scalable mode in EF_SCALABLE_FILTERS_MODE is “active”; 0 otherwise.

EF_SCALABLE_FILTERS

Name: scalable_filter_string
Default: 0
Minimum: none
Maximum: none
Scope: per‐stack
Specifies the interface 
on which to enable support for scalable filters, 
and configures the scalable filter mode(s) to use. 
Scalable filters allow Onload to use a single hardware MAC‐address filter 
to avoid hardware limitations and overheads. 
This removes restrictions on the number 
of simultaneous connections 
and increases performance of active connect calls, 
but kernel support on the selected interface is limited to ARP/DHCP/ICMP protocols 
and some Onload features 
that rely on unaccelerated traffic (such as receiving fragmented UDP datagrams) 
will not work. 
Please see the Onload user guide for full details.
Depending on the mode selected this option will enable support for:
•scalable listening sockets
•IP_TRANSPARENT socket option
•scalable active open.
The interface specified must be a SFN7000 or later adapter.
Format of EF_SCALABLE_FILTERS variable is as follows:
EF_SCALABLE_FILTERS=[<interface‐name>[=mode[:mode]],]<interface‐name>[=mode[:mode]]
The following modes and their combinations can be specified:
•transparent_active
•rss:transparent_active
•passive
•rss:passive
•transparent_active:passive
•active
•rss:active
•rss:passive:active
It is possible to specify both an active mode interface and a passive mode interface. 
If two interfaces are specified 
then both the active and passive interfaces must have the same rss qualifier. 
Furthermore, if the interface is the string “any”, scalable filters are installed on all interfaces.

EF_SCALABLE_LISTEN_MODE

Name: scalable_listen
Default: 0
Minimum:0
Maximum: 1
Scope: per‐stack
Choose behavior of scalable listening sockets when using EF_SCALABLE_FILTERS
•0 – Listening sockets bound to a local address configured on the scalable interface 
use the scalable filter (default). Connections on other interfaces are not accelerated.
•1 – Listening sockets bound to a local address configured on the scalable interface 
use the scalable filter. Connections on other interfaces including loopback are refused.
This mode avoids kernel scalability issues with large numbers of listen sockets.

EF_SELECT_FAST

Name: ul_select_fast
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Allow a select() call to return 
without inspecting the state of all selected file descriptors 
when at least one selected event is satisfied. 
This allows the accelerated select() call to avoid a system call 
when accelerated sockets are 'ready', and can increase performance substantially.
This option changes the semantics of select(), 
and as such could cause applications to misbehave. 
It effectively gives priority to accelerated sockets 
over non‐accelerated sockets and other file descriptors. 
In practice a vast majority of applications work fine with this option.

EF_SELECT_FAST_USEC

Name: ul_select_fast_usec
Default: 32
Scope: per‐process
When spinning in a select() call, 
causes accelerated sockets to be polled for N usecs 
before unaccelerated sockets are polled. 
This reduces latency for accelerated sockets, 
possibly at the expense of latency on unaccelerated sockets. 
Since accelerated sockets are typically the parts of the application 
which are most performance‐sensitive this is typically a good tradeoff.

EF_SELECT_NONBLOCK_FAST_USEC

Name: ul_select_nonblock_fast_usec
Default: 200
Scope: per‐process
When invoking select() with timeout==0 (non‐blocking), 
this option causes non‐accelerated sockets to be polled only every N usecs.
This reduces latency for accelerated sockets, 
possibly at the expense of latency on unaccelerated sockets. 
Since accelerated sockets are typically the parts of the application 
which are most performance‐sensitive this is often a good tradeoff.
Set this option to zero to disable, 
or to a higher value to further improve latency for accelerated sockets.
This option changes the behavior of select() calls, 
so could potentially cause an application to misbehave.

EF_SELECT_SPIN

Name: ul_select_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in blocking select() calls until the select set is satisfied 
or the spin timeout expires (whichever is the sooner). 
If the spin timeout expires, 
enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_SEND_POLL_MAX_EVS

Name: send_poll_max_events
Default: 96
Minimum: 1
Maximum: 65535
Scope: per‐stack
When polling for network events after sending, 
this places a limit on the number of events handled.

EF_SEND_POLL_THRESH

Name: send_poll_thresh
Default: 64
Minimum: 0
Maximum: 65535
Scope: per‐stack
Poll for network events after sending this many packets.
Setting this to a larger value may improve transmit throughput 
for small messages 
by allowing batching. 
However, such batching may cause sends to be delayed leading to increased jitter.

EF_SHARE_WITH

Name: share_with
Default: 0
Minimum: ‐1
Maximum: SMAX
Scope: per‐stack
Set this option to allow a stack to be accessed by processes 
owned by another user. 
Set it to the UID of a user 
that should be permitted to share this stack, 
or set it to ‐1 to allow any user to share the stack. 
By default stacks are not accessible by users other than root.
Processes invoked by root can access any stack. 
Setuid processes can only access stacks created by the effective user, 
not the real user. 
This restriction can be relaxed 
by setting the onload kernel module option allow_insecure_setuid_sharing=1.

EF_SIGNALS_NOPOSTPONE

Name: signals_no_postpone
Default: 67110088
Minimum: 0
Maximum: (ci_uint64)(‐1)
Scope: per‐process
Comma‐separated list of signal numbers to avoid postponing of the signal handlers. 	
Your application will deadlock if one of the handlers uses socket function.
 By default, the list includes SIGBUS, SIGFPE, SIGSEGV and SIGPROF.
Please specify numbers, not string aliases: 
EF_SIGNALS_NOPOSTPONE=7,11,27 instead of 
EF_SIGNALS_NOPOSTPONE=SIGBUS,SIGSEGV,SIGPROF.
You can set EF_SIGNALS_NOPOSTPONE to empty value 
to postpone all signal handlers in the same way 
if you suspect these signals to call network functions.

EF_SLEEP_SPIN_USEC

Name: sleep_spin_usec
Default: 0
Scope: per‐process
Sets the duration in microseconds of sleep after each spin iteration. 
Currently applies to EPOLL3 epoll_wait only. 
Enabling the option trades some of the benefits of spinning 
‐ latency ‐ for reduction in CPU utilization and power consumption.
Spinning typically reduces latency and jitter substantially, 
and can also improve throughput. 
However, in some applications spinning can harm performance; 
particularly application that have many threads. 
When spinning is enabled you should normally dedicate a CPU core 
to each thread that spins.
You can use the EF_*_SPIN options to selectively enable or disable spinning 
for each API and transport. 
You can also use the onload_thread_set_spin() extension API 
to control spinning on a per‐thread and per‐API basis.

EF_SOCKET_CACHE_MAX

Name: sock_cache_max
Default: 0
Maximum: SMAX
Scope: per‐stack
Sets the maximum number of TCP sockets to cache for this stack. 
When set > 0, Onload will cache resources associated with sockets 
in order to improve connection set‐up and tear‐down performance. 
This improves performance for applications 
that make new TCP connections at a high rate.

EF_SO_BUSY_POLL_SPIN

Name: so_busy_poll_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin poll, select and epoll in a Linux‐like way: 
enable spinning 
only if a spinning socket is preset 
in the poll/select/epoll set. 
See Linux documentation on SO_BUSY_POLL socket option for details.
You should also enable spinning 
via EF_{POLL, SELECT, EPOLL}_SPIN variable 
if you'd like to spin in poll, select or epoll correspondingly. 
The spin duration is set via EF_SPIN_USEC, 
which is equivalent to the Linux sysctl.net.busy_poll value. 
EF_POLL_USEC is all‐in‐one variable to set for all 4 variables mentioned here.
Most versions of Linux never spin in epoll, but Onload does. 
This variable does not affect epoll behavior if EF_UL_EPOLL=2.

EF_STACK_LOCK_BUZZ

Name: stack_lock_buzz
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin while waiting to obtain a per‐stack lock. 
If the spin timeout expires, 
enter the kernel and block. 
The spin timeout is set by EF_BUZZ_USEC.
This option reduces jitter caused by lock contention, 
but can reduce fairness between threads competing for the lock.

EF_STACK_PER_THREAD—重要

Name: stack_per_thread
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Create a separate Onload stack for the sockets created by each thread.
进程栈,线程栈

EF_SYNC_CPLANE_AT_CREATE

Name: sync_cplane
Default: 1
Minimum: 0
Maximum: 2
Scope: per‐process
When this option is set to 2 
Onload will force a sync of control plane information from the kernel 
when a stack is created. 
This can help to ensure up to date information is used 
where a stack is created immediately 
following interface configuration.
If this option is set to 1 
then Onload will perform a lightweight sync 
of control plane information without performing a full dump. 
It is the default mode.
Setting this option to 0 will disable forced sync. 
Synchronizing data from the kernel will continue to happen periodically.
Sync operation time is limited by cplane_init_timeout onload module option.

EF_TAIL_DROP_PROBE

Name: tail_drop_probe
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
Whether to probe if the tail of a TCP burst isn't ACKed quickly.

EF_TCP—重要

Name: ul_tcp
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Clear to disable acceleration of new TCP sockets.

EF_TCP_ACCEPT_SPIN

Name: tcp_accept_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in blocking TCP accept() calls 
until incoming connection is established, 
the spin timeout expires or the socket timeout expires (whichever is the sooner). 
If the spin timeout expires, enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_TCP_ADV_WIN_SCALE_MAX

Name: tcp_adv_win_scale_max
Default: 14
Minimum: 0
Maximum: 14
Scope: per‐stack
Maximum value for TCP window scaling 
that will be advertised. 
Set it to 0 to turn window scaling off.

EF_TCP_BACKLOG_MAX

Name: tcp_backlog_max
Default: 256
Scope: per‐stack
Places an upper limit on the number of embryonic (half‐open) connections 
for one listening socket. 
See also EF_TCP_SYNRECV_MAX.
This value is overridden by /proc/sys/net/ipv4/tcp_max_syn_backlog.

EF_TCP_CLIENT_LOOPBACK

Name: tcp_client_loopback
Default: 0
Minimum: 0
Maximum: 4
Scope: per‐stack
Enable acceleration of TCP loopback connections on the connecting (client) side:
•0 ‐ not accelerated (default)
•1 ‐ accelerate if the listening socket is in the same stack 
(you should also set EF_TCP_SERVER_LOOPBACK!=0)
•2 ‐ accelerate and move accepted socket to the stack 
of the connecting socket 
(server should allow this via EF_TCP_SERVER_LOOPBACK=2)
•3 ‐ accelerate and move the connecting socket to the stack 
of the listening socket 
(server should allow this via EF_TCP_SERVER_LOOPBACK!=0)
•4 ‐ accelerate and move both connecting and accepted sockets 
to the new stack (server should allow this via EF_TCP_SERVER_LOOPBACK=2).
NOTE: Options 3 and 4 break some applications using epoll(), fork() and dup() calls.
NOTE: Options 2 and 4 cause accept() to misbehave if the client exits too early.
NOTE: Option 4 is not recommended on 32‐bit systems 
because it can create a lot of additional Onload stacks eating a lot of low memory.

EF_TCP_CONNECT_HANDOVER—重要

Name: tcp_connect_handover
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
When an accelerated TCP socket calls connect(), 
hand it over to the kernel stack. 
This option disables acceleration of active‐open TCP connections.
让指定套接字取消加速

EF_TCP_CONNECT_SPIN

Name: tcp_connect_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in blocking TCP connect() calls until connection is established, 
the spin timeout expires or the socket timeout expires (whichever is the sooner). 
If the spin timeout expires, enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_TCP_EARLY_RETRANSMIT

Name: tcp_early_retransmit
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
Enables the Early Retransmit (RFC 5827) algorithm for TCP, 
and also the Limited Transmit (RFC 3042) algorithm, 
on which Early Retransmit depends.

EF_TCP_FASTSTART_IDLE

Name: tcp_faststart_idle
Default: 65536
Minimum: 0
Scope: per‐stack
The FASTSTART feature prevents Onload from delaying ACKs 
during times when doing so may reduce performance. 
FASTSTART is enabled when a connection is new, 
following loss and after the connection has been idle for a while.
This option sets the number of bytes 
that must be ACKed by the receiver 
before the connection exits FASTSTART. 
Set to zero to prevent a connection entering FASTSTART after an idle period.

EF_TCP_LISTEN_HANDOVER—取消服务端加速

Name: tcp_listen_handover
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
When an accelerated TCP socket calls listen(), 
hand it over to the kernel stack. 
This option disables acceleration of TCP listening sockets 
and passively opened TCP connections.

EF_TCP_RECV_SPIN

Name: tcp_recv_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in blocking TCP receive calls until data arrives, 
the spin timeout expires or the socket timeout expires (whichever is the sooner). 
If the spin timeout expires, enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_TCP_SEND_NONBLOCK_NO_PACKETS_MODE

Name: tcp_nonblock_no_pkts_mode
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐stack
This option controls how a non‐blocking TCP send() call should behave 
if it is unable to allocate sufficient packet buffers. 
By default Onload will mimic Linux kernel stack behavior 
and block for packet buffers to be available. 
If set to 1, this option will cause Onload to return error ENOBUFS. 
Note this option can cause some applications 
(that assume that a socket that is writable is able to send without error) to malfunction.

EF_TCP_SEND_SPIN

Name: tcp_send_spin
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
Spin in blocking TCP send calls until window is updated by peer, 
the spin timeout expires or the socket timeout expires (whichever is the sooner). 
If the spin timeout expires, enter the kernel and block. 
The spin timeout is set by EF_SPIN_USEC or EF_POLL_USEC.

EF_TCP_SERVER_LOOPBACK

Name: tcp_server_loopback
Default: 0
Minimum: 0
Maximum: 2
Scope: per‐stack
Enable acceleration of TCP loopback connections on the listening (server) side:
•0 ‐ not accelerated (default)
•1 ‐ accelerate if the connecting socket is in the same stack 
(you should also set EF_TCP_CLIENT_LOOPBACK!=0)
•2 ‐ accelerate and allow accepted socket to be in another stack 
(this is necessary for clients with EF_TCP_CLIENT_LOOPBACK=2,4).

EF_TCP_SHARED_LOCAL_PORTS

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 .

EF_UDP

Name: ul_udp
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Clear to disable acceleration of new UDP sockets.

EF_UDP_CONNECT_HANDOVER

Name: udp_connect_handover
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
When a UDP socket is connected to an IP address 
that cannot be accelerated by Onload, 
hand the socket over to the kernel stack.
When this option is disabled the socket remains under the control of Onload. 
This may be worthwhile 
because the socket may subsequently be re‐connected 
to an IP address that can be accelerated.

EF_UDP_FORCE_REUSEPORT

Name: udp_reuseports
Default: 0
Scope: per‐process
This option specifies a comma‐separated list of port numbers. 
UDP sockets that bind to those port numbers will have SO_REUSEPORT 
automatically applied to them.

EF_UDP_PORT_HANDOVER2_MAX

Name: udp_port_handover2_max
Default: 1
Scope: per‐stack
When set (together with EF_UDP_PORT_HANDOVER2_MIN), 
this causes UDP sockets explicitly bound to a port in the given range 
to be handed over to the kernel stack. The range is inclusive.

EF_UL_EPOLL—重要

Name: ul_epoll
Default: 1
Minimum: 0
Maximum: 3
Scope: per‐process
Choose epoll implementation. The choices are:
•0 ‐ kernel (unaccelerated)
•1 ‐ user‐level (accelerated, lowest latency)
•2 ‐ kernel‐accelerated (best when there are lots of sockets in the set and mode 3 is not suitable)
•3 ‐ user‐level (accelerated, lowest latency, scalable, supports socket caching).

The default is the user‐level implementation (1).
Mode 3 can offer benefits over mode 1, 
particularly with larger sets. 
However, this mode has some restrictions:
•It does not support epoll sets that exist across fork().
•It does not support monitoring the readiness of the set's epoll fd 
via a another epoll/poll/select.

EF_UL_POLL

Name: ul_poll
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Clear to disable acceleration of poll() calls at user‐level.

EF_UL_SELECT

Name: ul_select
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐process
Clear to disable acceleration of select() calls at user‐level.

EF_UNCONFINE_SYN

Name: unconfine_syn
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
Accept TCP connections that cross into or out‐of a private network.

EF_VALIDATE_ENV

Name: validate_env
Default: 1
Minimum: 0
Maximum: 1
Scope: per‐stack
When set this option validates Onload related environment variables 
(starting with EF_).

EF_WODA_SINGLE_INTERFACE

Name: woda_single_if
Default: 0
Minimum: 0
Maximum: 1
Scope: per‐process
This option alters the behavior of onload_ordered_epoll_wait(). 
This function would normally ensure correct ordering across multiple interfaces.	 	
However, this impacts latency, 
as only events arriving before the first interface polled 
can be returned and still guarantee ordering.
If the traffic being ordered is only arriving on a single interface 
then this additional constraint is not necessary. 
When this option is enabled, 
traffic will only be ordered relative to other traffic arriving on the same interface.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

raindayinrain

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值