NIC 드라이버 확인

# lspci -v | grep -i mel -A 30
81:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]
    ...
    Kernel driver in use: mlx5_core
    Kernel modules: mlx5_core


VF 최대 개수 제한

IntelBroadcomMellanox


options ixgbe max_vfs=7



options bnxt_en max_vfs=7



options mlx5_core max_vfs=16



(참고) 로컬에서 작업중이라면 임시로 다음과 같이 작업할 수도 있다.

LINE 1 :  NIC 드라이버 언로드 (해당 드라이버를 사용하는 NIC의 네트워크 끊어짐)

LINE 2 : 새로운 옵션을 NIC 드라이버 로드

modprobe -r ixgbe
modprobe ixgbe max_vfs=7


VF 개수 선언

echo 3 > /sys/class/net/eno1np0/device/sriov_numvfs
echo 6 > /sys/class/net/enp129s0f0/device/sriov_numvfs


재시작

# reboot


VF 생성 확인

상기 rc.local 에서 sriov_numvfs 에 선언한 개수만큼 VF가 생성되었다.

# ifconfig -a | grep mtu
eno1np0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
eno1v0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
eno1v1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
eno1v2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
eno2np1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
enp129s0f0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
enp129s0f1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
enp129s0f0v0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
enp129s0f0v1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
enp129s0f0v2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
enp129s0f0v3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
enp129s0f0v4: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
enp129s0f0v5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

# lspci -v | grep -i eth
81:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]
81:00.1 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6]
81:00.2 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function]
81:00.3 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function]
81:00.4 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function]
81:00.5 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function]
81:00.6 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function]
81:00.7 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function]
c8:00.0 Ethernet controller: Broadcom Inc. and subsidiaries BCM57416 NetXtreme-E Dual-Media 10G RDMA Ethernet Controller (rev 01)
c8:00.1 Ethernet controller: Broadcom Inc. and subsidiaries BCM57416 NetXtreme-E Dual-Media 10G RDMA Ethernet Controller (rev 01)
c8:02.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme-E Ethernet Virtual Function
c8:02.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme-E Ethernet Virtual Function
c8:02.2 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme-E Ethernet Virtual Function
c8:02.3 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme-E Ethernet Virtual Function