Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com> Change-Id: If1193ef647c85b045d7f14a03a9942783583f553 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/612 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
31 lines
949 B
Python
31 lines
949 B
Python
def sock_impl_get_options(client, impl_name=None):
|
|
"""Get parameters for the socket layer implementation.
|
|
|
|
Args:
|
|
impl_name: name of socket implementation, e.g. posix
|
|
"""
|
|
params = {}
|
|
|
|
params['impl_name'] = impl_name
|
|
|
|
return client.call('sock_impl_get_options', params)
|
|
|
|
|
|
def sock_impl_set_options(client, impl_name=None, recv_buf_size=None, send_buf_size=None):
|
|
"""Set parameters for the socket layer implementation.
|
|
|
|
Args:
|
|
impl_name: name of socket implementation, e.g. posix
|
|
recv_buf_size: size of socket receive buffer in bytes (optional)
|
|
send_buf_size: size of socket send buffer in bytes (optional)
|
|
"""
|
|
params = {}
|
|
|
|
params['impl_name'] = impl_name
|
|
if recv_buf_size is not None:
|
|
params['recv_buf_size'] = recv_buf_size
|
|
if send_buf_size is not None:
|
|
params['send_buf_size'] = send_buf_size
|
|
|
|
return client.call('sock_impl_set_options', params)
|