
On 9/24/25 4:33 PM, Vladimir Sementsov-Ogievskiy wrote:
It was deprecated in 9.2, time to remove.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
--- docs/about/deprecated.rst | 9 --------- docs/about/removed-features.rst | 10 ++++++++++ net/stream.c | 20 +++++--------------- qapi/net.json | 13 +------------ 4 files changed, 16 insertions(+), 36 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ba0be97513..4452c08bf5 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -439,15 +439,6 @@ Backend ``memory`` (since 9.0) ``memory`` is a deprecated synonym for ``ringbuf``.
-Net device options -'''''''''''''''''' - -Stream ``reconnect`` (since 9.2) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``reconnect`` option only allows specifying second granularity timeouts, -which is not enough for all types of use cases, use ``reconnect-ms`` instead. - CPU device properties '''''''''''''''''''''
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index d67928956a..ae7d7287fc 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -1373,4 +1373,14 @@ Character device options The ``reconnect`` has been replaced by ``reconnect-ms``, which provides better precision.
+Net device options +'''''''''''''''''' + +Stream ``reconnect`` (removed in 10.2) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``reconnect`` has been replaced by ``reconnect-ms``, which provides +better precision. + + .. _Intel discontinuance notification: https://www.intel.com/content/www/us/en/content-details/781327/intel-is-disc... diff --git a/net/stream.c b/net/stream.c index 94f823a2a7..ea83f4a763 100644 --- a/net/stream.c +++ b/net/stream.c @@ -274,23 +274,13 @@ int net_init_stream(const Netdev *netdev, const char *name, sock = &netdev->u.stream;
if (!sock->has_server || !sock->server) { - uint32_t reconnect_ms = 0; - - if (sock->has_reconnect && sock->has_reconnect_ms) { - error_setg(errp, "'reconnect' and 'reconnect-ms' are mutually " - "exclusive"); - return -1; - } else if (sock->has_reconnect_ms) { - reconnect_ms = sock->reconnect_ms; - } else if (sock->has_reconnect) { - reconnect_ms = sock->reconnect * 1000u; - } - return net_stream_client_init(peer, "stream", name, sock->addr, - reconnect_ms, errp); + sock->has_reconnect_ms ? + sock->reconnect_ms : 0, + errp); } - if (sock->has_reconnect || sock->has_reconnect_ms) { - error_setg(errp, "'reconnect' and 'reconnect-ms' options are " + if (sock->has_reconnect_ms) { + error_setg(errp, "'reconnect-ms' option is " "incompatible with socket in server mode"); return -1; } diff --git a/qapi/net.json b/qapi/net.json index 78bcc9871e..642d4d03cd 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -770,29 +770,18 @@ # # @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) (since 8.0) -# # @reconnect-ms: For a client socket, if a socket is disconnected, then # attempt a reconnect after the given number of milliseconds. Setting -# this to zero disables this function. This member is mutually -# exclusive with @reconnect. (default: 0) (Since: 9.2) +# this to zero disables this function. (default: 0) (Since: 9.2) # # Only `SocketAddress` types 'unix', 'inet' and 'fd' are supported. # -# Features: -# -# @deprecated: Member @reconnect is deprecated. Use @reconnect-ms -# instead. -# # Since: 7.2 ## { 'struct': 'NetdevStreamOptions', 'data': { 'addr': 'SocketAddress', '*server': 'bool', - '*reconnect': { 'type': 'int', 'features': [ 'deprecated' ] }, '*reconnect-ms': 'int' } }
##