Skip to content

util/qemu-sockets: Introduce configurable TCP keep-alive idle period

Juraj Marcin qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 6 repliesIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2util/qemu-sockets: Add support for keep-alive flag to passive socketsio/dns-resolver.c qapi/sockets.json util/qemu-sockets.c+33 -253 replies
2/2utils/qemu-sockets: Introduce keep-alive-idle-period inet socket optionio/dns-resolver.c meson.build qapi/sockets.json +1 more+40 -03 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchVladimir Sementsov-Ogievskiy
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] util/qemu-sockets: Introduce configurable TCP keep-alive idle period

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/[email protected]/

---
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(-)
Signature · 1 line
2.48.1