diff --git a/doc/jsonrpc.md b/doc/jsonrpc.md index 764f080f4..86c8a6369 100644 --- a/doc/jsonrpc.md +++ b/doc/jsonrpc.md @@ -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, diff --git a/examples/nvme/perf/perf.c b/examples/nvme/perf/perf.c index 7c410b8dd..31d293088 100644 --- a/examples/nvme/perf/perf.c +++ b/examples/nvme/perf/perf.c @@ -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)) { diff --git a/lib/sock/sock.c b/lib/sock/sock.c index 320e7474e..8437d6f04 100644 --- a/lib/sock/sock.c +++ b/lib/sock/sock.c @@ -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); diff --git a/lib/sock/sock_rpc.c b/lib/sock/sock_rpc.c index 46d725cbd..6404b91e6 100644 --- a/lib/sock/sock_rpc.c +++ b/lib/sock/sock_rpc.c @@ -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 diff --git a/module/sock/posix/posix.c b/module/sock/posix/posix.c index 0652ec503..7ed9a5bac 100644 --- a/module/sock/posix/posix.c +++ b/module/sock/posix/posix.c @@ -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); diff --git a/scripts/rpc.py b/scripts/rpc.py index 9a47b7b09..bec5c13e3 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -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, diff --git a/scripts/rpc/sock.py b/scripts/rpc/sock.py index cd1c42887..3827368a7 100644 --- a/scripts/rpc/sock.py +++ b/scripts/rpc/sock.py @@ -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: