acda74
From 3bd15e7694b6ad69832e17cf03ac09b2363cba78 Mon Sep 17 00:00:00 2001
acda74
Message-Id: <3bd15e7694b6ad69832e17cf03ac09b2363cba78@dist-git>
acda74
From: Peter Krempa <pkrempa@redhat.com>
acda74
Date: Mon, 20 Feb 2023 17:25:08 +0100
acda74
Subject: [PATCH] qemu: capabilities: Introduce
acda74
 QEMU_CAPS_NETDEV_STREAM_RECONNECT
acda74
acda74
Detect that the 'stream' netdev backend supports reconnecting.
acda74
acda74
src/qemu/qemu_capabilities.c
acda74
tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml
acda74
acda74
  both of these files had the usual merge conflicts caused by
acda74
  unrelated caps flags added upstream but not in RHEL.
acda74
acda74
Resolves: https://bugzilla.redhat.com/2172098
acda74
acda74
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
acda74
Reviewed-by: Laine Stump <laine@redhat.com>
acda74
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
acda74
(cherry picked from commit 70747222a73ffed5cdadcab492bef67fe7e49aa4)
acda74
Signed-off-by: Laine Stump <laine@redhat.com>
acda74
---
acda74
 src/qemu/qemu_capabilities.c                     | 2 ++
acda74
 src/qemu/qemu_capabilities.h                     | 1 +
acda74
 tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml | 1 +
acda74
 3 files changed, 4 insertions(+)
acda74
acda74
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
acda74
index 56cad891cc..61aa99dfc6 100644
acda74
--- a/src/qemu/qemu_capabilities.c
acda74
+++ b/src/qemu/qemu_capabilities.c
acda74
@@ -684,6 +684,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
acda74
               /* 440 */
acda74
               "machine-hpet", /* QEMU_CAPS_MACHINE_HPET */
acda74
               "netdev.stream", /* QEMU_CAPS_NETDEV_STREAM */
acda74
+              "netdev.stream.reconnect", /* QEMU_CAPS_NETDEV_STREAM_RECONNECT */
acda74
     );
acda74
 
acda74
 
acda74
@@ -1552,6 +1553,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
acda74
     { "nbd-server-start/arg-type/tls-creds", QEMU_CAPS_NBD_TLS },
acda74
     { "nbd-server-add/arg-type/bitmap", QEMU_CAPS_NBD_BITMAP },
acda74
     { "netdev_add/arg-type/+stream", QEMU_CAPS_NETDEV_STREAM },
acda74
+    { "netdev_add/arg-type/+stream/reconnect", QEMU_CAPS_NETDEV_STREAM_RECONNECT },
acda74
     { "netdev_add/arg-type/+vhost-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA },
acda74
     /* JSON support for -netdev was introduced for the 'dgram' netdev type */
acda74
     { "netdev_add/arg-type/type/^dgram", QEMU_CAPS_NETDEV_JSON },
acda74
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
acda74
index 15dddd3ea9..8543af868e 100644
acda74
--- a/src/qemu/qemu_capabilities.h
acda74
+++ b/src/qemu/qemu_capabilities.h
acda74
@@ -663,6 +663,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
acda74
     /* 440 */
acda74
     QEMU_CAPS_MACHINE_HPET, /* the HPET timer is configured via -machine, rather than -no-hpet */
acda74
     QEMU_CAPS_NETDEV_STREAM, /* -netdev stream */
acda74
+    QEMU_CAPS_NETDEV_STREAM_RECONNECT, /* -netdev stream supports reconnect */
acda74
 
acda74
     QEMU_CAPS_LAST /* this must always be the last item */
acda74
 } virQEMUCapsFlags;
acda74
diff --git a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml
acda74
index a383075d4d..6d07d07822 100644
acda74
--- a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml
acda74
+++ b/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml
acda74
@@ -202,6 +202,7 @@
acda74
   <flag name='screenshot-format-png'/>
acda74
   <flag name='machine-hpet'/>
acda74
   <flag name='netdev.stream'/>
acda74
+  <flag name='netdev.stream.reconnect'/>
acda74
   <version>7002050</version>
acda74
   <kvmVersion>0</kvmVersion>
acda74
   <microcodeVersion>43100244</microcodeVersion>
acda74
-- 
acda74
2.39.2
acda74