git: e5ed417bb442 - main - bhyve: Document the "type" config variable for network device models.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 30 Jun 2022 22:16:01 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=e5ed417bb442cddece6ffbd6f2ec87d70520241a

commit e5ed417bb442cddece6ffbd6f2ec87d70520241a
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-06-30 22:14:36 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-06-30 22:14:36 +0000

    bhyve: Document the "type" config variable for network device models.
---
 usr.sbin/bhyve/bhyve_config.5 | 50 +++++++++++++++++++++++++++++++------------
 1 file changed, 36 insertions(+), 14 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5
index bd4f3fb22ed3..20109170b094 100644
--- a/usr.sbin/bhyve/bhyve_config.5
+++ b/usr.sbin/bhyve/bhyve_config.5
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 2, 2022
+.Dd June 30, 2022
 .Dt BHYVE_CONFIG 5
 .Os
 .Sh NAME
@@ -336,16 +336,21 @@ The backend is responsible for passing packets between the device model
 and a desired destination.
 Configuring a backend requires setting the
 .Va backend
-variable to one of the following values:
-.Bl -tag
-.It tap Ns Va N
-Use the named
+variable.
+The type of a backend can either be set explicitly via the
+.Va type
+variable
+or it can be inferred from the value of
+.Va backend .
+.Pp
+The following types of backends are supported:
+.Bl -tag -width "netgraph"
+.It tap
+Use the
 .Xr tap 4
-interface as the backend.
-.It vmnet Ns Va N
-Use the named
-.Xr vmnet 4
-interface as the backend.
+interface named in
+.Va backend
+as the backend.
 .It netgraph
 Use a
 .Xr netgraph 4
@@ -368,14 +373,31 @@ The name of the source hook on the created
 .Xr ng_socket 4
 node.
 .El
-.It netmap: Ns Va interface
+.It netmap
 Use
 .Xr netmap 4
-on a network interface as the backend.
-.It vale Ns Va bridge : Ns Va port
-Use a port on a
+either on a network interface or a port on a
 .Xr vale 4
 bridge as the backend.
+The value of
+.Va backend
+is passed to
+.Xr nm_open
+to connect to a netmap port.
+.El
+.Pp
+If
+.Va type
+is not specified explicitly, then it is inferred from
+.Va backend
+based on the following patterns:
+.Bl -column -offset indent "valuebridge:port"
+.It Sy Pattern Ta Sy Type
+.It tap Ns Va N Ta tap
+.It vmnet Ns Va N Ta tap
+.It netgraph Ta netgraph
+.It netmap: Ns Va interface Ta netmap
+.It vale Ns Va bridge : Ns Va port Ta netmap
 .El
 .Ss UART Device Settings
 .Bl -column "Name" "Format" "Default"