Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2023 07:03:29 -0700
From:      Chuck Tuffli <chuck@freebsd.org>
To:        Benoit Chesneau <benoitc@enki-multimedia.eu>
Cc:        "freebsd-net@FreeBSD.org" <freebsd-net@freebsd.org>
Subject:   Re: how to setup the host interfacce with sriov and mlx5en(4) driver
Message-ID:  <CAKAYmMKYKTL-kk_XKtsU5MBgifrPoJZyY24eDU3CVAUPZ6E0%2Bg@mail.gmail.com>
In-Reply-To: <QQYOMF0aCNNuAHisQ5RWN94trnvu79VtRcbtikpRnFo2Y93LOrgdB0cROK2eUAHger9EHaXuEFMLR2tui3VFE2WDX8V7pOHGFbRkgLji0bo=@enki-multimedia.eu>
References:  <QQYOMF0aCNNuAHisQ5RWN94trnvu79VtRcbtikpRnFo2Y93LOrgdB0cROK2eUAHger9EHaXuEFMLR2tui3VFE2WDX8V7pOHGFbRkgLji0bo=@enki-multimedia.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 23, 2023 at 1:14=E2=80=AFAM Benoit Chesneau
<benoitc@enki-multimedia.eu> wrote:
>
> Hi all,
>
> I am trying to understand how works sriov with the mlx5en(4) driver.
>
>  In particularly should Isetup the VF-0 as passthrough false? On intel NI=
C i would have to set one of the VF not passthrough for the host. It seems =
that sr-iov is behaving differently on mellanox: even if all VFs  are set w=
ith `passthrough=3Dtrue` I can still configure the interface mce0 on the ho=
st.
>
> Is this expected? Does it mean the VF-0 is usable too?

In the past, I set up a system similarly:
/etc/rc.conf had the line iovctl_files=3D"/etc/iovctl.d/*.conf"

The file /etc/iovctl.d/mlx.0.conf contains:
$ head -20 /etc/iovctl.d/mlx.0.conf
# Creates 8 virtual functions
# Assuming two physical functions and 16 enabled VF's,
# VF's will be X:Y.[2-9]
PF {
device : "mlx5_core0";
num_vfs : 8;
}

DEFAULT {
passthrough : true;
}

VF-0 {
node-guid : 0x706bb09cdcc711ea
port-guid : 0x706bb09cdcc711eb
}
...

The VM's bhyve conf contains
$ grep pass /vm/jbof-00/jbof-00.conf
passthru0=3D"55/0/2"

HTH

--chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKAYmMKYKTL-kk_XKtsU5MBgifrPoJZyY24eDU3CVAUPZ6E0%2Bg>