• Adding native FreeBSD support to nvme-cli?

    From Daniel Wagner@dwagner@suse.de to muc.lists.freebsd.ports on Thu Aug 6 10:50:08 2026
    From Newsgroup: muc.lists.freebsd.ports

    Hi,

    I'm maintaining nvme-cli and working on the next major version release,
    3.0. The original plan was just to clean up and refactor the library
    APIs, which included introducing a transport abstraction layer to make
    the nvme-cli project portable. This was done primarily to support the Management Interface specification (out-of-band communication with an
    NVMe controller) as a first-class citizen rather than a bolt-on addition
    to the existing library interface.

    And immediately Windows port happened... I was trying to counterbalance
    this by figuring out how difficult it would be to natively support
    FreeBSD. I've fixed all the build issues I found and created a dummy implementation.

    I don't have the time to fully implement the missing pieces, so I'm
    asking here (sorry if this is the wrong place) if anyone wants to help
    get it over the line?

    https://github.com/linux-nvme/nvme-cli/pull/3745

    Cheers,
    Daniel


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Daniel Engberg@diizzy@FreeBSD.org to muc.lists.freebsd.ports on Sat Aug 15 10:11:35 2026
    From Newsgroup: muc.lists.freebsd.ports

    On 2026-08-06 10:50, Daniel Wagner wrote:
    Hi,

    I'm maintaining nvme-cli and working on the next major version release,
    3.0. The original plan was just to clean up and refactor the library
    APIs, which included introducing a transport abstraction layer to make
    the nvme-cli project portable. This was done primarily to support the Management Interface specification (out-of-band communication with an
    NVMe controller) as a first-class citizen rather than a bolt-on addition
    to the existing library interface.

    And immediately Windows port happened... I was trying to counterbalance
    this by figuring out how difficult it would be to natively support
    FreeBSD. I've fixed all the build issues I found and created a dummy implementation.

    I don't have the time to fully implement the missing pieces, so I'm
    asking here (sorry if this is the wrong place) if anyone wants to help
    get it over the line?

    https://github.com/linux-nvme/nvme-cli/pull/3745

    Cheers,
    Daniel
    Hi Warner,

    Can you have a look at this?

    Best regards,
    Daniel


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Warner Losh@imp@bsdimp.com to muc.lists.freebsd.ports on Sat Aug 15 07:36:42 2026
    From Newsgroup: muc.lists.freebsd.ports

    --000000000000b467f8065916071e
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    On Sat, Aug 15, 2026 at 2:11=E2=80=AFAM Daniel Engberg <diizzy@freebsd.org>=
    wrote:

    On 2026-08-06 10:50, Daniel Wagner wrote:
    Hi,

    I'm maintaining nvme-cli and working on the next major version release, 3.0. The original plan was just to clean up and refactor the library
    APIs, which included introducing a transport abstraction layer to make
    the nvme-cli project portable. This was done primarily to support the Management Interface specification (out-of-band communication with an
    NVMe controller) as a first-class citizen rather than a bolt-on additio=
    n
    to the existing library interface.

    And immediately Windows port happened... I was trying to counterbalance this by figuring out how difficult it would be to natively support
    FreeBSD. I've fixed all the build issues I found and created a dummy implementation.

    I don't have the time to fully implement the missing pieces, so I'm
    asking here (sorry if this is the wrong place) if anyone wants to help
    get it over the line?

    https://github.com/linux-nvme/nvme-cli/pull/3745

    Cheers,
    Daniel
    Hi Warner,

    Can you have a look at this?


    While it is not yet complete, this work is a step in the right direction. Sounds like we
    both don't have the time to do this on a committed schedule. I am on
    vacation this
    week, but I left comments to point in the right direction. It would be at
    least a month
    before I'd be able to get back to looking at this. It doesn't look super
    hard, though,
    and maybe my comments can get it up at least to the level the current
    FreeBSD
    nvme-cli port (at 2.11) is at, if not a bit more.

    What timeline is 3.0 shaping up to be?

    Warner

    --000000000000b467f8065916071e
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Aug 15,=
    2026 at 2:11=E2=80=AFAM Daniel Engberg &lt;<a href=3D"mailto:diizzy@freebs= d.org">diizzy@freebsd.org</a>&gt; wrote:<br></div><blockquote class=3D"gmai= l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20= 4,204);padding-left:1ex">On 2026-08-06 10:50, Daniel Wagner wrote:<br>
    &gt; Hi,<br>
    &gt;<br>
    &gt; I&#39;m maintaining nvme-cli and working on the next major version rel= ease,<br>
    &gt; 3.0. The original plan was just to clean up and refactor the library<b=

    &gt; APIs, which included introducing a transport abstraction layer to make=

    &gt; the nvme-cli project portable. This was done primarily to support the<=

    &gt; Management Interface specification (out-of-band communication with an<=

    &gt; NVMe controller) as a first-class citizen rather than a bolt-on additi= on<br>
    &gt; to the existing library interface.<br>
    &gt;<br>
    &gt; And immediately Windows port happened... I was trying to counterbalanc= e<br>
    &gt; this by figuring out how difficult it would be to natively support<br> &gt; FreeBSD. I&#39;ve fixed all the build issues I found and created a dum= my<br>
    &gt; implementation.<br>
    &gt;<br>
    &gt; I don&#39;t have the time to fully implement the missing pieces, so I&= #39;m<br>
    &gt; asking here (sorry if this is the wrong place) if anyone wants to help=

    &gt; get it over the line?<br>
    &gt;<br>
    &gt; <a href=3D"https://github.com/linux-nvme/nvme-cli/pull/3745" rel=3D"no= referrer" target=3D"_blank">https://github.com/linux-nvme/nvme-cli/pull/374= 5</a><br>
    &gt;<br>
    &gt; Cheers,<br>
    &gt; Daniel<br>
    Hi Warner,<br>

    Can you have a look at this?<br></blockquote><div><br></div><div>While it i=
    s not yet complete, this work is a step in the right direction. Sounds like=
    we</div><div>both don&#39;t have the time to do this on a committed schedu= le. I am on vacation this</div><div>week, but I left comments to point in t=
    he right direction. It would be at least a month</div><div>before I&#39;d b=
    e able to get back to looking at this. It doesn&#39;t look super hard, thou= gh,</div><div>and maybe=C2=A0 my comments can get it up at least to the lev=
    el the current FreeBSD</div><div>nvme-cli port (at 2.11) is at, if not a bi=
    t more.</div><div><br></div><div>What timeline is 3.0 shaping up to be?</di= v><div><br></div><div>Warner</div></div></div>

    --000000000000b467f8065916071e--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Warner Losh@imp@bsdimp.com to muc.lists.freebsd.ports on Sun Aug 16 00:25:56 2026
    From Newsgroup: muc.lists.freebsd.ports

    --0000000000000798730659242183
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    On Sat, Aug 15, 2026 at 7:06=E2=80=AFPM Konstantin Belousov <kostikbel@gmai= l.com>
    wrote:

    On Sat, Aug 15, 2026 at 07:36:42AM -0600, Warner Losh wrote:
    On Sat, Aug 15, 2026 at 2:11=E2=80=AFAM Daniel Engberg <diizzy@freebsd.=

    wrote:

    On 2026-08-06 10:50, Daniel Wagner wrote:
    Hi,

    I'm maintaining nvme-cli and working on the next major version
    release,
    3.0. The original plan was just to clean up and refactor the librar=
    y
    APIs, which included introducing a transport abstraction layer to
    make
    the nvme-cli project portable. This was done primarily to support t=
    he
    Management Interface specification (out-of-band communication with =
    an
    NVMe controller) as a first-class citizen rather than a bolt-on
    addition
    to the existing library interface.

    And immediately Windows port happened... I was trying to
    counterbalance
    this by figuring out how difficult it would be to natively support FreeBSD. I've fixed all the build issues I found and created a dumm=
    y
    implementation.

    I don't have the time to fully implement the missing pieces, so I'm asking here (sorry if this is the wrong place) if anyone wants to
    help
    get it over the line?

    https://github.com/linux-nvme/nvme-cli/pull/3745

    Cheers,
    Daniel
    Hi Warner,

    Can you have a look at this?


    While it is not yet complete, this work is a step in the right directio=
    n.
    Sounds like we
    both don't have the time to do this on a committed schedule. I am on vacation this
    week, but I left comments to point in the right direction. It would be =
    at
    least a month
    before I'd be able to get back to looking at this. It doesn't look supe=
    r
    hard, though,
    and maybe my comments can get it up at least to the level the current FreeBSD
    nvme-cli port (at 2.11) is at, if not a bit more.

    What timeline is 3.0 shaping up to be?


    Someone noted the https://github.com/bsdimp/freebsd-nvme-shim to me,
    and I have to reply there with the https://github.com/kostikbel/rdma-core branch freebsd. In particular, I mean the freebsd-headers subdirectory.


    I'll have to take a closer look when I'm not on vacation...


    I think eventually we might want something like linuxAPI (like linuxKPI)
    for userspace compat where we put stuff that is not appropriate for the FreeBSD base but is still useful to compile userspace with too many linuxisms/glibcisms.


    Yes. I toyed with the idea of creating a /usr/include/linux-uapi directory
    that
    would allow for us to have a uapi-compliant API, at least one "good enough"
    for porting those things that have causal linuxisms (where standard-ish API=
    s
    exist, but force of habit keeps people using the linux-APIs out of
    ignorance),
    but worried about what to do about the more complex things. Like whether
    we'd also need a liblinux-uapi or not...

    So I'm receptive to the idea of moving this into base. Bits of the nvme-shi=
    m
    are kinda nvme-cli specific (though maybe with its new porting layer api
    some of those can go away -- I've no thad time to deal with it).

    Warner

    --0000000000000798730659242183
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Aug 15,=
    2026 at 7:06=E2=80=AFPM Konstantin Belousov &lt;<a href=3D"mailto:kostikbe= l@gmail.com">kostikbel@gmail.com</a>&gt; wrote:<br></div><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">On Sat, Aug 15, 2026 at 07:36:42AM -0600, = Warner Losh wrote:<br>
    &gt; On Sat, Aug 15, 2026 at 2:11=E2=80=AFAM Daniel Engberg &lt;<a href=3D"= mailto:diizzy@freebsd.org" target=3D"_blank">diizzy@freebsd.org</a>&gt; wro= te:<br>
    &gt; <br>
    &gt; &gt; On 2026-08-06 10:50, Daniel Wagner wrote:<br>
    &gt; &gt; &gt; Hi,<br>
    &gt; &gt; &gt;<br>
    &gt; &gt; &gt; I&#39;m maintaining nvme-cli and working on the next major v= ersion release,<br>
    &gt; &gt; &gt; 3.0. The original plan was just to clean up and refactor the=
    library<br>
    &gt; &gt; &gt; APIs, which included introducing a transport abstraction lay=
    er to make<br>
    &gt; &gt; &gt; the nvme-cli project portable. This was done primarily to su= pport the<br>
    &gt; &gt; &gt; Management Interface specification (out-of-band communicatio=
    n with an<br>
    &gt; &gt; &gt; NVMe controller) as a first-class citizen rather than a bolt= -on addition<br>
    &gt; &gt; &gt; to the existing library interface.<br>
    &gt; &gt; &gt;<br>
    &gt; &gt; &gt; And immediately Windows port happened... I was trying to cou= nterbalance<br>
    &gt; &gt; &gt; this by figuring out how difficult it would be to natively s= upport<br>
    &gt; &gt; &gt; FreeBSD. I&#39;ve fixed all the build issues I found and cre= ated a dummy<br>
    &gt; &gt; &gt; implementation.<br>
    &gt; &gt; &gt;<br>
    &gt; &gt; &gt; I don&#39;t have the time to fully implement the missing pie= ces, so I&#39;m<br>
    &gt; &gt; &gt; asking here (sorry if this is the wrong place) if anyone wan=
    ts to help<br>
    &gt; &gt; &gt; get it over the line?<br>
    &gt; &gt; &gt;<br>
    &gt; &gt; &gt; <a href=3D"https://github.com/linux-nvme/nvme-cli/pull/3745"=
    rel=3D"noreferrer" target=3D"_blank">https://github.com/linux-nvme/nvme-cl= i/pull/3745</a><br>
    &gt; &gt; &gt;<br>
    &gt; &gt; &gt; Cheers,<br>
    &gt; &gt; &gt; Daniel<br>
    &gt; &gt; Hi Warner,<br>
    &gt; &gt;<br>
    &gt; &gt; Can you have a look at this?<br>
    &gt; &gt;<br>
    &gt; <br>
    &gt; While it is not yet complete, this work is a step in the right directi= on.<br>
    &gt; Sounds like we<br>
    &gt; both don&#39;t have the time to do this on a committed schedule. I am = on<br>
    &gt; vacation this<br>
    &gt; week, but I left comments to point in the right direction. It would be=
    at<br>
    &gt; least a month<br>
    &gt; before I&#39;d be able to get back to looking at this. It doesn&#39;t = look super<br>
    &gt; hard, though,<br>
    &gt; and maybe=C2=A0 my comments can get it up at least to the level the cu= rrent<br>
    &gt; FreeBSD<br>
    &gt; nvme-cli port (at 2.11) is at, if not a bit more.<br>
    &gt; <br>
    &gt; What timeline is 3.0 shaping up to be?<br>
    &gt; <br>

    Someone noted the <a href=3D"https://github.com/bsdimp/freebsd-nvme-shim" r= el=3D"noreferrer" target=3D"_blank">https://github.com/bsdimp/freebsd-nvme-= shim</a> to me,<br>
    and I have to reply there with the <a href=3D"https://github.com/kostikbel/= rdma-core" rel=3D"noreferrer" target=3D"_blank">https://github.com/kostikbe= l/rdma-core</a><br>
    branch freebsd.=C2=A0 In particular, I mean the freebsd-headers subdirector= y.<br></blockquote><div><br></div><div>I&#39;ll have to take a closer look = when I&#39;m not on vacation...=C2=A0</div><div>=C2=A0</div><blockquote cla= ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex">
    I think eventually we might want something like linuxAPI (like linuxKPI)<br=

    for userspace compat where we put stuff that is not appropriate for the<br> FreeBSD base but is still useful to compile userspace with too many<br> linuxisms/glibcisms.<br></blockquote><div><br></div><div>Yes. I toyed with = the idea of creating a /usr/include/linux-uapi directory that</div><div>wou=
    ld allow for us to have a uapi-compliant API, at least one &quot;good enoug= h&quot;</div><div>for porting those things that have causal linuxisms (wher=
    e standard-ish APIs</div><div><span style=3D"background-color:transparent">= exist, but force of habit keeps people using the linux-APIs out of ignoranc= e),</span></div><div><span style=3D"background-color:transparent">but worri=
    ed about what to do about the more complex things. Like whether</span></div= ><div><span style=3D"background-color:transparent">we&#39;d also need a lib= linux-uapi or not...</span></div><div><span style=3D"background-color:trans= parent"><br></span></div><div><span style=3D"background-color:transparent">=
    So I&#39;m receptive to the idea of moving this into base. Bits of the nvme= -shim</span></div><div><span style=3D"background-color:transparent">are kin=
    da nvme-cli specific (though maybe with its new porting layer api</span></d= iv><div><span style=3D"background-color:transparent">some of those can go a= way -- I&#39;ve no thad time to deal with it).</span></div><div><span style= =3D"background-color:transparent"><br></span></div><div><span style=3D"back= ground-color:transparent">Warner</span></div></div></div>

    --0000000000000798730659242183--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2