interface not showing in "ifconfig -a". How to fix? (FreeBSD inside Vmware ESXi)

as above. Thanks in advance for the help

1 thing to note is that Emulex card has been configured as a "virtual NIC" so it seems I have 4x of the card.

might be best explain with some command dump

Code:
myuser in my-nas in /usr/home/myuser
➜  ifconfig -a
vmx0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=4e403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,NOMAP>
        ether 00:0c:29:09:52:8a
        inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

myuser in my-nas in /usr/home/myuser
➜ sudo grep -i "oce" /var/run/dmesg.boot
FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs
oce0: <Emulex CNA NIC function:///11.0.50.0///> mem 0xfe200000-0xfe203fff at device 0.0 on pci4
device_attach: oce0 attach returned 6
oce0: <Emulex CNA NIC function:///11.0.50.0///> mem 0xfe200000-0xfe203fff at device 0.0 on pci4
device_attach: oce0 attach returned 6
oce0: <Emulex CNA NIC function:///11.0.50.0///> mem 0xfe200000-0xfe203fff at device 0.0 on pci4
device_attach: oce0 attach returned 6
oce0: <Emulex CNA NIC function:///11.0.50.0///> mem 0xfe200000-0xfe203fff at device 0.0 on pci4
device_attach: oce0 attach returned 6

myuser in my-nas in /usr/home/myuser
➜  cat /boot/loader.conf
security.bsd.allow_destructive_dtrace=0
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"

######################################
#my-nas

if_oce_load="YES"

myuser in my-nas in /usr/home/myuser
➜

full dmesg.boot on this link => https://pastebin.com/7EELVKRr
 
Important line here is device_attach: oce0 attach returned 6 meaning that driver failed to attach.

Are you using PCI pass-through for this NIC? Or is it virtual function using SR-IOV?

Also try verbose boot (i.e. boot -v) from the loader prompt, it could provide hints as to why it failed.
 
Important line here is device_attach: oce0 attach returned 6 meaning that driver failed to attach.

Are you using PCI pass-through for this NIC? Or is it virtual function using SR-IOV?

Also try verbose boot (i.e. boot -v) from the loader prompt, it could provide hints as to why it failed.
virtual function using SR-IOV. I'll try booting with the additional parameter. Thank you.
 
I am not really familiar with oce(4), but at least for Intel NICs there is a separate driver for VFs, iavf(4).

Though looking through oce source, I see that at least some of the VF ids are (should be) supported:
Code:
static uint32_t supportedDevices[] =  {
        (PCI_VENDOR_SERVERENGINES << 16) | PCI_PRODUCT_BE2,
        (PCI_VENDOR_SERVERENGINES << 16) | PCI_PRODUCT_BE3,
        (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_BE3,
        (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_XE201,
        (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_XE201_VF,
        (PCI_VENDOR_EMULEX << 16) | PCI_PRODUCT_SH
};

Yours must be PCI_PRODUCT_XE201_VF (0xe228), you can double-check using pciconf -lv.

Sadly, the driver initialization does not seem to provide much in terms of tracing and reporting the errors, however if hw init failed it should have said so and you don't seem to have that in dmesg, so it must be something else. In case verbose boot does not provide any further information, you could try adding printfs in oce_attach() and see where/why exactly it fails.
 
Back
Top