diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-07-20 13:25:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-07-20 13:25:28 +0100 |
commit | f73ca7363440240b7ee5ee7f7ddb1c64751efb54 (patch) | |
tree | 3a5a63dc82049cff15f105d68617be7d3b2571c1 /net | |
parent | 71358470eec668f5dc53def25e585ce250cea9bf (diff) | |
parent | f9d6dbf0bf6e91b8ed896369ab1b7e91e5a1a4df (diff) |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio, vhost, pc fixes for 2.4
The only notable thing here is vhost-user multiqueue
revert. We'll work on making it stable in 2.5,
reverting now means we won't have to maintain
bug for bug compability forever.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Mon Jul 20 12:24:00 2015 BST using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
* remotes/mst/tags/for_upstream:
virtio-net: remove virtio queues if the guest doesn't support multiqueue
virtio-net: Flush incoming queues when DRIVER_OK is being set
pci_add_capability: remove duplicate comments
virtio-net: unbreak any layout
Revert "vhost-user: add multi queue support"
ich9: fix skipped vmstate_memhp_state subsection
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/vhost-user.c | 37 |
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); } |