image image image image image

On This Page

In this page we show how to run a simple network benchmarking test and compare the running results using the kernel’s network stack and that of XLIO.

Before running a user application, you must set the library libxlio.so into the environment variable LD_PRELOAD. For further information, please refer to the XLIO User Manual.

Example: 

$ LD_PRELOAD=libxlio.so sockperf server -i 11.4.3.3

If LD_PRELOAD is assigned with libxlio.so without a path (as in the Example) then libxlio.so is read from a known library path under your distributions’ OS otherwise it is read from the specified path.

As a result, an XLIO header message should precede your running application. 

 XLIO INFO   : ---------------------------------------------------------------
 XLIO INFO   : XLIO_VERSION: 1.1.8-1 Release built on Nov  4 2021 19:50:17
 XLIO INFO   : Cmd Line: sockperf sr -i 20.138.21.1
 XLIO INFO   : OFED Version: MLNX_OFED_LINUX-5.5-1.0.1.0:
 XLIO INFO   : ---------------------------------------------------------------

Followed by the application output, please note that:

  • The XLIO version is shown
  • The command line indicates your application’s name (in the above example: sockperf)

The appearance of the XLIO header indicates that the XLIO library is loaded with your application.

Running Using Non-Root Permission

  • Check that ld is able to find the libxlio library

    ld -lxlio –verbose
  • Set UID bit to enforce user ownership

    sudo chmod u+s /usr/lib64/libxlio*
    sudo chmod u+s /sbin/sysctl
  • Grant CAP_NET_RAW privileges to application

    sudo setcap cap_net_raw,cap_net_admin+ep  /usr/bin/sockperf
  • Launch application under no root

    LD_PRELOAD=libxlio.so sockperf sr --tcp -i 10.0.0.4 -p 12345
    LD_PRELOAD=libxlio.so sockperf pp --tcp -i 10.0.0.4 -p 12345 -t10

Libxlio-debug.so

libxlio.so is limited to DEBUG log level. In case it is required to run XLIO with detailed logging higher than DEBUG level – use a library called libxlio-debug.so that comes with OFED installation.

Before running your application, set the library libxlio-debug.so into the environment variable LD_PRELOAD (instead of libxlio.so).

Example: 

$ LD_PRELOAD=libxlio-debug.so sockperf server -i 11.4.3.3

libxlio-debug.so is located in the same library path as libxlio.so under your distribution’s OS.

For example in RHEL8.x x86_64, the libxlio.so is located in /usr/lib64/libxlio-debug.so.

NOTE: If you need to compile XLIO with a log level higher than DEBUG run “configure” with the following parameter:

./configure --enable-opt-log=none