HowTo map VFs to port on ConnectX-3 Dual port

Version 2

    The following post explains the mapping between VFs and ports on ConnectX-3 dual port adapters.

     

    References

     

    Overview

    Mapping VFs to ports is as follows:

    Assuming the kernel module file /etc/modprobe.d/mlx4_core.conf has the following configuration:

    options mlx4_core num_vfs=1,2,3 port_type_array=2,2 log_num_mgm_entry_size=-1

     

    And the output of lspci -nnn:

    # lspci -nnn |grep Mellanox

    84:00.0 Network controller [0280]: Mellanox Technologies MT27500 Family [ConnectX-3] [15b3:1003]

    84:00.1 Network controller [0280]: Mellanox Technologies MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] [15b3:1004]

    84:00.2 Network controller [0280]: Mellanox Technologies MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] [15b3:1004]

    84:00.3 Network controller [0280]: Mellanox Technologies MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] [15b3:1004]

    84:00.4 Network controller [0280]: Mellanox Technologies MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] [15b3:1004]

    84:00.5 Network controller [0280]: Mellanox Technologies MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] [15b3:1004]

    84:00.6 Network controller [0280]: Mellanox Technologies MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] [15b3:1004]

     

    In this example we have 6 VFs (num_vfs=1,2,3).

    • The first VF will be assigned to port 1.
    • The next two VFs will be assigned to port 2
    • The next three VFs will be assigned to both ports.

     

    VFPort
    84:00.11
    84:00.22
    84:00.32
    84:00.41,2
    84:00.51,2
    84:00.61,2