https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254343

Aleksandr Fedorov <afedo...@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |afedo...@freebsd.org,
                   |                            |bry...@freebsd.org,
                   |                            |gre...@freebsd.org,
                   |                            |kev...@freebsd.org
          Component|misc                        |kern

--- Comment #4 from Aleksandr Fedorov <afedo...@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.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to