Skip to content

Commit

Permalink
sock: Deprecate enable_zerocopy_send in sock_impl_set_options RPC
Browse files Browse the repository at this point in the history
This deprecated parameter will be removed in SPDK 21.07

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7608 (master)

(cherry picked from commit 2fd97e2)
Change-Id: I2b2fbcc798bb50fa6f9dfe35045f66e41c1ceaa9
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7639
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
  • Loading branch information
AlekseyMarchuk authored and tomzawadzki committed Apr 27, 2021
1 parent d9efb8f commit e6e51ea
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ For `bdev_raid_create` RPC, the deprecated parameter `strip_size` was removed.
New RPC `bdev_nvme_get_transport_statistics` was added, it allows to get transport statistics
of nvme poll groups.

Parameter `enable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07,
use `enable-zerocopy-send-server` or `enable-zerocopy-send-client` instead.
Parameter `disable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07,
use `disable-zerocopy-send-server` or `disable-zerocopy-send-client` instead.

### rpm

Added support for new RPM spec, rpmbuild/spdk.spec, which can be used for packaging the
Expand Down
7 changes: 7 additions & 0 deletions deprecation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ The following APIs have been deprecated and will be removed in SPDK 21.07:
- `poll_group_free_stat` (transport op in `nvmf_transport.h`).
Please use `spdk_nvmf_poll_group_dump_stat` and `poll_group_dump_stat` instead.

## rpc

Parameter `enable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07,
use `enable-zerocopy-send-server` or `enable-zerocopy-send-client` instead.
Parameter `disable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07,
use `disable-zerocopy-send-server` or `disable-zerocopy-send-client` instead.

## rpm

`pkg/spdk.spec` is considered to be deprecated and scheduled for removal in SPDK 21.07.
Expand Down
2 changes: 1 addition & 1 deletion doc/jsonrpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -8612,7 +8612,7 @@ 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 | Enable or disable zero copy on send for client and server sockets
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
Expand Down
1 change: 1 addition & 0 deletions include/spdk/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ struct spdk_sock_impl_opts {
bool enable_recv_pipe;

/**
* **Deprecated, please use enable_zerocopy_send_server or enable_zerocopy_send_client instead**
* Enable or disable use of zero copy flow on send. Used by posix socket module.
*/
bool enable_zerocopy_send;
Expand Down
6 changes: 4 additions & 2 deletions scripts/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2619,9 +2619,11 @@ def sock_impl_set_options(args):
action='store_true', dest='enable_recv_pipe')
p.add_argument('--disable-recv-pipe', help='Disable receive pipe',
action='store_false', dest='enable_recv_pipe')
p.add_argument('--enable-zerocopy-send', help='Enable zerocopy on send',
p.add_argument('--enable-zerocopy-send', help="""Enable zerocopy on send
(Deprecated, use enable-zerocopy-send-server or enable-zerocopy-send-client)""",
action='store_true', dest='enable_zerocopy_send')
p.add_argument('--disable-zerocopy-send', help='Disable zerocopy on send',
p.add_argument('--disable-zerocopy-send', help="""Enable zerocopy on send
(Deprecated, use disable-zerocopy-send-server or disable-zerocopy-send-client)""",
action='store_false', dest='enable_zerocopy_send')
p.add_argument('--enable-quickack', help='Enable quick ACK',
action='store_true', dest='enable_quickack')
Expand Down
3 changes: 2 additions & 1 deletion scripts/rpc/sock.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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: enable or disable zerocopy on send (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)
Expand All @@ -44,6 +44,7 @@ def sock_impl_set_options(client,
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
Expand Down

0 comments on commit e6e51ea

Please sign in to comment.