socket: Remove deprecated enable_zerocopy_send

This parameter is still part of API spdk_sock_impl_opts
structure but it is not used. Keep it to support ABI
compatibility since it is located in the middle of the
structure and removing it may break socket opts initialization
or parsing.

Change-Id: Ib641ad7d965d68bc9ebb65dba531408d88cf6fa1
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8914
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Alexey Marchuk 2021-07-23 08:09:47 +03:00 committed by Tomasz Zawadzki
parent 5818b42fce
commit ec1b78dbd7
7 changed files with 7 additions and 24 deletions

View File

@ -8885,7 +8885,6 @@ Example response:
"recv_buf_size": 2097152,
"send_buf_size": 2097152,
"enable_recv_pipe": true,
"enable_zerocopy_send": true,
"enable_quickack": true,
"enable_placement_id": 0,
"enable_zerocopy_send_server": true,
@ -8906,7 +8905,6 @@ impl_name | Required | string | Name of socket implementa
recv_buf_size | Optional | number | Size of socket receive buffer in bytes
send_buf_size | Optional | number | Size of socket send buffer in bytes
enable_recv_pipe | Optional | boolean | Enable or disable receive pipe
enable_zerocopy_send | Optional | boolean | Deprecated. Enable or disable zero copy on send for client and server sockets
enable_quick_ack | Optional | boolean | Enable or disable quick ACK
enable_placement_id | Optional | number | Enable or disable placement_id. 0:disable,1:incoming_napi,2:incoming_cpu
enable_zerocopy_send_server | Optional | boolean | Enable or disable zero copy on send for server sockets
@ -8930,7 +8928,6 @@ Example request:
"recv_buf_size": 2097152,
"send_buf_size": 2097152,
"enable_recv_pipe": false,
"enable_zerocopy_send": true,
"enable_quick_ack": false,
"enable_placement_id": 0,
"enable_zerocopy_send_server": true,

View File

@ -339,7 +339,6 @@ perf_set_sock_zcopy(const char *impl_name, bool enable)
opts_size = sizeof(sock_opts);
}
sock_opts.enable_zerocopy_send = enable;
sock_opts.enable_zerocopy_send_client = enable;
if (spdk_sock_impl_set_opts(impl_name, &sock_opts, opts_size)) {

View File

@ -3,6 +3,7 @@
*
* Copyright (c) Intel Corporation. All rights reserved.
* Copyright (c) 2020 Mellanox Technologies LTD. All rights reserved.
* Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -788,7 +789,6 @@ spdk_sock_write_config_json(struct spdk_json_write_ctx *w)
spdk_json_write_named_uint32(w, "recv_buf_size", opts.recv_buf_size);
spdk_json_write_named_uint32(w, "send_buf_size", opts.send_buf_size);
spdk_json_write_named_bool(w, "enable_recv_pipe", opts.enable_recv_pipe);
spdk_json_write_named_bool(w, "enable_zerocopy_send", opts.enable_zerocopy_send);
spdk_json_write_named_bool(w, "enable_quickack", opts.enable_quickack);
spdk_json_write_named_uint32(w, "enable_placement_id", opts.enable_placement_id);
spdk_json_write_named_bool(w, "enable_zerocopy_send_server", opts.enable_zerocopy_send_server);

View File

@ -2,6 +2,7 @@
* BSD LICENSE
*
* Copyright (c) 2020, 2021 Mellanox Technologies LTD. All rights reserved.
* Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -74,7 +75,6 @@ rpc_sock_impl_get_options(struct spdk_jsonrpc_request *request,
spdk_json_write_named_uint32(w, "recv_buf_size", sock_opts.recv_buf_size);
spdk_json_write_named_uint32(w, "send_buf_size", sock_opts.send_buf_size);
spdk_json_write_named_bool(w, "enable_recv_pipe", sock_opts.enable_recv_pipe);
spdk_json_write_named_bool(w, "enable_zerocopy_send", sock_opts.enable_zerocopy_send);
spdk_json_write_named_bool(w, "enable_quickack", sock_opts.enable_quickack);
spdk_json_write_named_uint32(w, "enable_placement_id", sock_opts.enable_placement_id);
spdk_json_write_named_bool(w, "enable_zerocopy_send_server", sock_opts.enable_zerocopy_send_server);
@ -108,10 +108,6 @@ static const struct spdk_json_object_decoder rpc_sock_impl_set_opts_decoders[] =
"enable_recv_pipe", offsetof(struct spdk_rpc_sock_impl_set_opts, sock_opts.enable_recv_pipe),
spdk_json_decode_bool, true
},
{
"enable_zerocopy_send", offsetof(struct spdk_rpc_sock_impl_set_opts, sock_opts.enable_zerocopy_send),
spdk_json_decode_bool, true
},
{
"enable_quickack", offsetof(struct spdk_rpc_sock_impl_set_opts, sock_opts.enable_quickack),
spdk_json_decode_bool, true

View File

@ -3,6 +3,7 @@
*
* Copyright (c) Intel Corporation. All rights reserved.
* Copyright (c) 2020, 2021 Mellanox Technologies LTD. All rights reserved.
* Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -90,7 +91,6 @@ static struct spdk_sock_impl_opts g_spdk_posix_sock_impl_opts = {
.recv_buf_size = MIN_SO_RCVBUF_SIZE,
.send_buf_size = MIN_SO_SNDBUF_SIZE,
.enable_recv_pipe = true,
.enable_zerocopy_send = true,
.enable_quickack = false,
.enable_placement_id = PLACEMENT_NONE,
.enable_zerocopy_send_server = true,
@ -563,8 +563,7 @@ retry:
fd = -1;
break;
}
enable_zcopy_impl_opts = g_spdk_posix_sock_impl_opts.enable_zerocopy_send_server &&
g_spdk_posix_sock_impl_opts.enable_zerocopy_send;
enable_zcopy_impl_opts = g_spdk_posix_sock_impl_opts.enable_zerocopy_send_server;
} else if (type == SPDK_SOCK_CREATE_CONNECT) {
rc = connect(fd, res->ai_addr, res->ai_addrlen);
if (rc != 0) {
@ -574,8 +573,7 @@ retry:
fd = -1;
continue;
}
enable_zcopy_impl_opts = g_spdk_posix_sock_impl_opts.enable_zerocopy_send_client &&
g_spdk_posix_sock_impl_opts.enable_zerocopy_send;
enable_zcopy_impl_opts = g_spdk_posix_sock_impl_opts.enable_zerocopy_send_client;
}
flag = fcntl(fd, F_GETFL);

View File

@ -2638,7 +2638,6 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
recv_buf_size=args.recv_buf_size,
send_buf_size=args.send_buf_size,
enable_recv_pipe=args.enable_recv_pipe,
enable_zerocopy_send=args.enable_zerocopy_send,
enable_quickack=args.enable_quickack,
enable_placement_id=args.enable_placement_id,
enable_zerocopy_send_server=args.enable_zerocopy_send_server,
@ -2665,9 +2664,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
action='store_true', dest='enable_zerocopy_send_client')
p.add_argument('--disable-zerocopy-send-client', help='Disable zerocopy on send for client sockets',
action='store_false', dest='enable_zerocopy_send_client')
p.set_defaults(func=sock_impl_set_options, enable_recv_pipe=None, enable_zerocopy_send=None,
enable_quickack=None, enable_placement_id=None, enable_zerocopy_send_server=None,
enable_zerocopy_send_client=None)
p.set_defaults(func=sock_impl_set_options, enable_recv_pipe=None, enable_quickack=None,
enable_placement_id=None, enable_zerocopy_send_server=None, enable_zerocopy_send_client=None)
def sock_set_default_impl(args):
print_json(rpc.sock.sock_set_default_impl(args.client,

View File

@ -16,7 +16,6 @@ def sock_impl_set_options(client,
recv_buf_size=None,
send_buf_size=None,
enable_recv_pipe=None,
enable_zerocopy_send=None,
enable_quickack=None,
enable_placement_id=None,
enable_zerocopy_send_server=None,
@ -28,7 +27,6 @@ def sock_impl_set_options(client,
recv_buf_size: size of socket receive buffer in bytes (optional)
send_buf_size: size of socket send buffer in bytes (optional)
enable_recv_pipe: enable or disable receive pipe (optional)
enable_zerocopy_send: (Deprecated) enable or disable zerocopy on send (optional)
enable_quickack: enable or disable quickack (optional)
enable_placement_id: option for placement_id. 0:disable,1:incoming_napi,2:incoming_cpu (optional)
enable_zerocopy_send_server: enable or disable zerocopy on send for server sockets(optional)
@ -43,9 +41,6 @@ def sock_impl_set_options(client,
params['send_buf_size'] = send_buf_size
if enable_recv_pipe is not None:
params['enable_recv_pipe'] = enable_recv_pipe
if enable_zerocopy_send is not None:
print("WARNING: enable_zerocopy_send is deprecated, please use enable_zerocopy_send_server or enable_zerocopy_send_client.")
params['enable_zerocopy_send'] = enable_zerocopy_send
if enable_quickack is not None:
params['enable_quickack'] = enable_quickack
if enable_placement_id is not None: