[PATCH v5 12/19] net/tap: use net_tap_setup() in net_init_bridge()

Vladimir Sementsov-Ogievskiy posted 19 patches 1 week, 2 days ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>, Eric Blake <eblake@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH v5 12/19] net/tap: use net_tap_setup() in net_init_bridge()
Posted by Vladimir Sementsov-Ogievskiy 1 week, 2 days ago
Finalize the concept of pair net_tap_new() + net_tap_setup().

Now, the only extra part for bridge in net_tap_setup() is initializing
vhost_net, but it's under if (s->vhostfd != -1), we never come into it
for bridge case.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 net/tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tap.c b/net/tap.c
index b7175e4b10..4ca3cc75d8 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -697,7 +697,7 @@ int net_init_bridge(const Netdev *netdev, const char *name,
     }
 
     s = net_tap_new(peer, "bridge", name, NULL, NULL, &error_abort);
-    net_tap_set_fd(s, fd, vnet_hdr, &error_abort);
+    net_tap_setup(s, fd, vnet_hdr, &error_abort);
 
     qemu_set_info_str(&s->nc, "helper=%s,br=%s", helper, br);
 
-- 
2.48.1