Ethernet Driver Usage and Configuration
To assign an IP address to the interface, run:
#> ifconfig eth<x> <ip>
Note: 'x' is the OS assigned interface number.
To check driver and device information:
#> ethtool -i eth<x>
Example:
#> 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:
#> ethtool -k eth<x>
To set stateless offload status:
#> ethtool -K eth<x> [rx on|off] [tx on|off] [sg on|off] [tso on|off] [lro on|off]
To query interrupt coalescing settings:
#> ethtool -c eth<x>
To enable/disable adaptive interrupt moderation:
#>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 set the values for packet rate limits and for moderation time high and low:
#> 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 set interrupt coalescing settings when adaptive moderation is disabled:
#> ethtool -C eth<x> [rx-usecs N] [rx-frames N]
usec settings correspond to the time to wait after the *last* packet is sent/received before triggering an interrupt.
To query ring size values:
#> ethtool -g eth<x>
To modify rings size:
#> ethtool -G eth<x> [rx <N>] [tx <N>]
To obtain additional device statistics:
#> 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:
#> modinfo mlx5_en
To set non-default values to module parameters, add to the /etc/modprobe.conf file:
"options mlx5_en <param_name>=<value> <param_name>=<value> ..."
Values of all parameters can be observed in /sys/module/mlx5_en/parameters/.