Skip to content
Compare
Choose a tag to compare

SPDK v20.04: SPDK Top, IDXD, NVMe qpair groups

@tomzawadzki tomzawadzki released this
· 6 commits to v20.04.x since this release
Compare
Choose a tag to compare

configuration

Legacy INI style configuration for SPDK applications has been deprecated and will be
removed in future release.
Please switch to JSON-RPC configuration files and/or RPC driven run-time configuration.

copy

The copy engine library, modules and public APIs have been renamed. Use of the word copy
has been replaced with the word accel short for accelerator in preparation for adding new
capabilities in the future. Additionally, APIs for what was previously called the memcpy
engine have been renamed to identify the engine as a software accelerator.

crypto

Support for AES_XTS was added for the QAT polled mode driver (pmd). The create RPC
bdev_crypto_create has 2 new optional parameters: cipher and key2. Cipher can be either
AES_CBC (default) or AES_XTS. AES_XTS is only valid when using the QAT polled mode driver.
The key2 parameter is the second key required for AES_XTS.

event

Reactors now accumulate CPU stats and they are retrieved by the RPC framework_get_reactors.

idxd

IDXD support was added in the form of a low level library that can directly
utilize the IDXD offload engine as well as an accel plug-in module allowing for use
with the generic accel framework API. IDXD is the first in a family of offload
engines that share the same interface, specifically DSA is added here. More info
can be found here: https://01.org/blogs/2019/introducing-intel-data-streaming-accelerator

Much of the implementation models IOAT, however the low level interfaces are very
different. The RPC to enable IDXD requires a configuration number as well. The
code includes two pre-defined configurations of IDXD groups/work queues/engines. A future
version will provide an interface to allow for setting of individual configuration
parameters.

IDXD is not yet available so this feature should be considered experimental. It will
be built up with additional documentation as an ongoing activity.

iscsi

The iSCSI target now creates a lightweight thread per poll group instead of assuming a pool
of lightweight threads already exist at start up time. A poll group is a collection of
unrelated iSCSI connections. Each poll group is only accessed from the associated
lightweight thread.

ftl

Several changes have been made to the spdk_ftl_conf, spdk_ftl_dev_init_ops, and
spdk_ftl_attrs structs. Please see include/spdk/ftl.h for more details.

miscellaneous

The --json-ignore-init-errors command line parameter has been added to ignore
initialization errors on JSON config load.

The public header file io_channel.h has been removed. Please use thread.h which has the
exact same API.

nvme

Exported internal nvme_ctrlr_cmd_security_receive/send() APIs as public APIs with "the spdk_"
prefix.

Added priority field in spdk_nvme_transport_id, this field is used to specify the priority
of the NVMe-oF connection, and currently it is used for NVMe-oF tcp connection.

A new poll group API has been added to allow for pooling of nvme qpairs across a single
entity which can be polled for completions. This new API consists of the spdk_nvme_poll_group
family of functions. As a result of this new API, all NVMe transports are expected to implement
several poll group related functions.

A new flag, create_only, has been added to the spdk_nvme_io_qpair_opts structure. This flag
allows a user to call spdk_nvme_ctrlr_get_default_io_qpair without also connecting the qpair
within the context of that call.

As a result of the create_only flag, two new API functions, spdk_nvme_ctrlr_connect_io_qpair
and spdk_nvme_ctrlr_disconnect_io_qpair, have been added to facilitate connecting newly created
qpairs (for example, after they have been added to a poll group) and disconnecting qpairs without
destroying them (for example to disconnect a qpair before migrating it to a new poll group and
reconnecting it).

The functions spdk_nvme_ctrlr_alloc_cmb_io_buffer and spdk_nvme_ctrlr_free_cmb_io_buffer
have been changed to spdk_nvme_ctrlr_map_cmb and spdk_nvme_ctrlr_unmap_cmb respectively.

An additional function, spdk_nvme_ctrlr_reserve_cmb, has been added to facilitate reserving
the entire size of the controller memory buffer for data transfer.

nvme_cuse

spdk_nvme_cuse_get_ctrlr_name now takes two additional parameters, char *name which
stores the pointer to the controller name, and size_t *size which stores the length of
the name. The return type has also been changed from char * to int.

spdk_nvme_cuse_get_ns_name now takes two additional parameters, char *name which
stores the pointer to the namespace name, and size_t *size which stores the length of
the name. The return type has also been changed from char * to int.

nvme_opal

Several public OPAL structure definitions have been changed since the last release.

nvmf

spdk_nvmf_poll_group_destroy() is now asynchronous and accepts a completion callback.

The NVMe-oF target now creates a lightweight thread per poll group instead of assuming a pool
of lightweight threads already exist at start up time. A poll group is a collection of
unrelated NVMe-oF connections. Each poll group is only accessed from the associated
lightweight thread.

A new struct, spdk_nvmf_subsystem_listener, has been added to encapsulate the subsystem specific
nature of a listener object.

spdk_nvmf_tgt_listen no longer accepts a callback function or argument. It also returns an
int to indicate the status of the listen call.

The execution of spdk_nvme_poll_group_destroy is now asynchronous and the function accepts
a cb_fn and cb_arg to call upon completion.

The execution of spdk_nvmf_subsystem_add_listener is now asynchronous and the function accepts
a cb_fn and cb_arg to call upon completion.

The nvmf_transport.h header has been made public to allow custom NVMe-oF transports to integrate
with NVMe-oF libraries without using internal APIs.

ocf

Updated the OCF submodule to OCF v20.03

New version of OCF comes with API changes and bug fixes

rpc

A new RPC thread_set_cpumask has been added to set the cpumask of the thread
to the specified value.

A new RPC thread_get_pollers has been added to retrieve pollers from SPDK threads.

A new RPC thread_get_io_channels has been added to retrieve I/O channels from SPDK threads.

A new RPC bdev_rbd_resize has been added to resize Ceph RBD bdevs.

sock

The spdk_sock_set_priority function has been removed since the feature to set the sock priority
will be contained in two new functions, i.e., spdk_sock_listen_ext and spdk_sock_connect_ext.
Users may now specify the priority of the socket in the opts that they want to use.

spdk_top

A new application, spdk_top, has been added which allows users to monitor resource consumption
by a running SPDK application. More information on this application can be found in
app/spdk_top/README.

thread

A new function spdk_thread_lib_init_ext has been added, and the function
spdk_thread_lib_init has been deprecated. The user of spdk_thread_lib_init_ext is
expected to implement both functions spdk_thread_op_fn and spdk_thread_op_supported_fn.
spdk_thread_op_supported_fn is called to check whether the SPDK thread operation
is supported. spdk_thread_op_fn is called to execute the SPDK thread operation.
Current SPDK operation types are SPDK_THREAD_OP_NEW and SPDK_THREAD_OP_RESCHED.
The operation SPDK_THREAD_OP_NEW is called each time a new thread is created.
The operation SPDK_THREAD_OP_RESCHED is called when SPDK thread needs to be rescheduled.

A unique ID has been added for each created SPDK thread, it is retrieved by a new function
spdk_thread_get_id, and the SPDK thread which has the specific ID is got by
a new function spdk_thread_get_by_id.

A new function spdk_thread_cpumask has been added to set the current thread's cpumask
to the specified value. The function requires the operation SPDK_THREAD_OP_RESCHED
is supported.

A new function spdk_poller_register_named has been added to set arbitrary name to the
created poller. If NULL, the name is set to the pointer of the poller function.

The function spdk_thread_poll now measures run time per call correctly on multiple SPDK
threads configuration, and a new function spdk_thread_get_last_tsc has been added to use together.

Voluntary termination of SPDK thread has been supported by refining the functions spdk_thread_exit
and spdk_thread_poll.

util

New functions spdk_sn32_lt and spdk_sn32_gt have been added. They compare two sequence
numbers based on serial number arithmetic.

vhost

Poll groups per session have been replaced by SPDK threads per vhost controller.

vmd

A new function, spdk_vmd_fini, has been added. It releases all resources acquired by the VMD
library through the spdk_vmd_init call.