버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

멜라녹스(Mellanox) NIC 의 SR-IOV 활성화


목차

PCIe SR-IOV 활성화

BIOS → Advanced → PCIe Config → SR-IOV Support

Image RemovedImage Removed


장치 확인

Mellanox NIC 의 경우 기본값이 Infiniband 로 설정되어 있다.

코드 블럭
languagebash
themeEmacs
linenumberstrue
# ifconfig -a | grep -i UP
eno1np0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
eno2np1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
ib0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 4092
ib1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 4092
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

# lspci -v | grep -i mel
81:00.0 Infiniband controller: Mellanox Technologies MT28908 Family [ConnectX-6]
81:00.1 Infiniband controller: Mellanox Technologies MT28908 Family [ConnectX-6]


MFT 설치

OS에 맞는 Mellanox Firmware Tool 을 공식 홈페이지에서 다운로드 하여 설치한다.

https://www.mellanox.com/products/adapter-software/firmware-toolsMellanox Firmware Tool 설치

코드 블럭
languagebash
themeEmacs
linenumberstrue
wget https://www.mellanox.com/downloads/MFT/mft-4.17.0-106-x86_64-rpm.tgz
tar zxvf mft-4.17.0-106-x86_64-rpm.tgz
cd mft-4.17.0-106-x86_64-rpm
./install.sh


Mellanox SR-IOV 활성화

LINE 1 : MFT 도구 실행 / LINE 2 : 장비 타입 변경 (infiniband → ethernet) / LINE 3~4 : SR-IOV 설정 / LINE 5 : 설정 확인

...

코드 블럭
languagebash
themeEmacs
linenumberstrue
# mst start

# ls /dev/mst
mt4123_pciconf0  mt4123_pciconf0.1

# mlxconfig -d /dev/mst/mt4123_pciconf0 set LINK_TYPE_P1=2 LINK_TYPE_P2=2
# mlxconfig -d /dev/mst/mt4123_pciconf0 set SRIOV_EN=1
# mlxconfig -d /dev/mst/mt4123_pciconf0 set NUM_OF_VFS=16

# mlxconfig -d /dev/mst/mt4123_pciconf0 query | grep -E 'TYPE|SRIOV|VFS'
         NUM_OF_VFS                          16
         SRIOV_EN                            True(1)
         LINK_TYPE_P1                        ETH(2)
         LINK_TYPE_P2                        ETH(2)
         SRIOV_IB_ROUTING_MODE_P1            LID(1)
         SRIOV_IB_ROUTING_MODE_P2            LID(1)

# reboot

...


장치 변경사항 확인

코드 블럭
languagebash
themeEmacs
linenumberstrue
ifconfig -a | grep -i UP
lspci -v | grep -i mel
cat /sys/class/net/enp129s0f0/device/sriov_totalvfs

...