Commit ec1b78db authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

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: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8914


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 5818b42f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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,
+0 −1
Original line number Diff line number Diff line
@@ -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)) {
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −5
Original line number Diff line number Diff line
@@ -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
+3 −5
Original line number Diff line number Diff line
@@ -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);
Loading