tap: Allow specifying a bridge
PATCH 1/1 tap: Allow specifying a bridge
The tap backend is already using qemu-bridge-helper to attach tap interface to a bridge but (unlike the bridge backend) it always uses the default bridge name - br0.
This adds a "br" property support to the tap backend.
Signed-off-by Alexey Kardashevskiy <[email protected]>
---
My reason for the patch is I want to use vhost on devices attached to bridges other than br0 and since -netdev bridge ignores vhost, here is the patch.
--- net/tap.c | 4 +++- qapi-schema.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-)
net/tap.c +3 -1
@@ -857,7 +857,9 @@ free_fail:return -1 ; } - fd =net_bridge_run_helper (tap->helper,DEFAULT_BRIDGE_INTERFACE , + fd =net_bridge_run_helper (tap->helper, + tap->has_br ? + tap->br :DEFAULT_BRIDGE_INTERFACE , errp);if (fd ==-1 ) {return -1 ;
qapi-schema.json +1 -0
@@ -2604,6 +2604,7 @@ '*fds': 'str', '*script': 'str', '*downscript': 'str', + '*br': 'str', '*helper': 'str', '*sndbuf': 'size', '*vnet_hdr': 'bool',
Signature · 1 line
2.5.0.rc3
Quoted 12 lines · Alexey Kardashevskiy
The tap backend is already using qemu-bridge-helper to attach tap interface to a bridge but (unlike the bridge backend) it always uses the default bridge name - br0.
This adds a "br" property support to the tap backend.
Signed-off-by Alexey Kardashevskiy <[email protected]>---
+++
b/qapi-schema.json
qapi-schema.json line 2607
Quoted 4 lines
qapi-schema.json +1
-0@@ -2604,6 +2604,7 @@ '*fds': 'str', '*script': 'str', '*downscript': 'str', + '*br': 'str',
Missing documentation for the new member.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org