Page MenuHomeFreeBSD

Bhyve virtio-net: Allow backend type to be explicitly specified.
Needs ReviewPublic

Authored by nyan_myuji.xyz on Fri, May 6, 7:47 PM.

Details

Reviewers
None
Group Reviewers
bhyve
Summary

Currently virtio-net is choosing the backend for virtio-net by the prefix of
the inteface. This patch allow an addition option "type" to choose backend type
explicitly. This allowed 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
will be derived by 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".

The idea behind adding the option "type" is to preserve the consistency
between the current (legacy) format. Which the next value after virtio-net
is set to be an identifier of an instance of a backend.

A drawback of this apporach is that; since tap interfaces cannot be created by
opening non "tap" prefixed device, if the backend tap interface is not presented
and such interface is not prefixed with "tap*", bhyve cannot automatically
create it. Since bhyve does not create the interfaces for other backends anyway,
it shouldn't be a big issue.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 45493
Build 42381: arc lint + arc unit

Event Timeline

  • change to use type as the option
  • yes I am an idiot and totally forgot bhyve-config(5)
nyan_myuji.xyz retitled this revision from Bhyve virtio-net: Allow backend to be explicitly specified. to Bhyve virtio-net: Allow backend type to be explicitly specified..Fri, May 6, 8:23 PM
nyan_myuji.xyz edited the summary of this revision. (Show Details)