Received: from eggs.gnu.org ([2001:4830:134:3::10]:51520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhE2L-0001DP-DI for qemu-devel@nongnu.org; Tue, 06 Sep 2016 06:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhE2H-0000GL-6h for qemu-devel@nongnu.org; Tue, 06 Sep 2016 06:55:28 -0400 Received: from ozlabs.ru ([83.169.36.222]:48676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhE2H-0000Fw-0K for qemu-devel@nongnu.org; Tue, 06 Sep 2016 06:55:25 -0400 From: Alexey Kardashevskiy Date: Tue, 6 Sep 2016 20:54:49 +1000 Message-Id: <1473159289-28824-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH qemu] tap: Allow specifying a bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: 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 --- 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(-) diff --git a/net/tap.c b/net/tap.c index 6abb962..b6896a7 100644 --- a/net/tap.c +++ b/net/tap.c @@ -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; diff --git a/qapi-schema.json b/qapi-schema.json index 5658723..508312a 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2604,6 +2604,7 @@ '*fds': 'str', '*script': 'str', '*downscript': 'str', + '*br': 'str', '*helper': 'str', '*sndbuf': 'size', '*vnet_hdr': 'bool', -- 2.5.0.rc3