]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: support <driver name='vfio'/> in network definitions
authorLaine Stump <laine@laine.org>
Fri, 26 Apr 2013 20:23:27 +0000 (16:23 -0400)
committerLaine Stump <laine@laine.org>
Sat, 27 Apr 2013 01:51:12 +0000 (21:51 -0400)
commitd64e114f1415f15737fb902b4e5aada8e50d1a6d
tree752195ad75fd86b5e0a177f3d001f092d14810c9
parent2d80fbb14dffa45fe3fcd2c3f29ce54857bb766c
network: support <driver name='vfio'/> in network definitions

I remembered to document this bit, but somehow forgot to implement it.

This adds <driver name='kvm|vfio'/> as a subelement to the <forward>
element of a network (this puts it parallel to the match between
mode='hostdev' attribute in a network and type='hostdev' in an
<interface>).

Since it's already documented, only the parser, formatter, backend
driver recognition (it just translates/moves the flag into the
<interface> at the appropriate time), and a test case were needed.

(I used a separate enum for the values both because the original is
defined in domain_conf.h, which is unavailable from network_conf.h,
and because in the future it's possible that we may want to support
other non-hostdev oriented driver names in the network parser; this
makes sure that one can be expanded without the other).
src/conf/network_conf.c
src/conf/network_conf.h
src/network/bridge_driver.c
tests/networkxml2xmlin/hostdev-pf.xml
tests/networkxml2xmlout/hostdev-pf.xml