blob: a042ec6a34821f0750e4430eab601cf3b734ff82 [file] [log] [blame]
Nikolay Nikolaevd314f582014-05-27 15:06:29 +03001/*
2 * vhost-user.c
3 *
4 * Copyright (c) 2013 Virtual Open Systems Sarl.
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 *
9 */
10
Peter Maydell2744d922016-01-29 17:50:00 +000011#include "qemu/osdep.h"
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030012#include "clients.h"
13#include "net/vhost_net.h"
14#include "net/vhost-user.h"
Marc-André Lureau4d43a602017-01-26 18:26:44 +040015#include "chardev/char-fe.h"
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +030016#include "qemu/config-file.h"
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030017#include "qemu/error-report.h"
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080018#include "qmp-commands.h"
Marc-André Lureau69b32a62015-10-09 17:17:30 +020019#include "trace.h"
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030020
21typedef struct VhostUserState {
22 NetClientState nc;
Marc-André Lureau5d300162016-10-22 12:52:57 +030023 CharBackend chr; /* only queue index 0 */
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030024 VHostNetState *vhost_net;
Paolo Bonzini6f1de6b2016-06-20 15:02:40 +020025 guint watch;
Marc-André Lureaua4632152016-06-06 18:45:05 +020026 uint64_t acked_features;
Marc-André Lureauc89804d2016-07-27 01:15:19 +040027 bool started;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030028} VhostUserState;
29
30VHostNetState *vhost_user_get_vhost_net(NetClientState *nc)
31{
32 VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
Eric Blakef394b2e2016-07-13 21:50:23 -060033 assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_USER);
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030034 return s->vhost_net;
35}
36
Marc-André Lureaua4632152016-06-06 18:45:05 +020037uint64_t vhost_user_get_acked_features(NetClientState *nc)
38{
39 VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
Eric Blakef394b2e2016-07-13 21:50:23 -060040 assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_USER);
Marc-André Lureaua4632152016-06-06 18:45:05 +020041 return s->acked_features;
42}
43
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080044static void vhost_user_stop(int queues, NetClientState *ncs[])
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030045{
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080046 VhostUserState *s;
47 int i;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030048
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080049 for (i = 0; i < queues; i++) {
Eric Blakef394b2e2016-07-13 21:50:23 -060050 assert(ncs[i]->info->type == NET_CLIENT_DRIVER_VHOST_USER);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080051
52 s = DO_UPCAST(VhostUserState, nc, ncs[i]);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080053
54 if (s->vhost_net) {
Marc-André Lureaua4632152016-06-06 18:45:05 +020055 /* save acked features */
Marc-André Lureaue6bcb1b2016-07-27 01:15:12 +040056 uint64_t features = vhost_net_get_acked_features(s->vhost_net);
57 if (features) {
58 s->acked_features = features;
59 }
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080060 vhost_net_cleanup(s->vhost_net);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080061 }
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030062 }
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030063}
64
Marc-André Lureau5d300162016-10-22 12:52:57 +030065static int vhost_user_start(int queues, NetClientState *ncs[], CharBackend *be)
Nikolay Nikolaevd314f582014-05-27 15:06:29 +030066{
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080067 VhostNetOptions options;
Marc-André Lureaue6bcb1b2016-07-27 01:15:12 +040068 struct vhost_net *net = NULL;
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080069 VhostUserState *s;
70 int max_queues;
71 int i;
72
73 options.backend_type = VHOST_BACKEND_TYPE_USER;
74
75 for (i = 0; i < queues; i++) {
Eric Blakef394b2e2016-07-13 21:50:23 -060076 assert(ncs[i]->info->type == NET_CLIENT_DRIVER_VHOST_USER);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080077
78 s = DO_UPCAST(VhostUserState, nc, ncs[i]);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080079
80 options.net_backend = ncs[i];
Marc-André Lureau5d300162016-10-22 12:52:57 +030081 options.opaque = be;
Jason Wang69e87b32016-07-06 09:57:55 +080082 options.busyloop_timeout = 0;
Marc-André Lureaue6bcb1b2016-07-27 01:15:12 +040083 net = vhost_net_init(&options);
84 if (!net) {
Markus Armbruster9af9e0f2015-12-18 16:35:19 +010085 error_report("failed to init vhost_net for queue %d", i);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080086 goto err;
87 }
88
89 if (i == 0) {
Marc-André Lureaue6bcb1b2016-07-27 01:15:12 +040090 max_queues = vhost_net_get_max_queues(net);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080091 if (queues > max_queues) {
Markus Armbruster9af9e0f2015-12-18 16:35:19 +010092 error_report("you are asking more queues than supported: %d",
93 max_queues);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +080094 goto err;
95 }
96 }
Marc-André Lureaue6bcb1b2016-07-27 01:15:12 +040097
98 if (s->vhost_net) {
99 vhost_net_cleanup(s->vhost_net);
100 g_free(s->vhost_net);
101 }
102 s->vhost_net = net;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300103 }
104
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800105 return 0;
106
107err:
Marc-André Lureaue6bcb1b2016-07-27 01:15:12 +0400108 if (net) {
109 vhost_net_cleanup(net);
110 }
111 vhost_user_stop(i, ncs);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800112 return -1;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300113}
114
Thibaut Colletf6f56292015-10-09 17:17:31 +0200115static ssize_t vhost_user_receive(NetClientState *nc, const uint8_t *buf,
116 size_t size)
117{
Thibaut Collet3e866362015-10-09 17:17:32 +0200118 /* In case of RARP (message size is 60) notify backup to send a fake RARP.
119 This fake RARP will be sent by backend only for guest
120 without GUEST_ANNOUNCE capability.
Thibaut Colletf6f56292015-10-09 17:17:31 +0200121 */
Thibaut Collet3e866362015-10-09 17:17:32 +0200122 if (size == 60) {
123 VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
124 int r;
125 static int display_rarp_failure = 1;
126 char mac_addr[6];
127
128 /* extract guest mac address from the RARP message */
129 memcpy(mac_addr, &buf[6], 6);
130
131 r = vhost_net_notify_migration_done(s->vhost_net, mac_addr);
132
133 if ((r != 0) && (display_rarp_failure)) {
134 fprintf(stderr,
135 "Vhost user backend fails to broadcast fake RARP\n");
136 fflush(stderr);
137 display_rarp_failure = 0;
138 }
139 }
140
Thibaut Colletf6f56292015-10-09 17:17:31 +0200141 return size;
142}
143
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300144static void vhost_user_cleanup(NetClientState *nc)
145{
146 VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
147
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800148 if (s->vhost_net) {
149 vhost_net_cleanup(s->vhost_net);
Marc-André Lureaue6bcb1b2016-07-27 01:15:12 +0400150 g_free(s->vhost_net);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800151 s->vhost_net = NULL;
152 }
Marc-André Lureauc39860e2016-10-22 12:52:58 +0300153 if (nc->queue_index == 0) {
Marc-André Lureau1ce26102017-01-27 00:49:13 +0400154 qemu_chr_fe_deinit(&s->chr, true);
Paolo Bonzini25f0d2a2016-06-29 15:15:33 +0200155 }
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800156
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300157 qemu_purge_queued_packets(nc);
158}
159
160static bool vhost_user_has_vnet_hdr(NetClientState *nc)
161{
Eric Blakef394b2e2016-07-13 21:50:23 -0600162 assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_USER);
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300163
164 return true;
165}
166
167static bool vhost_user_has_ufo(NetClientState *nc)
168{
Eric Blakef394b2e2016-07-13 21:50:23 -0600169 assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_USER);
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300170
171 return true;
172}
173
174static NetClientInfo net_vhost_user_info = {
Eric Blakef394b2e2016-07-13 21:50:23 -0600175 .type = NET_CLIENT_DRIVER_VHOST_USER,
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300176 .size = sizeof(VhostUserState),
Thibaut Colletf6f56292015-10-09 17:17:31 +0200177 .receive = vhost_user_receive,
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300178 .cleanup = vhost_user_cleanup,
179 .has_vnet_hdr = vhost_user_has_vnet_hdr,
180 .has_ufo = vhost_user_has_ufo,
181};
182
Tetsuya Mukawaa6553592016-06-06 18:44:59 +0200183static gboolean net_vhost_user_watch(GIOChannel *chan, GIOCondition cond,
184 void *opaque)
185{
186 VhostUserState *s = opaque;
Tetsuya Mukawaa6553592016-06-06 18:44:59 +0200187
Marc-André Lureau5345fdb2016-10-22 12:52:55 +0300188 qemu_chr_fe_disconnect(&s->chr);
Tetsuya Mukawaa6553592016-06-06 18:44:59 +0200189
Marc-André Lureaue7c83a82017-02-27 14:49:56 +0400190 return TRUE;
191}
192
193static void net_vhost_user_event(void *opaque, int event);
194
195static void chr_closed_bh(void *opaque)
196{
197 const char *name = opaque;
198 NetClientState *ncs[MAX_QUEUE_NUM];
199 VhostUserState *s;
200 Error *err = NULL;
201 int queues;
202
203 queues = qemu_find_net_clients_except(name, ncs,
204 NET_CLIENT_DRIVER_NIC,
205 MAX_QUEUE_NUM);
206 assert(queues < MAX_QUEUE_NUM);
207
208 s = DO_UPCAST(VhostUserState, nc, ncs[0]);
209
210 qmp_set_link(name, false, &err);
211 vhost_user_stop(queues, ncs);
212
213 qemu_chr_fe_set_handlers(&s->chr, NULL, NULL, net_vhost_user_event,
214 opaque, NULL, true);
215
216 if (err) {
217 error_report_err(err);
218 }
Tetsuya Mukawaa6553592016-06-06 18:44:59 +0200219}
220
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300221static void net_vhost_user_event(void *opaque, int event)
222{
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800223 const char *name = opaque;
224 NetClientState *ncs[MAX_QUEUE_NUM];
225 VhostUserState *s;
Marc-André Lureau0ec7b3e2016-12-07 16:20:22 +0300226 Chardev *chr;
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800227 Error *err = NULL;
228 int queues;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300229
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800230 queues = qemu_find_net_clients_except(name, ncs,
Eric Blakef394b2e2016-07-13 21:50:23 -0600231 NET_CLIENT_DRIVER_NIC,
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800232 MAX_QUEUE_NUM);
Marc-André Lureauc1bf3532016-02-23 19:10:49 +0100233 assert(queues < MAX_QUEUE_NUM);
234
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800235 s = DO_UPCAST(VhostUserState, nc, ncs[0]);
Marc-André Lureau5345fdb2016-10-22 12:52:55 +0300236 chr = qemu_chr_fe_get_driver(&s->chr);
237 trace_vhost_user_event(chr->label, event);
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300238 switch (event) {
239 case CHR_EVENT_OPENED:
Marc-André Lureau5d300162016-10-22 12:52:57 +0300240 if (vhost_user_start(queues, ncs, &s->chr) < 0) {
Marc-André Lureau5345fdb2016-10-22 12:52:55 +0300241 qemu_chr_fe_disconnect(&s->chr);
Marc-André Lureau0d572af2016-06-06 18:45:03 +0200242 return;
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800243 }
Marc-André Lureaue7c83a82017-02-27 14:49:56 +0400244 s->watch = qemu_chr_fe_add_watch(&s->chr, G_IO_HUP,
245 net_vhost_user_watch, s);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800246 qmp_set_link(name, true, &err);
Marc-André Lureauc89804d2016-07-27 01:15:19 +0400247 s->started = true;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300248 break;
249 case CHR_EVENT_CLOSED:
Marc-André Lureaue7c83a82017-02-27 14:49:56 +0400250 /* a close event may happen during a read/write, but vhost
251 * code assumes the vhost_dev remains setup, so delay the
252 * stop & clear to idle.
253 * FIXME: better handle failure in vhost code, remove bh
254 */
255 if (s->watch) {
256 AioContext *ctx = qemu_get_current_aio_context();
257
258 g_source_remove(s->watch);
259 s->watch = 0;
260 qemu_chr_fe_set_handlers(&s->chr, NULL, NULL, NULL,
261 NULL, NULL, false);
262
263 aio_bh_schedule_oneshot(ctx, chr_closed_bh, opaque);
264 }
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300265 break;
266 }
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800267
268 if (err) {
269 error_report_err(err);
270 }
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300271}
272
273static int net_vhost_user_init(NetClientState *peer, const char *device,
Marc-André Lureau0ec7b3e2016-12-07 16:20:22 +0300274 const char *name, Chardev *chr,
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800275 int queues)
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300276{
Marc-André Lureau32a6ebe2016-10-22 12:52:52 +0300277 Error *err = NULL;
Marc-André Lureauc89804d2016-07-27 01:15:19 +0400278 NetClientState *nc, *nc0 = NULL;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300279 VhostUserState *s;
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800280 int i;
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300281
Marc-André Lureauc1bf3532016-02-23 19:10:49 +0100282 assert(name);
283 assert(queues > 0);
284
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800285 for (i = 0; i < queues; i++) {
286 nc = qemu_new_net_client(&net_vhost_user_info, peer, device, name);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800287 snprintf(nc->info_str, sizeof(nc->info_str), "vhost-user%d to %s",
288 i, chr->label);
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800289 nc->queue_index = i;
Marc-André Lureau5d300162016-10-22 12:52:57 +0300290 if (!nc0) {
291 nc0 = nc;
292 s = DO_UPCAST(VhostUserState, nc, nc);
293 if (!qemu_chr_fe_init(&s->chr, chr, &err)) {
294 error_report_err(err);
295 return -1;
296 }
Marc-André Lureau32a6ebe2016-10-22 12:52:52 +0300297 }
Marc-André Lureau5d300162016-10-22 12:52:57 +0300298
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800299 }
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300300
Marc-André Lureauc89804d2016-07-27 01:15:19 +0400301 s = DO_UPCAST(VhostUserState, nc, nc0);
302 do {
Marc-André Lureau5345fdb2016-10-22 12:52:55 +0300303 if (qemu_chr_fe_wait_connected(&s->chr, &err) < 0) {
Marc-André Lureauc89804d2016-07-27 01:15:19 +0400304 error_report_err(err);
305 return -1;
306 }
Marc-André Lureau5345fdb2016-10-22 12:52:55 +0300307 qemu_chr_fe_set_handlers(&s->chr, NULL, NULL,
Marc-André Lureau39ab61c2016-10-22 12:53:03 +0300308 net_vhost_user_event, nc0->name, NULL, true);
Marc-André Lureauc89804d2016-07-27 01:15:19 +0400309 } while (!s->started);
Michael S. Tsirkind345ed22015-07-15 13:47:31 +0300310
Marc-André Lureau1a5b68c2016-07-27 01:15:13 +0400311 assert(s->vhost_net);
312
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300313 return 0;
314}
315
Marc-André Lureau0ec7b3e2016-12-07 16:20:22 +0300316static Chardev *net_vhost_claim_chardev(
Markus Armbruster81904832015-03-13 14:17:16 +0100317 const NetdevVhostUserOptions *opts, Error **errp)
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300318{
Marc-André Lureau0ec7b3e2016-12-07 16:20:22 +0300319 Chardev *chr = qemu_chr_find(opts->chardev);
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300320
321 if (chr == NULL) {
Markus Armbruster81904832015-03-13 14:17:16 +0100322 error_setg(errp, "chardev \"%s\" not found", opts->chardev);
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300323 return NULL;
324 }
325
Daniel P. Berrange0a733362016-10-07 13:18:34 +0100326 if (!qemu_chr_has_feature(chr, QEMU_CHAR_FEATURE_RECONNECTABLE)) {
327 error_setg(errp, "chardev \"%s\" is not reconnectable",
328 opts->chardev);
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300329 return NULL;
330 }
Daniel P. Berrange0a733362016-10-07 13:18:34 +0100331 if (!qemu_chr_has_feature(chr, QEMU_CHAR_FEATURE_FD_PASS)) {
332 error_setg(errp, "chardev \"%s\" does not support FD passing",
Markus Armbruster81904832015-03-13 14:17:16 +0100333 opts->chardev);
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300334 return NULL;
335 }
336
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300337 return chr;
338}
339
Markus Armbruster28d0de72015-03-13 13:35:14 +0100340static int net_vhost_check_net(void *opaque, QemuOpts *opts, Error **errp)
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300341{
342 const char *name = opaque;
343 const char *driver, *netdev;
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300344
345 driver = qemu_opt_get(opts, "driver");
346 netdev = qemu_opt_get(opts, "netdev");
347
348 if (!driver || !netdev) {
349 return 0;
350 }
351
352 if (strcmp(netdev, name) == 0 &&
Marc-André Lureaud9d26112016-07-27 01:14:56 +0400353 !g_str_has_prefix(driver, "virtio-net-")) {
Markus Armbruster81904832015-03-13 14:17:16 +0100354 error_setg(errp, "vhost-user requires frontend driver virtio-net-*");
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300355 return -1;
356 }
357
358 return 0;
359}
360
Kővágó, Zoltáncebea512016-07-13 21:50:12 -0600361int net_init_vhost_user(const Netdev *netdev, const char *name,
Markus Armbrustera30ecde2015-05-15 13:58:50 +0200362 NetClientState *peer, Error **errp)
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300363{
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800364 int queues;
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300365 const NetdevVhostUserOptions *vhost_user_opts;
Marc-André Lureau0ec7b3e2016-12-07 16:20:22 +0300366 Chardev *chr;
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300367
Eric Blakef394b2e2016-07-13 21:50:23 -0600368 assert(netdev->type == NET_CLIENT_DRIVER_VHOST_USER);
369 vhost_user_opts = &netdev->u.vhost_user;
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300370
Daniel P. Berrange0a733362016-10-07 13:18:34 +0100371 chr = net_vhost_claim_chardev(vhost_user_opts, errp);
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300372 if (!chr) {
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300373 return -1;
374 }
375
376 /* verify net frontend */
377 if (qemu_opts_foreach(qemu_find_opts("device"), net_vhost_check_net,
Markus Armbruster81904832015-03-13 14:17:16 +0100378 (char *)name, errp)) {
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300379 return -1;
380 }
381
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800382 queues = vhost_user_opts->has_queues ? vhost_user_opts->queues : 1;
Ilya Maximetsfff4e482016-02-24 13:44:34 +0300383 if (queues < 1 || queues > MAX_QUEUE_NUM) {
Victor Kaplansky6f6f9512015-12-01 15:32:26 +0200384 error_setg(errp,
Ilya Maximetsfff4e482016-02-24 13:44:34 +0300385 "vhost-user number of queues must be in range [1, %d]",
386 MAX_QUEUE_NUM);
Victor Kaplansky6f6f9512015-12-01 15:32:26 +0200387 return -1;
388 }
Nikolay Nikolaev03ce5742014-06-10 13:02:16 +0300389
Changchun Ouyangb931bfb2015-09-23 12:20:00 +0800390 return net_vhost_user_init(peer, "vhost_user", name, chr, queues);
Nikolay Nikolaevd314f582014-05-27 15:06:29 +0300391}