aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-07-15 13:47:31 +0300
committerMichael S. Tsirkin <mst@redhat.com>2015-07-20 14:19:40 +0300
commitd345ed2da3279b015605823397235b8c5ca5251f (patch)
tree32d2e4c5a7f07a978b64175d89d93dce8bb86ee2 /net
parent75d663611e81c748522d9cdcb5230bd02db86d05 (diff)
Revert "vhost-user: add multi queue support"
This reverts commit 830d70db692e374b55555f4407f96a1ceefdcc97. The interface isn't fully backwards-compatible, which is bad. Let's redo this properly after 2.4. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/vhost-user.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/net/vhost-user.c b/net/vhost-user.c
index b51bc044b5..93dcecd664 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -120,39 +120,35 @@ static void net_vhost_user_event(void *opaque, int event)
case CHR_EVENT_OPENED:
vhost_user_start(s);
net_vhost_link_down(s, false);
- error_report("chardev \"%s\" went up", s->nc.info_str);
+ error_report("chardev \"%s\" went up", s->chr->label);
break;
case CHR_EVENT_CLOSED:
net_vhost_link_down(s, true);
vhost_user_stop(s);
- error_report("chardev \"%s\" went down", s->nc.info_str);
+ error_report("chardev \"%s\" went down", s->chr->label);
break;
}
}
static int net_vhost_user_init(NetClientState *peer, const char *device,
- const char *name, CharDriverState *chr,
- uint32_t queues)
+ const char *name, CharDriverState *chr)
{
NetClientState *nc;
VhostUserState *s;
- int i;
- for (i = 0; i < queues; i++) {
- nc = qemu_new_net_client(&net_vhost_user_info, peer, device, name);
+ nc = qemu_new_net_client(&net_vhost_user_info, peer, device, name);
- snprintf(nc->info_str, sizeof(nc->info_str), "vhost-user%d to %s",
- i, chr->label);
+ snprintf(nc->info_str, sizeof(nc->info_str), "vhost-user to %s",
+ chr->label);
- s = DO_UPCAST(VhostUserState, nc, nc);
+ s = DO_UPCAST(VhostUserState, nc, nc);
- /* We don't provide a receive callback */
- s->nc.receive_disabled = 1;
- s->chr = chr;
- s->nc.queue_index = i;
+ /* We don't provide a receive callback */
+ s->nc.receive_disabled = 1;
+ s->chr = chr;
+
+ qemu_chr_add_handlers(s->chr, NULL, NULL, net_vhost_user_event, s);
- qemu_chr_add_handlers(s->chr, NULL, NULL, net_vhost_user_event, s);
- }
return 0;
}
@@ -230,7 +226,6 @@ static int net_vhost_check_net(void *opaque, QemuOpts *opts, Error **errp)
int net_init_vhost_user(const NetClientOptions *opts, const char *name,
NetClientState *peer, Error **errp)
{
- uint32_t queues;
const NetdevVhostUserOptions *vhost_user_opts;
CharDriverState *chr;
@@ -248,12 +243,6 @@ int net_init_vhost_user(const NetClientOptions *opts, const char *name,
return -1;
}
- /* number of queues for multiqueue */
- if (vhost_user_opts->has_queues) {
- queues = vhost_user_opts->queues;
- } else {
- queues = 1;
- }
- return net_vhost_user_init(peer, "vhost_user", name, chr, queues);
+ return net_vhost_user_init(peer, "vhost_user", name, chr);
}