Spdk/python/spdk/rpc/iobuf.py
Slawomir Ptak 24f6172ac8 rpc: fix new line formatting
Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com>
Change-Id: I2ab213f6ab1751895b9bef138cc4cbd4892ea29e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16719
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-22 08:09:41 +00:00

27 lines
901 B
Python

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (C) 2022 Intel Corporation.
# All rights reserved.
def iobuf_set_options(client, small_pool_count, large_pool_count, small_bufsize, large_bufsize):
"""Set iobuf pool options.
Args:
small_pool_count: number of small buffers in the global pool
large_pool_count: number of large buffers in the global pool
small_bufsize: size of a small buffer
large_bufsize: size of a large buffer
"""
params = {}
if small_pool_count is not None:
params['small_pool_count'] = small_pool_count
if large_pool_count is not None:
params['large_pool_count'] = large_pool_count
if small_bufsize is not None:
params['small_bufsize'] = small_bufsize
if large_bufsize is not None:
params['large_bufsize'] = large_bufsize
return client.call('iobuf_set_options', params)