[Bug 254343] 13.0-RC2: adding a vtnet (VirtIO network) interface to bridge fails
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Apr 21 15:21:48 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254343
Aleksandr Fedorov <afedorov at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |afedorov at FreeBSD.org,
| |bryanv at FreeBSD.org,
| |grehan at FreeBSD.org,
| |kevans at freebsd.org
Component|misc |kern
--- Comment #4 from Aleksandr Fedorov <afedorov at FreeBSD.org> ---
I think this is regression in if_vtnet(4).
12-STABLE
https://github.com/freebsd/freebsd-src/blob/stable/12/sys/dev/virtio/network/if_vtnet.c#L1103
:
if ((ifp->if_flags ^ sc->vtnet_if_flags) &
(IFF_PROMISC | IFF_ALLMULTI)) {
if (sc->vtnet_flags & VTNET_FLAG_CTRL_RX)
vtnet_rx_filter(sc);
else {
ifp->if_flags |= IFF_PROMISC;
if ((ifp->if_flags ^
sc->vtnet_if_flags)
& IFF_ALLMULTI)
error = ENOTSUP;
}
}
RELENG 13.0
https://github.com/freebsd/freebsd-src/blob/releng/13.0/sys/dev/virtio/network/if_vtnet.c#L1297
:
if ((ifp->if_flags ^ sc->vtnet_if_flags) &
(IFF_PROMISC | IFF_ALLMULTI)) {
if ((sc->vtnet_flags & VTNET_FLAG_CTRL_RX) == 0)
return (ENOTSUP);
vtnet_rx_filter(sc);
}
Therefore, if the hypervisor does not confirm support for VTNET_FLAG_CTRL_RX,
the latest driver version cannot enable PROMISC mode.
For example, bhyve doesn't support VTNET_FLAG_CTRL_RX.
Technically, if the hypervisor doesn't support the VTNET_FLAG_CTRL_RX, then the
interface is always in PROMISC mode.
I see no reason to prohibit switching the interface to PROMISC mode if
VTNET_FLAG_CTRL_RX is not supported by the hypervisor.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list