Virtual Function ports dont auto start

Talion

Active Member
Jun 19, 2018
15
0
41
48
Hello,

I enabled sr-iov on my servers but virtual function ports dont come up online.

Code:
/etc/network/interfaces

allow-hotplug enp3s17f7
iface enp3s17f7 inet static
        address  10.1.1.12
        netmask  255.255.255.0

How can i enable it on boot?

Thanks

Talion
 
This works for me : http://enricorossi.org/blog/2016/intel_sr-iov_on_Debian_Stretch/

My udev rule is saved here /etc/udev/rules.d/99-sriov.rules and looks like:
Code:
KERNEL=="0000:08:00.0", SUBSYSTEM=="pci", DRIVER=="igb", ATTR{vendor}=="0x8086", ATTR{device}=="0x10c9", ATTR{sriov_numvfs}="7"

Note that your kernel address/vendor/driver and device may be different. The link explains how to find them.

sriov_numvfs is the number of virtual functions, my rule lists 7.
 
Hello Trystan,

Actually i meant the activating interface rather than VF itself. My VFs are working working correctly but they are not online. I needed to activate them manually by "ip link set enp3s17f7 up" to activate them after that it works and i can ping.


But this method fix this warning;

Code:
[    1.888447] ixgbe 0000:03:00.1: Enabling SR-IOV VFs using the max_vfs module parameter is deprecated.
[    1.888448] ixgbe 0000:03:00.1: Please use the pci sysfs interface instead. Ex:
[    1.888451] ixgbe 0000:03:00.1: echo '8' > /sys/bus/pci/devices/0000:03:00.1/sriov_numvfs

But this time predictable interface names dont work.

Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens2f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP mode DEFAULT group default qlen 1000
    link/ether 90:e2:ba:7d:18:a8 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
8: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 90:e2:ba:7d:18:a8 brd ff:ff:ff:ff:ff:ff
root@pmxn1:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens2f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP mode DEFAULT group default qlen 1000
    link/ether 90:e2:ba:7d:18:a8 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
3: ens2f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 90:e2:ba:7d:18:a9 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off, query_rss off
4: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 90:1b:0e:ce:3c:c4 brd ff:ff:ff:ff:ff:ff
5: eno2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 90:1b:0e:ce:3c:c5 brd ff:ff:ff:ff:ff:ff
6: eno3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 90:1b:0e:ce:3c:c6 brd ff:ff:ff:ff:ff:ff
7: eno4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 90:1b:0e:ce:3c:c7 brd ff:ff:ff:ff:ff:ff
8: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 90:e2:ba:7d:18:a8 brd ff:ff:ff:ff:ff:ff
9: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether e2:7c:e3:e8:07:f9 brd ff:ff:ff:ff:ff:ff
10: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 1a:d2:8f:50:24:00 brd ff:ff:ff:ff:ff:ff
11: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether ea:9d:bd:56:27:00 brd ff:ff:ff:ff:ff:ff
12: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 4a:47:1f:de:99:9c brd ff:ff:ff:ff:ff:ff
13: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether a2:69:d9:5f:24:b0 brd ff:ff:ff:ff:ff:ff
14: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 12:10:65:1f:2a:13 brd ff:ff:ff:ff:ff:ff
15: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 9e:db:f4:27:39:b7 brd ff:ff:ff:ff:ff:ff
16: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 32:73:64:f9:d4:98 brd ff:ff:ff:ff:ff:ff
17: eth8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether ea:91:49:95:c4:71 brd ff:ff:ff:ff:ff:ff
18: eth9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 56:c7:83:5b:5f:6b brd ff:ff:ff:ff:ff:ff
19: eth10: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 8e:d2:51:2d:03:6d brd ff:ff:ff:ff:ff:ff
20: eth11: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 62:88:fe:a9:19:a5 brd ff:ff:ff:ff:ff:ff
21: eth12: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether ce:63:b1:b7:2d:e4 brd ff:ff:ff:ff:ff:ff
22: eth13: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 06:9e:83:e1:fb:b8 brd ff:ff:ff:ff:ff:ff
23: eth14: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 66:4d:6e:dd:d0:de brd ff:ff:ff:ff:ff:ff
24: eth15: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 72:6e:67:83:76:5d brd ff:ff:ff:ff:ff:ff


Thanks!