libxlio.conf
The installation process creates a default configuration file, /etc/libxlio.conf, in which you can define and change the following settings:
The target applications or processes to which the configured control settings apply. By default, XLIO control settings are applied to all applications.
The transport to be used for the created sockets.
The IP addresses and ports in which you want offload.
By default, the configuration file allows XLIO to offload everything except for the DNS server-side protocol (UDP, port 53) which will be handled by the OS.
In the libxlio.conf file:
You can define different XLIO control statements for different processes in a single configuration file. Control statements are always applied to the preceding target process statement in the configuration file.
Comments start with # and cause the entire line after it to be ignored.
Any beginning whitespace is skipped.
Any line that is empty is skipped.
It is recommended to add comments when making configuration changes.
The following sections describe configuration options in libxlio.conf. For a sample libxlio.conf file, see Example of XLIO Configuration below.
The target process statement specifies the process to which all control statements that appear between this statement and the next target process statement apply.
Each statement specifies a matching rule that all its sub-expressions must evaluate as true (logical and) to apply.
If not provided (default), the statement matches all programs.
The format of the target process statement is:
application-id <program-name|*> <user-defined-id|*>
Option | Description |
<program-name|*> | Define the program name (not including the path) to which the control statements appearing below this statement apply. Wildcards with the same semantics as "ls" are supported (* and ?). For example:
|
<user-defined-id|*> | Specify the process ID to which the control statements appearing below this statement apply. Note
You must also set the XLIO_APPLICATION_ID environment variable to the same value as user-defined-id. |
Use socket control statements to specify when libxlio will offload AF_INET/SOCK_STREAM or AF_INET/SOCK_DATAGRAM sockets (currently SOCK_RAW is not supported).
Each control statement specifies a matching rule that all its sub-expressions must evaluate as true (logical and) to apply. Statements are evaluated in order of definition according to "first-match".
Socket control statements use the following format:
use <transport> <role> <address|*>:<port range|*>
Where:
Option | Description |
transport | Define the mode of transport:
The default is xlio. |
role | Specify one of the following roles:
|
address | You can specify the local address the server is bind to or the remote server address the client connects to. The syntax for address matching is: <IPv4 address>[/<prefix_length>]|*
|
port range | Define the port range as:
Port range: 0-65536 |
To set the following:
Apply the rules to program tcp_lat with ID B1
Use XLIO by TCP clients connecting to machines that belong to subnet 192.168.1.*
Use OS when TCP server listens to port 5001 of any machine
In libxlio.conf, configure:
application-id tcp-lat B1
use xlio tcp_client 192.168
.1.0
/24
:*:*:*
use os tcp_server *:5001
use os udp_connect *:53
You must also set the XLIO parameter:
XLIO_APPLICATION_ID=B1
When you upgrade XLIO (through automatic or manual installation), the libxlio.conf configuration file is handled as follows:
If the existing configuration file has been modified since it was installed and is different from the upgraded RPM or DEB, the modified version will be left in place, and the version from the new RPM or DEB will be installed with a new suffix
If the existing configuration file has not been modified since it was installed, it will automatically be replaced by the version from the upgraded RPM or DEB
If the existing configuration file has been edited on disk, but is not actually different from the upgraded RPM or DEB, the edited version will be left in place; the version from the new RPM or DEB will not be installed