qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] util/qemu-sockets: Introduce configurable TCP keep-alive idle period
@ 2025-03-19 16:36 Juraj Marcin
  2025-03-19 16:36 ` [PATCH v2 1/2] util/qemu-sockets: Add support for keep-alive flag to passive sockets Juraj Marcin
  2025-03-19 16:36 ` [PATCH v2 2/2] utils/qemu-sockets: Introduce keep-alive-idle-period inet socket option Juraj Marcin
  0 siblings, 2 replies; 9+ messages in thread
From: Juraj Marcin @ 2025-03-19 16:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Juraj Marcin, vsementsov, Paolo Bonzini, Daniel P. Berrangé

This series extends the work introduced by commit aec21d3175 ("qapi: Add
InetSocketAddress member keep-alive") [1]

First, it allows the use of the keep-alive flag for server-side sockets.
Then it introduces a new keep-alive-idle-period setting, which changes
the TCP_KEEPIDLE socket option on platforms that support it (this option
is found in Linux, BSD, and Win32 documentations).

By default, the value of keep-alive-idle-period is 0, which means no
custom socket option value is set.

This is useful, for example, for live migration. In case there is no
traffic from the destination to the source machine during postcopy, the
destination cannot detect a failed connection due to a lack of
non-acknowledged packets and stays in the postcopy-active state until
paused by the management of the QEMU instance.

[1]: https://lore.kernel.org/all/20190725094937.32454-1-vsementsov@virtuozzo.com/

---
V2:
- moved socket options setting into a common function for both server
  and client sockets (suggested by Vladimir)

Juraj Marcin (2):
  util/qemu-sockets: Add support for keep-alive flag to passive sockets
  utils/qemu-sockets: Introduce keep-alive-idle-period inet socket
    option

 io/dns-resolver.c   |  6 ++++
 meson.build         |  2 ++
 qapi/sockets.json   |  9 +++--
 util/qemu-sockets.c | 81 ++++++++++++++++++++++++++++++++-------------
 4 files changed, 73 insertions(+), 25 deletions(-)

-- 
2.48.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-26 12:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 16:36 [PATCH v2 0/2] util/qemu-sockets: Introduce configurable TCP keep-alive idle period Juraj Marcin
2025-03-19 16:36 ` [PATCH v2 1/2] util/qemu-sockets: Add support for keep-alive flag to passive sockets Juraj Marcin
2025-03-20  7:51   ` Vladimir Sementsov-Ogievskiy
2025-03-24 10:30   ` Daniel P. Berrangé
2025-03-26 12:40     ` Juraj Marcin
2025-03-19 16:36 ` [PATCH v2 2/2] utils/qemu-sockets: Introduce keep-alive-idle-period inet socket option Juraj Marcin
2025-03-20  8:00   ` Vladimir Sementsov-Ogievskiy
2025-03-24 11:12   ` Daniel P. Berrangé
2025-03-24 14:08     ` Juraj Marcin

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).