[Bug 290793] iovctl on mlx5en won't work

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290793

Bjoern A. Zeeb <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open

--- Comment #12 from Bjoern A. Zeeb <[email protected]> ---
(In reply to David BOYER from comment #10)

Thanks. Good to know about the tool and docs.
It came up with what I had configured according to the tool and /dev/iov was
there...  Maybe a complete power cycle (power off/on) had helped.


Let me start again; it's a boot verbose (I have no idea what is normally logged
and what is not):

# uname -mrv
16.0-CURRENT FreeBSD 16.0-CURRENT #2 mlx5-n282064-a8740ba860bf: Fri Nov 21
21:21:29 UTC 2025    
[email protected]:/tank/users/bz/obj/tank/users/bz/git/FreeBSD/freebsd-src/amd64.amd64/sys/GENERIC
amd64

# iovctl -D -f /etc/iovctl/mce0.conf
mlx5_core: INFO: (mlx5_core0): E-Switch: disable SRIOV: active vports(4)

# pciconf -lv | grep -A4 vendor=0x15b3
mlx5_core0@pci0:2:0:0:  class=0x020000 rev=0x00 hdr=0x00 vendor=0x15b3
device=0x1013 subvendor=0x15b3 subdevice=0x0008
    vendor     = 'Mellanox Technologies'
    device     = 'MT27700 Family [ConnectX-4]'
    class      = network
    subclass   = ethernet
mlx5_core1@pci0:2:0:1:  class=0x020000 rev=0x00 hdr=0x00 vendor=0x15b3
device=0x1013 subvendor=0x15b3 subdevice=0x0008
    vendor     = 'Mellanox Technologies'
    device     = 'MT27700 Family [ConnectX-4]'
    class      = network
    subclass   = ethernet

# cat /etc/iovctl/mce0.conf 
PF {
        device : mlx5_core0;
        num_vfs : 3;
}

DEFAULT {
        passthrough : true;
}

# VF for use by host
VF-0 {
        mac-addr : "02:01:02:03:04:00";
        passthrough : false;
}
VF-1 {
        mac-addr : "02:01:02:03:04:01";
}

# iovctl -C -f /etc/iovctl/mce0.conf
mlx5_core: INFO: (mlx5_core0): E-Switch: E-Switch enable SRIOV: nvfs(3)
mlx5_core: WARN: FDB: Failed to add flow rule: dmac_v(0xfffff8000182ba0cM)
dmac_c(0xfffff8000182b80cM) -> vport(0), err(-45)
mlx5_core: INFO: (mlx5_core0): E-Switch: SRIOV enabled: active vports(4)
pcib3: allocated prefetch range (0x383fd2000000-0x383fd7ffffff) for rid 1a4 of
mlx5_core0
mlx5_core0: Lazy allocation of 0x6000000 bytes rid 0x1a4 type 3 at
0x383fd2000000
found-> vendor=0x15b3, dev=0x1014, revid=0x00
        domain=0, bus=2, slot=0, func=2
        class=02-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        MSI-X supports 6 messages in map 0x10
mlx5_core0: WARN: mlx5_eswitch_set_vport_mac:1199:(pid 6379): Failed to
mlx5_modify_nic_vport_node_guid vport(1) err=(-45)
mlx5_core0: ERR: mlx5_iov_add_vf:1969:(pid 6379): setting MAC for VF 1 failed,
error 45
found-> vendor=0x15b3, dev=0x1014, revid=0x00
        domain=0, bus=2, slot=0, func=3
        class=02-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        MSI-X supports 6 messages in map 0x10
mlx5_core0: WARN: mlx5_eswitch_set_vport_mac:1199:(pid 6379): Failed to
mlx5_modify_nic_vport_node_guid vport(2) err=(-45)
mlx5_core0: ERR: mlx5_iov_add_vf:1969:(pid 6379): setting MAC for VF 2 failed,
error 45
found-> vendor=0x15b3, dev=0x1014, revid=0x00
        domain=0, bus=2, slot=0, func=4
        class=02-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        MSI-X supports 6 messages in map 0x10
mlx5_core2: <mlx5_core> at device 0.2 on pci3
pcib3: attempting to grow memory window for (0-0xffffffff,0x2000000)
        front candidate range: 0xf8000000-0xf9ffffff
        back candidate range: 0xfc000000-0xfdffffff
mlx5_core2: 0x2000000 bytes of rid 0x10 res 3 failed (0, 0xffffffffffffffff).
pcib3: attempting to grow memory window for (0-0xffffffff,0x2000000)
        front candidate range: 0xf8000000-0xf9ffffff
        back candidate range: 0xfc000000-0xfdffffff
mlx5_core2: 0x2000000 bytes of rid 0x10 res 3 failed (0, 0xffffffffffffffff).
mlx5_core2: ERR: mlx5_cmd_init:1557:(pid 6379): Driver cmdif rev(5) differs
from firmware's(62446)
mlx5_core2: ERR: mlx5_load_one:1110:(pid 6379): Failed initializing command
interface, aborting
mlx5_core2: ERR: init_one:1709:(pid 6379): mlx5_load_one failed -22
device_attach: mlx5_core2 attach returned 22
pci3: <network, ethernet> at device 0.3 (no driver attached)
pci3: <network, ethernet> at device 0.4 (no driver attached)

# pciconf -lv | grep -A4 vendor=0x15b3
mlx5_core0@pci0:2:0:0:  class=0x020000 rev=0x00 hdr=0x00 vendor=0x15b3
device=0x1013 subvendor=0x15b3 subdevice=0x0008
    vendor     = 'Mellanox Technologies'
    device     = 'MT27700 Family [ConnectX-4]'
    class      = network
    subclass   = ethernet
mlx5_core1@pci0:2:0:1:  class=0x020000 rev=0x00 hdr=0x00 vendor=0x15b3
device=0x1013 subvendor=0x15b3 subdevice=0x0008
    vendor     = 'Mellanox Technologies'
    device     = 'MT27700 Family [ConnectX-4]'
    class      = network
    subclass   = ethernet
--
none62@pci0:2:0:2:      class=0x020000 rev=0x00 hdr=0x00 vendor=0x15b3
device=0x1014 subvendor=0x15b3 subdevice=0x0008
    vendor     = 'Mellanox Technologies'
    device     = 'MT27700 Family [ConnectX-4 Virtual Function]'
    class      = network
    subclass   = ethernet
ppt0@pci0:2:0:3:        class=0x020000 rev=0x00 hdr=0x00 vendor=0x15b3
device=0x1014 subvendor=0x15b3 subdevice=0x0008
    vendor     = 'Mellanox Technologies'
    device     = 'MT27700 Family [ConnectX-4 Virtual Function]'
    class      = network
    subclass   = ethernet
ppt1@pci0:2:0:4:        class=0x020000 rev=0x00 hdr=0x00 vendor=0x15b3
device=0x1014 subvendor=0x15b3 subdevice=0x0008
    vendor     = 'Mellanox Technologies'
    device     = 'MT27700 Family [ConnectX-4 Virtual Function]'
    class      = network
    subclass   = ethernet


I assume the CF-0 "none6@pci0:2:0:2" node should have become mlx5_core2 (mce2)?

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.