]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r352841
authorVincenzo Maffione <vmaffione@FreeBSD.org>
Sat, 5 Oct 2019 10:59:41 +0000 (10:59 +0000)
committerVincenzo Maffione <vmaffione@FreeBSD.org>
Sat, 5 Oct 2019 10:59:41 +0000 (10:59 +0000)
commitde24385c649f363d614a108c67852e5e696bb4f0
tree267a6a25f69a4413d452ab56fa872c7f7070358e
parent8b91185f9f1204ab2471166789ec78b9738ea83f
MFC r352841

bhyve: support for enabling/disabling the net backend

Extend the net backend interface with two functions, namely netbe_rx_disable()
and netbe_rx_enable(), which can be used by the net device emulators to stop
the backend from invoking the receive callback. This is useful for device
emulators, i.e., on hardware resets or to implement receive backpressure.
The mevent module has been extendede to support the addition of a disabled
event. To prevent race conditions, the net backends will start with receive
operation disabled. A follow-up patch will use the new functionalities in
the virtio-net device.

Reviewed by:    jhb, markj
Differential Revision: https://reviews.freebsd.org/D20973
usr.sbin/bhyve/mevent.c
usr.sbin/bhyve/net_backends.c
usr.sbin/bhyve/net_backends.h