HomeFreeBSD

bhyve virtio-net: Allow backend type to be explicitly specified.

Description

bhyve virtio-net: Allow backend type to be explicitly specified.

Surrently virtio-net uses the prefix of the backing interface to
choose the backend. This patch adds an additional option "type" to
choose the backend type explicitly. This allows greater flexibility
for end users to manage bhyve specific resources (such as by naming
the tap interfaces to more descriptive names). The option "type" is
optional. When it is not presented, the backend is derived from the
name of the backend interface.

For example, the line -s 3,virtio-net,bsdvm0,type=tap will create a
virtio-net device for the guest using the tap interface "bsdvm0".

Adding a new "type" option preserves the current legacy format in which
the first value after virtio-net names an instance of a backend.

Note that tap interfaces not following the pattern "tap*" will not be
created on demand via devfs cloning but must be created explicitly.

Reviewed by: vmaffione, jhb
Differential Revision: https://reviews.freebsd.org/D35143

(cherry picked from commit b9c3e544c48e76dd01aa32e9b1f5cd4c1ad8532c)

Details

Provenance
nyan_myuji.xyzAuthored on Jun 30 2022, 5:29 PM
jhbCommitted on Nov 10 2022, 9:51 PM
Reviewer
vmaffione
Differential Revision
D35143: Bhyve virtio-net: Allow backend type to be explicitly specified.
Parents
rG2c273cf4ceb7: cxgbei: Return limits for the specific adapter the socket is on.
Branches
Unknown
Tags
Unknown