net/stream: remove deprecated 'reconnect' option
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> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
f223a90b0c
commit
015051a21c
4 changed files with 16 additions and 36 deletions
|
|
@ -469,15 +469,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
|
||||
'''''''''''''''''''''
|
||||
|
||||
|
|
|
|||
|
|
@ -1379,4 +1379,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-discontinuing-ip-ordering-codes-listed-in-pdn2312-for-nios-ii-ip.html
|
||||
|
|
|
|||
20
net/stream.c
20
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' } }
|
||||
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue