Ethernet Driver Usage and Configuration

To assign an IP address to the interface, run:

Copy
Copied!
            

#> ifconfig eth<x> <ip>

Note: 'x' is the OS assigned interface number.

To check driver and device information:

Copy
Copied!
            

#> ethtool -i eth<x>

Example:

Copy
Copied!
            

#> ethtool -i eth2 driver: mlx4_en version: 2.1.8 (Oct 06 2013) firmware-version: 2.30.3110 bus-info: 0000:1a:00.0

To query stateless offload status:

Copy
Copied!
            

#> ethtool -k eth<x>

To set stateless offload status:

Copy
Copied!
            

#> ethtool -K eth<x> [rx on|off] [tx on|off] [sg on|off] [tso on|off] [lro on|off]

To query interrupt coalescing settings:

Copy
Copied!
            

#> ethtool -c eth<x>

To enable/disable adaptive interrupt moderation:

Copy
Copied!
            

#>ethtool -C eth<x> adaptive-rx on|off

By default, the driver uses adaptive interrupt moderation for the receive path, which adjusts the moderation time to the traffic pattern.

To enable/disable adaptive interrupt moderation:

To set the values for packet rate limits and for moderation time high and low:

Copy
Copied!
            

#> ethtool -C eth<x> [pkt-rate-low N] [pkt-rate-high N] [rx-usecs-low N] [rx-usecs-high N]

Above an upper limit of packet rate, adaptive moderation will set the moderation time to its highest value. Below a lower limit of packet rate, the moderation time will be set to its lowest value.

To enable/disable adaptive interrupt moderation:

To set interrupt coalescing settings when adaptive moderation is disabled:

Copy
Copied!
            

#> ethtool -C eth<x> [rx-usecs N] [rx-frames N]

Warning

usec settings correspond to the time to wait after the *last* packet is sent/received before triggering an interrupt.

To query ring size values:

Copy
Copied!
            

#> ethtool -g eth<x>

To modify rings size:

Copy
Copied!
            

#> ethtool -G eth<x> [rx <N>] [tx <N>]

To obtain additional device statistics:

Copy
Copied!
            

#> ethtool -S eth<x>

The driver defaults to the following parameters:

  • Both ports are activated (i.e., a net device is created for each port)

  • The number of Rx rings for each port is the nearest power of 2 of number of cpu cores, limited by 16.

  • LRO is enabled with 32 concurrent sessions per Rx ring

Some of these values can be changed using module parameters, which can be displayed by running:

Copy
Copied!
            

#> modinfo mlx5_en

To set non-default values to module parameters, add to the /etc/modprobe.conf file:

Copy
Copied!
            

"options mlx5_en <param_name>=<value> <param_name>=<value> ..."

Values of all parameters can be observed in /sys/module/mlx5_en/parameters/.

© Copyright 2023, NVIDIA. Last updated on May 23, 2023.