User Manual
Rev 2.2-1.0.1
Mellanox Technologies
123
• <pci_id>/port/<m>/pkey_idx/<n>, where m = 1..2 and n = 0..126
For instructions on configuring pkey_idx, please see below.
4.15.6.2.2Configuring an Alias GUID (under ports/<n>/admin_guids)
Step 1.
Determine the GUID index of the PCI Virtual Function that you want to pass through to a
guest.
For example, if you want to pass through PCI function 02:00.3 to a certain guest, you ini-
tially need to see which GUID index is used for this function.
To do so:
cat /sys/class/infiniband/iov/0000:02:00.3/port/<port_num>/gid_idx/0
The value returned will present which guid index to modify on Dom0.
Step 2. Modify the physical GUID table via the admin_guids sysfs interface.
To configure the GUID at index
<n> on port <port_num>
cd /sys/class/infiniband/mlx4_0/iov/ports/<port_num>/admin_guids
echo <your desired guid> > n
:
Example:
cd /sys/class/infiniband/mlx4_0/iov/ports/1/admin_guids
echo
1
1. echo "0x0" means let the SM assign a value to that GUID
echo "0xffffffffffffffff" means delete that GUID
echo <any other value> means request the SM to assign this GUID to this index
"0x002fffff8118" > 3
Step 3. Read the administrative status of the GUID index.
To read the administrative status of GUID index
m on port n
cat /sys/class/infiniband/mlx4_0/iov/ports/<n>/admin_guids/<m>
:
Step 4. Check the operational state of a GUID.
/sys/class/infiniband/mlx4_0/iov/ports/<n>/gids (where n = 1 or 2)
The values indicate what gids are actually configured on the firmware/hardware, and all
the entries are R/O.
Step 5. Compare the value you read under the "admin_guids" directory at that index with the value
under the
"gids" directory, to verify the change requested in Step 3 has been accepted by
the SM, and programmed into the hardware port GID table.
If the value under
admin_guids/<m> is different that the value under gids/<m>, the
request is still in progress.
4.15.6.2.3Multi-GUID Support in InfiniBand
As of MLNX_OFED v2.2-1.0.0, Infiniband VFs in SR-IOV setting can have more than a single
GUID to be used for their purposes. Totally there are 128 GUIDs per port, where the PF occupies
2 entries, and the remaining GUIDs are divided equally between all the VFs. If there are any
remainders, those GUIDs are given to the VFs with the lowest IDs.
For example in case that are 5 VFs, the division will be as follows: PF – 2, slave 1 will have 26
and last 4 slaves will have 25. (2 + 1 * 26 + 4 * 25 = 128).
To find the mapping between VF's GUID entry to its physical one, use the sysfs mechanism
<gid_idx> directory.