summary refs log tree commit diff stats
path: root/net/vhost-user.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-04-08 16:45:31 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-04-08 16:45:31 +0100
commitce69aa92d71e13db9c3702a8e8305e8d2463aeb8 (patch)
treedb523c9f40dd1e69e3f0a829d20eb36898c25597 /net/vhost-user.c
parentd8724020dd13c88a72fc391a6a2cf63abbd3dcca (diff)
parent21df394d9e2ffce9fa308f496d1ae228cf6cdb57 (diff)
downloadfocaccia-qemu-ce69aa92d71e13db9c3702a8e8305e8d2463aeb8.tar.gz
focaccia-qemu-ce69aa92d71e13db9c3702a8e8305e8d2463aeb8.zip
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Thu 08 Apr 2021 10:34:24 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  tap-win32: correctly recycle buffers
  Revert "qapi: net: Add query-netdev command"
  Revert "tests: Add tests for query-netdev command"
  Revert "net: Move NetClientState.info_str to dynamic allocations"
  Revert "hmp: Use QAPI NetdevInfo in hmp_info_network"
  Revert "net: Do not fill legacy info_str for backends"

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'net/vhost-user.c')
-rw-r--r--net/vhost-user.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/net/vhost-user.c b/net/vhost-user.c
index e443c4b2b5..ffbd94d944 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -311,15 +311,14 @@ static void net_vhost_user_event(void *opaque, QEMUChrEvent event)
 }
 
 static int net_vhost_user_init(NetClientState *peer, const char *device,
-                               const char *name, const char *chardev,
-                               Chardev *chr, int queues)
+                               const char *name, Chardev *chr,
+                               int queues)
 {
     Error *err = NULL;
     NetClientState *nc, *nc0 = NULL;
     NetVhostUserState *s = NULL;
     VhostUserState *user;
     int i;
-    NetdevVhostUserOptions *stored;
 
     assert(name);
     assert(queues > 0);
@@ -327,6 +326,8 @@ static int net_vhost_user_init(NetClientState *peer, const char *device,
     user = g_new0(struct VhostUserState, 1);
     for (i = 0; i < queues; i++) {
         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);
         nc->queue_index = i;
         if (!nc0) {
             nc0 = nc;
@@ -354,16 +355,6 @@ static int net_vhost_user_init(NetClientState *peer, const char *device,
 
     assert(s->vhost_net);
 
-    /* Store startup parameters */
-    nc0->stored_config = g_new0(NetdevInfo, 1);
-    nc0->stored_config->type = NET_BACKEND_VHOST_USER;
-    stored = &nc0->stored_config->u.vhost_user;
-
-    stored->chardev = g_strdup(chardev);
-
-    stored->has_queues = true;
-    stored->queues = queues;
-
     return 0;
 
 err:
@@ -455,6 +446,5 @@ int net_init_vhost_user(const Netdev *netdev, const char *name,
         return -1;
     }
 
-    return net_vhost_user_init(peer, "vhost_user", name,
-                               vhost_user_opts->chardev, chr, queues);
+    return net_vhost_user_init(peer, "vhost_user", name, chr, queues);
 }