qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juraj Marcin <jmarcin@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Juraj Marcin" <jmarcin@redhat.com>,
	vsementsov@yandex-team.ru, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH v2 0/2] util/qemu-sockets: Introduce configurable TCP keep-alive idle period
Date: Wed, 19 Mar 2025 17:36:18 +0100	[thread overview]
Message-ID: <20250319163638.456417-1-jmarcin@redhat.com> (raw)

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



             reply	other threads:[~2025-03-19 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 16:36 Juraj Marcin [this message]
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

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=20250319163638.456417-1-jmarcin@redhat.com \
    --to=jmarcin@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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).