NVIDIA MLNX_EN Documentation v23.10-3.2.1.1 LTS
NVIDIA MLNX_EN Documentation v23.10-3.2.1.1 LTS

Ethernet Driver Usage and Configuration

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

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:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

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:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

Copy
Copied!
            

#> ethtool -k eth<x>

To set stateless offload status:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

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:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

Copy
Copied!
            

#> ethtool -c eth<x>

To enable/disable adaptive interrupt moderation:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

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.

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

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.

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

To set interrupt coalescing settings when adaptive moderation is disabled:

Copy
Copied!
            

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

Note

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

To query ring size values:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

Copy
Copied!
            

#> ethtool -g eth<x>

To modify rings size:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

Copy
Copied!
            

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

To obtain additional device statistics:

Procedure_Heading_Icon-version-1-modificationdate-1719921116512-api-v2.PNG

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 2024, NVIDIA. Last updated on Jul 2, 2024.