qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] net: stream: add a new option to automatically reconnect


From: Laurent Vivier
Subject: Re: [PATCH v2] net: stream: add a new option to automatically reconnect
Date: Tue, 3 Jan 2023 15:44:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

On 1/3/23 15:28, Thomas Huth wrote:
On 03/01/2023 15.22, Laurent Vivier wrote:
In stream mode, if the server shuts down there is currently
no way to reconnect the client to a new server without removing
the NIC device and the netdev backend (or to reboot).

This patch introduces a reconnect option that specifies a delay
to try to reconnect with the same parameters.

Add a new test in qtest to test the reconnect option and the
connect/disconnect events.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
Based-on: <20230103110049.120340-1-lvivier@redhat.com>
v2:
- rebase

  net/stream.c                |  53 ++++++++++++++++++-
  qapi/net.json               |   6 ++-
  qemu-options.hx             |   6 +--
  tests/qtest/netdev-socket.c | 100 ++++++++++++++++++++++++++++++++++++
  4 files changed, 160 insertions(+), 5 deletions(-)
[...]
diff --git a/qapi/net.json b/qapi/net.json
index 522ac582edeb..5b72c936b3ac 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -585,6 +585,9 @@
  # @addr: socket address to listen on (server=true)
  #        or connect to (server=false)
  # @server: create server socket (default: false)
+# @reconnect: For a client socket, if a socket is disconnected,
+#             then attempt a reconnect after the given number of seconds.
+#             Setting this to zero disables this function. (default: 0)

I think this should get a "(since 8.0)" comment to make it clear when it has 
been introduced?


Yes, you're right. It will be in the next patch version.

Thanks,
Laurent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]