Comment 9 for bug 1999181

Revision history for this message
Enoch Leung (leun0036) wrote (last edit ):

Reply to #7
----------------------------
After reboot, part of dmesg
============================
[ 4.895696] bnxt_en 0000:02:00.0 bcm57406_pf0: Reject SRIOV config request since if is down!
[ 4.895698] bnxt_en 0000:02:00.0: 4 VFs requested; only 0 enabled
[ 4.895831] bnxt_en 0000:02:00.0 bcm57406_pf0: Reject SRIOV config request since if is down!
[ 4.895834] bnxt_en 0000:02:00.0: 4 VFs requested; only 0 enabled
[ 5.039112] bnxt_en 0000:02:00.0 bcm57406_pf0: NIC Link is Up, 1000 Mbps full duplex, Flow control: ON - receive & transmit
[ 5.039116] bnxt_en 0000:02:00.0 bcm57406_pf0: EEE is not active
[ 5.039118] bnxt_en 0000:02:00.0 bcm57406_pf0: FEC autoneg on encoding: None
============================

now do cat
============================
/sys/class/net/bcm57406_pf0/device/sriov_numvfs = 0
/sys/class/net/bcm57406_pf0/device/sriov_totalvfs = 16 (I set it to 16 only long ago)

just in case, ip link
============================
2: bcm57406_pf0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff

now enable VFs manually
============================
echo 4 > /sys/class/net/bcm57406_pf0/device/sriov_numvfs

VFs created as expected after echo command above (did that before + long ago), ip link output...
============================
2: bcm57406_pf0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
    vf 0 link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust off
    vf 1 link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust off
    vf 2 link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust off
    vf 3 link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust off

reboot, and put PF to DOWN state
============================
ip link set dev bcm57406_pf0 down
2: bcm57406_pf0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether **:**:**:**:**:** brd ff:ff:ff:ff:ff:ff
============================
/sys/class/net/bcm57406_pf0/device/sriov_numvfs = 0
/sys/class/net/bcm57406_pf0/device/sriov_totalvfs = 16
echo 4 > /sys/class/net/bcm57406_pf0/device/sriov_numvfs

No VF created by the echo command above
============================
[ 258.882374] bnxt_en 0000:02:00.0 bcm57406_pf0: Reject SRIOV config request since if is down!
[ 258.882385] bnxt_en 0000:02:00.0: 4 VFs requested; only 0 enabled

Reply to #8
----------------------------
There is no such option as to create VFs inside the NIC BIOS; it allows only setting the maximum support VF (sriov_totalvfs). Just run "/usr/sbin/netplan apply --sriov-only" after reboot again, and all VFs are created successfully. So very likely this issue is related to this "Ensure that the PF interfaces are up. VFs are only created if PFs are up" remark.

Note that I intentionally have one port connected with cable, and one port have no cable. In both case I can create VFs, though I kinda remember that if I use not VEB, but none (or VEPA as well), it may not create VF either unless I have cable connected to the particular port. Can't confirm easily as I have my machine headless, but that's not as bad as the current issue for sure

And as a side note, I also tried a X540 (as well as I350 mentioned above), and there is no such problem. VFs are created fine with existing netplan after reboot, with or without cable connected. Never tried to put these Intel cards into DOWN state and try to create VFs though.