User Manual

Rev 2.2-1.0.1
Mellanox Technologies
73
4.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.
4.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.
Driver Configuration
For PV-EoIB to work properly, the following features must be disabled in the driver:
Large Receive Offload (LRO)
TX completion polling
RX fragmented buffers
To disable the features above, edit the modprobe configuration file as follow:
options mlx4_vnic lro_num=0 tx_polling=0 rx_linear=1