From: Laurent Vivier <lvivier@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>
Subject: [PATCH v2 4/4] net: update netdev stream man page with the reconnect parameter
Date: Thu, 4 Jul 2024 14:48:34 +0200 [thread overview]
Message-ID: <20240704124834.81958-5-lvivier@redhat.com> (raw)
In-Reply-To: <20240704124834.81958-1-lvivier@redhat.com>
"-netdev stream" supports a reconnect parameter that attempts to
reconnect automatically the socket if it is disconnected. The code
has been added but the man page has not been updated.
Fixes: 148fbf0d58a6 ("net: stream: add a new option to automatically reconnect"
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
qemu-options.hx | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 1bbf629b9959..c78f69851bf3 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3353,7 +3353,7 @@ SRST
-device e1000,netdev=n1,mac=52:54:00:12:34:56 \\
-netdev socket,id=n1,mcast=239.192.168.1:1102,localaddr=1.2.3.4
-``-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,numeric=on|off][,keep-alive=on|off][,mptcp=on|off][,addr.ipv4=on|off][,addr.ipv6=on|off]``
+``-netdev stream,id=str[,server=on|off],addr.type=inet,addr.host=host,addr.port=port[,to=maxport][,numeric=on|off][,keep-alive=on|off][,mptcp=on|off][,addr.ipv4=on|off][,addr.ipv6=on|off][,reconnect=seconds]``
Configure a network backend to connect to another QEMU virtual machine or a proxy using a TCP/IP socket.
``server=on|off``
@@ -3380,6 +3380,10 @@ SRST
``ipv6=on|off``
whether to accept IPv6 addresses, default to try both IPv4 and IPv6
+ ``reconnect=seconds``
+ 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)
+
Example (two guests connected using a TCP/IP socket):
.. parsed-literal::
@@ -3391,9 +3395,9 @@ SRST
# second VM
|qemu_system| linux.img \\
-device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
- -netdev stream,id=net0,server=off,addr.type=inet,addr.host=localhost,addr.port=1234
+ -netdev stream,id=net0,server=off,addr.type=inet,addr.host=localhost,addr.port=1234,reconnect=5
-``-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off]``
+``-netdev stream,id=str[,server=on|off],addr.type=unix,addr.path=path[,abstract=on|off][,tight=on|off][,reconnect=seconds]``
Configure a network backend to connect to another QEMU virtual machine or a proxy using a stream oriented unix domain socket.
``server=on|off``
@@ -3408,6 +3412,10 @@ SRST
``tight=on|off``
if false, pad an abstract socket address with enough null bytes to make it fill struct sockaddr_un member sun_path.
+ ``reconnect=seconds``
+ 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)
+
Example (using passt as a replacement of -netdev user):
.. parsed-literal::
@@ -3431,9 +3439,9 @@ SRST
# second VM
|qemu_system| linux.img \\
-device virtio-net,netdev=net0,mac=52:54:00:12:34:57 \\
- -netdev stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/qemu0
+ -netdev stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/qemu0,reconnect=5
-``-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor``
+``-netdev stream,id=str[,server=on|off],addr.type=fd,addr.str=file-descriptor[,reconnect=seconds]``
Configure a network backend to connect to another QEMU virtual machine or a proxy using a stream oriented socket file descriptor.
``server=on|off``
@@ -3442,6 +3450,10 @@ SRST
``addr.str=file-descriptor``
file descriptor number to use as a socket
+ ``reconnect=seconds``
+ 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)
+
``-netdev dgram,id=str,remote.type=inet,remote.host=maddr,remote.port=port[,local.type=inet,local.host=addr]``
Configure a network backend to connect to a multicast address.
--
2.45.2
next prev parent reply other threads:[~2024-07-04 12:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 12:48 [PATCH v2 0/4] net: update netdev stream/dgram man page Laurent Vivier
2024-07-04 12:48 ` [PATCH v2 1/4] " Laurent Vivier
2024-07-04 12:48 ` [PATCH v2 2/4] net: update netdev stream man page with unix socket Laurent Vivier
2024-07-04 12:48 ` [PATCH v2 3/4] net: update netdev dgram " Laurent Vivier
2024-07-04 12:48 ` Laurent Vivier [this message]
2024-07-15 8:29 ` [PATCH v2 0/4] net: update netdev stream/dgram man page Marc-André Lureau
2024-07-25 6:48 ` Laurent Vivier
2024-07-26 2:23 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240704124834.81958-5-lvivier@redhat.com \
--to=lvivier@redhat.com \
--cc=jasowang@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).