Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jan 2020 08:53:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 236922] Virtio fails as QEMU-KVM guest with Q35 chipset on Ubuntu 18.04.2 LTS
Message-ID:  <bug-236922-27103-WIitjBHgFI@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-236922-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-236922-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236922

--- Comment #42 from John Hartley <drum@graphica.com.au> ---
(In reply to Tommy P from comment #41)

Hi Tommy P & Brian V & Vicenzo,

the VirtIO network update conflicts with Vincenzo's netmap fix.

In my earlier test of VirtIO patch test I had just disable netmap via GENER=
IC
conf file and not applied netmap fix.

I have now tested against 12.1 where I first applied the netmap fix.


Here is compile error:

cc -target x86_64-unknown-freebsd12.1
--sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasin=
g=20
-g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include
-I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inclu=
de
opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD=20
-MF.depend.if_vtnet.o -MTif_vtnet.o
-fdebug-prefix-map=3D./machine=3D/usr/src/sys/amd64/include
-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include -mcmodel=3Dkernel -mn=
o-red-zone
-mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestand=
ing
-fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-comp=
are
-Wno-error-empty-body -Wno-error-parentheses-equality
-Wno-error-unused-function -Wno-error-pointer-sign
-Wno-error-shift-negative-value -Wno-address-of-packed-member  -mno-aes
-mno-avx  -std=3Diso9899:1999 -Werror  /usr/src/sys/dev/virtio/network/if_v=
tnet.c
In file included from /usr/src/sys/dev/virtio/network/if_vtnet.c:351:
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:94:2: error: implicit declaration=
 of
function 'D' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        D("freed %d mbufs, %d netmap bufs on %d queues",
        ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:94:2: error: this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:297:3: error: implicit declaratio=
n of
function 'ND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                ND(3,"sent %d packets, hwcur %d", n, nm_i);
                ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:297:3: error: this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:306:7: error: implicit declaratio=
n of
function 'ND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                    ND(5, "pure notify ? head %d tail %d nused %d %d",
                    ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:340:3: error: implicit declaratio=
n of
function 'ND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                ND(3, "disable intr, hwcur %d", nm_i);
                ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:343:3: error: implicit declaratio=
n of
function 'ND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                ND(3, "enable intr, hwcur %d", nm_i);
                ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:297:37: error: variable 'n' is
uninitialized when used here [-Werror,-Wuninitialized]
                ND(3,"sent %d packets, hwcur %d", n, nm_i);
                                                  ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:245:9: note: initialize the varia=
ble
'n' to silence this warning
        u_int n;
               ^
                =3D 0
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:486:6: error: implicit declaratio=
n of
function 'RD' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                                        RD(1, "Truncated virtio-net-header,=
 "
                                        ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:486:6: error: this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:498:2: error: implicit declaratio=
n of
function 'ND' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ND("[B] h %d c %d hwcur %d hwtail %d",
        ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:566:4: error: implicit declaratio=
n of
function 'D' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                        D("strange, null netmap ring %d", r);
                        ^
/usr/src/sys/dev/netmap/if_vtnet_netmap.h:662:2: error: implicit declaratio=
n of
function 'D' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        D("max rings %d", sc->vtnet_max_vq_pairs);
        ^
/usr/src/sys/dev/virtio/network/if_vtnet.c:3411:3: error: implicit declarat=
ion
of function 'D' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                D("try to attach again");
                ^
14 errors generated.
*** Error code 1

As sys/dev/netmap/if_vtnet_netmap.h was one of replaced files that was prov=
ided
with fix, I put back the original 12.1 version (this was not changed or upd=
ate
by Vincenzo's netmap fix).

The result was failure in compiling sys/dev/virtio/network/if_vtnet.c

Here is compile result:

cc -target x86_64-unknown-freebsd12.1
--sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasin=
g=20
-g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include
-I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inclu=
de
opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD=20
-MF.depend.if_vtnet.o -MTif_vtnet.o
-fdebug-prefix-map=3D./machine=3D/usr/src/sys/amd64/include
-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include -mcmodel=3Dkernel -mn=
o-red-zone
-mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestand=
ing
-fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-comp=
are
-Wno-error-empty-body -Wno-error-parentheses-equality
-Wno-error-unused-function -Wno-error-pointer-sign
-Wno-error-shift-negative-value -Wno-address-of-packed-member  -mno-aes
-mno-avx  -std=3Diso9899:1999 -Werror  /usr/src/sys/dev/virtio/network/if_v=
tnet.c
/usr/src/sys/dev/virtio/network/if_vtnet.c:3219:6: error: implicit declarat=
ion
of function 'vtnet_netmap_init_rx_buffers' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
        if (vtnet_netmap_init_rx_buffers(sc))
            ^
/usr/src/sys/dev/virtio/network/if_vtnet.c:3219:6: error: this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]
/usr/src/sys/dev/virtio/network/if_vtnet.c:3411:3: error: implicit declarat=
ion
of function 'D' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
                D("try to attach again");
                ^
/usr/src/sys/dev/virtio/network/if_vtnet.c:3411:3: error: this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]
4 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/GENERIC
*** Error code 1

Given that both Brian (virtio committer) and Vincenzo (netmap committer) ha=
ve
both been involved in helping to resolve VirtIO and netmap related issues, =
it
would be great if we could get VirtIO and netmap fixes that worked together.

Thanks,


John Hartley.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236922-27103-WIitjBHgFI>