git: e7e6c70cdc88 - stable/13 - bhyve: Document the "type" config variable for network device models.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 10 Nov 2022 22:04:59 UTC
The branch stable/13 has been updated by jhb:

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

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

    bhyve: Document the "type" config variable for network device models.
    
    (cherry picked from commit e5ed417bb442cddece6ffbd6f2ec87d70520241a)
---
 usr.sbin/bhyve/bhyve_config.5 | 48 +++++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 13 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5
index 3faee9b81686..488dfb21bab7 100644
--- a/usr.sbin/bhyve/bhyve_config.5
+++ b/usr.sbin/bhyve/bhyve_config.5
@@ -328,16 +328,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
@@ -360,14 +365,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"