Re: git: 2d6114f6d26b - main - libifconfig: Add an SR-IOV VF status query

From: Kevin Bowling <kevin.bowling_at_kev009.com>
Date: Sun, 09 Aug 2026 23:22:56 UTC
On Sun, Aug 9, 2026 at 4:11 PM Enji Cooper (yaneurabeya)
<yaneurabeya@gmail.com> wrote:
>
>
> > On Aug 9, 2026, at 12:20 AM, Herbert J. Skuhra <herbert@gojira.at> wrote:
> >
> > On Sun, 09 Aug 2026 08:47:45 +0200, Kevin Bowling wrote:
> >>
> >> The branch main has been updated by kbowling:
> >>
> >> URL: https://cgit.FreeBSD.org/src/commit/?id=2d6114f6d26bf7dfa5ad94e1db9b09ee7108dc7a
> >>
> >> commit 2d6114f6d26bf7dfa5ad94e1db9b09ee7108dc7a
> >> Author:     Kevin Bowling <kbowling@FreeBSD.org>
> >> AuthorDate: 2026-08-09 02:03:20 +0000
> >> Commit:     Kevin Bowling <kbowling@FreeBSD.org>
> >> CommitDate: 2026-08-09 06:46:41 +0000
> >>
> >>    libifconfig: Add an SR-IOV VF status query
> >>
> >>    Provide a public helper which retrieves, unpacks, and validates the
> >>    versioned VF status nvlist.  Validate the required VF indices and the
> >>    shape and version of driver-specific extension namespaces while allowing
> >>    unknown optional fields.
> >>
> >>    The ioctl argument is not copied back when the command returns EFBIG.
> >>    Start with a practical buffer and grow it geometrically rather than
> >>    relying on the required length being observable.
> >>
> >>    Use the helper in ifconfig so other consumers share the same transport
> >>    and validation behavior.
> >> ---
> >> lib/libifconfig/Makefile      |   2 +-
> >> lib/libifconfig/Symbol.map    |   4 ++
> >> lib/libifconfig/libifconfig.c | 129 ++++++++++++++++++++++++++++++++++++++++++
> >> lib/libifconfig/libifconfig.h |  11 ++++
> >> sbin/ifconfig/ifvfstatus.c    |  60 +++-----------------
> >> share/mk/src.libnames.mk      |   4 +-
> >> 6 files changed, 154 insertions(+), 56 deletions(-)
> >
> > This breaks buildworld:
> >
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_get_vf_status) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> > ld.lld: error: undefined symbol: FreeBSD_nvlist_get_number
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> > ld.lld: error: undefined symbol: FreeBSD_nvlist_exists_nvlist_array
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> > ld.lld: error: undefined symbol: FreeBSD_nvlist_get_nvlist_array
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> > ld.lld: error: undefined symbol: FreeBSD_nvlist_exists
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> > ld.lld: error: undefined symbol: FreeBSD_nvlist_exists_nvlist
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> > ld.lld: error: undefined symbol: FreeBSD_nvlist_get_nvlist
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> >
> > ld.lld: error: undefined symbol: FreeBSD_nvlist_next
> >>>> referenced by libifconfig.c
> >>>>              libifconfig.o:(ifconfig_vf_status_validate) in archive /usr/obj/home/herbert/sources/freebsd/main/src/amd64.amd64/lib/libifconfig/libifconfig.a
> > cc: error: linker command failed with exit code 1 (use -v to see invocation)
> > *** [rescue] Error code 1
>
> Does this issue exist with MK_CLEAN=yes?
> -Enji

It's fixed by fb1820d23a04