User Manual
Rev 2.3-1.0.1
Mellanox Technologies
147
To check the current module parameters, run:
mlx4_vnic_info -P
Default RX/TX rings number is the number of logical CPUs (threads). To set non-default values
to module parameters, the following line should be added to modprobe configuration file (e.g. /
etc/modprobe.conf file):
options mlx4_vnic <param_name>=<value> <param_name>=<value> ...
For additional information about discovery_pkeys please refer to Section 3.2.5.3.3.5, “Discov-
ery Partitions Configuration”, on page 144
3.2.5.3.4.2 vNic Interface Naming
The mlx4_vnic driver enables the kernel to determine the name of the registered vNic. By
default, the Linux kernel assigns each vNic interface the name eth<N>, where <N> is an incre-
mental number that keeps the interface name unique in the system. The vNic interface name may
not remain consistent among hosts or BridgeX reboots as the vNic creation can happen in a dif-
ferent order each time. Therefore, the interface name may change because of a "first-come-first-
served" kernel policy
. In automatic network administered mode, the vNic MAC address may also
change, which makes it difficult to keep the interface configuration persistent.
To control the interface name, you can use standard Linux utilities such as IFRENAME(8), IP(8)
or UDEV(7). For example, to change the interface eth2 name to eth.bx01.a10, run:
ifrename -i eth2 -n eth.bx01.a10
To generate a unique vNic interface name, use the mlx4_vnic_info script with the '-u' flag. The
script will generate a new name based on the scheme:
eth<pci-id>.<ib-port-num>.<gw_port_id>.[vlan-id]
For example, if vNic eth2 resides on an InfiniBand card on the PCI BUS ID 0a:00.0 PORT #1,
and is connected to the GW PORT ID #3 without VLAN, its unique name will be:
mlx4_vnic_info -u eth2
eth2 eth10.1.3
You can add your own custom udev rule to use the output of the script and to rename the vNic
interfaces automatically. To create a new udev rule file under /etc/udev/rules.d/61-vnic-net.rules,
include the line:
SUBSYSTEM=="net", PROGRAM=="/sbin/mlx4_vnic_info -u %k", NAME="%c{2+}"
UDEV service is active by default however if it is not active, run:
/sbin/udevd -d
When vNic MAC address is consistent, you can statically name each interface using the UDEV
following rule:
SUBSYSTEM=="net", SYSFS{address}=="aa:bb:cc:dd:ee:ff", NAME="ethX"
For further information on the UDEV rules syntax, please refer to udev man pages.
3.2.5.3.4.3 Para-Virtualized vNic
EoIB driver interfaces can be also used for Linux based virtualization environment such as Xen/
KVM based Hypervisors. This section explains how to configure Para-Virtualized (PV) EoIB to
work in such an environment.