1# Changelog 2 3## v23.01: (Upcoming Release) 4 5### accel 6 7New library isa-l-crypto has been added, it is used by accel library in crypto operations. 8 9### bdev 10 11Both of interleaved and separated metadata are now supported by the malloc bdev module. 12 13Protection information is now supported by the malloc bdev module. 14 15A new API `spkd_bdev_part_submit_request_ext` was added to specify a custom completion callback. 16 17### scheduler 18 19Changing scheduler from dynamic back to static is no longer possible, 20as there is no way of saving original SPDK thread distribution on reactors. 21 22### bdev 23 24New APIs `spdk_bdev_for_each_channel` and `spdk_bdev_for_each_channel_continue` and 25associated function pointers were added to iterate each channel of the required bdev. 26 27The RPC `bdev_get_iostat` now allows a user to query the per channel IO statistics for 28required bdev. 29 30New `spdk_bdev_copy_blocks` and `spdk_bdev_get_max_copy` APIs to support copy commands. 31 32A new API `spdk_bdev_io_get_submit_tsc` was added to get the submit_tsc of the bdev I/O. 33 34Bdevs will no longer have UUIDs generated based on timestamp and are responsible for 35setting this field themselves. Generation of UUIDs for NVMe bdevs may be enabled by 36running `bdev_nvme_set_options` RPC with `--generate-uuids` option. These identifiers 37are based on serial number and namespace ID and will always be the same for a given 38device. 39 40A new API `spdk_bdev_channel_get_histogram` was added to get the histogram of a specified 41channel for a bdev. 42 43Converted internal use of `pthread_mutex_t` to `struct spdk_spinlock`. Consumers of bdev 44API functions must be on an SPDK thread or the program will abort. It is now enforced 45that no internal bdev locks can be held when a poller or message goes off CPU. 46 47A new RPC `bdev_reset_iostat` was added to reset I/O statistics of bdevs. Note that if one 48consumer reset I/O statistics, it affects all other consumers. 49 50### event 51 52Added core lock file mechanism to prevent the same CPU cores from being used by multiple 53SPDK application instances. 54 55Added a command line switch to disable CPU locks on SPDK startup. 56 57Added RPCs framework_enable_cpumask_locks and framework_disable_cpumask_locks to enable 58and disable CPU core locks in runtime. 59 60Added --rpcs-allowed command line option. Users can specify a comma-separated list of RPC 61names with this option to restrict allowed RPCs to only that list. 62 63### rpc 64 65Added spdk_rpc_set_allowlist to restrict allowed RPCs to the specified list. 66 67Changed `bdev_raid_get_bdevs` RPC output format to include raid_bdev details. 68 69### bdevperf 70 71Promoted the application to example to match similar programs: fio_plugin and perf. 72It can now be found inside `examples/bdev/bdevperf`. 73 74### trace 75 76New `trace_get_info` RPC was added to get name of shared memory file, list of the 77available trace point groups and mask of the available trace points for each group. 78 79### util 80 81New API `spdk_fd_group_get_epoll_event` that returns the epoll(7) event that 82caused a function callback in file descriptor group to execute. 83 84### json 85 86Added API `spdk_json_write_double` and `spdk_json_write_named_double` to allow 87for writing and decoding of the the double data type. 88 89### thread 90 91Added `spdk_thread_get_app_thread` which returns the first thread that was created using 92`spdk_thread_create`. 93 94Added `spdk_thread_is_running`. This returns `true` for a running thread, or `false` if 95its exit process has started using `spdk_thread_exit`. 96 97Added API `spdk_spin_init`, `spdk_spin_destroy`, `spdk_spin_lock`, `spdk_spin_unlock`, and 98`spdk_spin_held` to support spinlocks that are aware of the SPDK concurrency model. 99 100### log 101 102Added consistent tracking of use of deprecated behavior. Deprecations continue to be 103listed in deprecation.md and now are in subsections with headers matching a tag 104used in `SPDK_LOG_DEPRECATED()` calls. When deprecated behavior is used, these 105tags will appear in SPDK's log at the warn level. As the SPDK application exits, it 106will log a summary of how many times `SPDK_LOG_DEPRECATED()` was called for each 107tag that was logged at least once. 108 109## v22.09 110 111### accel 112 113Many names were changed in the accel framework to make them consistent both with themselves and 114the rest of SPDK. The primary public header file is now named `include/spdk/accel.h`. 115 116Added a new runtime RPC `accel_get_opc_assignments` to get a list of current opcode to engine 117assignments. 118 119Added a new startup RPC `accel_assign_opc` to assign/override a specific opcode to 120an engine. 121 122### bdev 123 124New RPCs `bdev_xnvme_create` and `bdev_xnvme_delete` were added to support the xNVMe bdev. 125 126A new API `spdk_bdev_for_each_bdev_io` was added to execute the function on the appropriate 127thread for each bdev_io submitted to the bdev. 128 129A new API `spdk_bdev_get_current_qd` was added to measure and return the queue depth from a 130bdev. This API is available even when queue depth sampling is disabled. 131 132Added `spdk_bdev_seek_data`, `spdk_bdev_seek_hole` and `spdk_bdev_io_get_seek_offset` functions 133that start from a given offset and seek for next data or for next hole. At this time only 134supported by lvol bdev module. 135 136A new parameter `io_drain_timeout` has been added to `spdk_bdev` structure. It controls how long 137a bdev reset must wait for IO to complete prior to issuing a reset to the underlying device. 138If there is no outstanding IO at the end of that period, the reset is skipped. 139Best defined for bdevs that share an underlying bdev, such as multiple lvol bdevs sharing 140an nvme device, to avoid unnecessarily resetting the underlying bdev and affecting other 141bdevs that are sharing it. 142Modifying this field is optional. Setting the value to 0 keeps the original behavior 143to always send resets immediately, even if there is no I/O outstanding. 144 145### blobstore 146 147Reserve space for `used_clusters` bitmap. The reserved space could be used for blobstore growing 148in the future. 149 150Added `is_zeroes` operation to `spdk_bs_dev`. It allows to detect if logical blocks are backed 151by zeroes device and do a shortcut in copy-on-write flow by excluding copy part from zeroes device. 152 153Added `spdk_blob_get_next_allocated_io_unit` and `spdk_blob_get_next_unallocated_io_unit` functions 154that start from a given offset and seek for first io_unit belonging to an allocated cluster 155or first io_unit belonging to an unallocated cluster. 156 157Added `spdk_bs_grow` function to grow blobstore size if the underlying bdev size is increased. 158This is used by lvol bdev via `bdev_lvol_grow_lvstore` RPC. 159 160### daos 161 162Added new DAOS bdev module, that creates SPDK block device on top of DAOS DFS. 163Please see [documentation](https://spdk.io/doc/bdev.html#bdev_config_daos) for more details. 164 165### env 166 167Added `spdk_pci_register_device_provider` and matching `SPDK_PCI_REGISTER_DEVICE_PROVIDER` 168functions for registering PCI device providers. That allow the VMD driver to be notified 169when users want to attach a device under a given BDF and when a device is detached. 170 171### init 172 173`spdk_subsystem_init_from_json_config` now fails if the JSON configuration file is not 174an object with an array named "subsystems". 175 176### iscsi 177 178Added `bdev_iscsi_set_options` RPC to modify options of the iSCSI bdev module. 179 180### json 181 182Added `spdk_json_find` API return errcode: EPROTOTYPE - json not enclosed in {}. 183`spdk_json_find` now returns -EPROTOTYPE instead of -ENOENT if the object parameter 184does not point to a JSON object (i.e. is not enclosed with {}). 185 186### lvol 187 188Add `num_md_pages_per_cluster_ratio` parameter to the `bdev_lvol_create_lvstore` RPC. 189Calculate `num_md_pages` from `num_md_pages_per_cluster_ratio`, and pass it to `spdk_bs_opts`. 190 191### nvme 192 193Added SPDK_NVME_TRANSPORT_CUSTOM_FABRICS to enum `spdk_nvme_transport_type` to support custom 194fabric transport. SPDK_NVME_TRANSPORT_CUSTOM was intended to be non-fabric custom transport. 195 196Added a new function `spdk_nvme_ns_cmd_verify` to submit a Verify Command to a Namespace. 197 198Added `spdk_nvme_ctrlr_disable_read_changed_ns_list_log_page` to allow an application to 199tell the driver to not read the CHANGED_NS_LIST log page in response to a NS_ATTR_CHANGED 200AEN. When called the application is required to read this log page instead to clear the 201AEN. 202 203Added `psk` field to `spdk_nvme_ctrlr_opts` struct in order to enable SSL socket implementation 204of TCP connection and set the PSK. Applicable for TCP transport only. 205 206### raid 207 208Renamed the `raid5` module to `raid5f` to reflect that it is not a traditional 209RAID5 implementation - only full stripe writes are supported, partial stripe 210writes (read-modify-write) are not. 211 212### rpc 213 214Added `psk` parameter to `bdev_nvme_attach_controller` RPC in order to enable SSL socket implementation 215of TCP connection and set the PSK. Applicable for TCP transport only. 216 217New options `enable_ktls` and `tls_version` were added to the `sock_impl_set_options` structure. 218New options `psk_key` and `psk_identity` were added to the `sock_impl_set_options` structure. 219 220Added warning message for `bdev_rbd_create`, if it is used without -c. 221`bdev_rbd_create()` API without specifying -c is deprecated and will be removed in future release. 222 223Renamed `enable_vmd` RPC to `vmd_enable` to make it consistent with our naming scheme of 224`<subsystem>_<action>`. For now, the old name is still available, but is marked as deprecated. 225 226New function `spdk_rpc_get_method_state_mask` was added to RPC library. 227 228### sma 229 230Extended `VolumeParameters` with crypto parameters allowing the user to configure crypto when 231attaching a volume to a device. This interface is now supported by all upstream device types 232(nvmf-tcp, virtio-blk, vfio-user) using `bdev_crypto`. Users must specify the crypto engine to use 233under `crypto` section in config. It is also possible to register out-of-tree crypto engines by 234inheriting from the `CryptoEngine` class. 235 236Added two new methods: `SetQos` and `GetQosCapabilities` allowing the user to configure QoS on a 237per-device or per-volume level. Not all QoS settings have to be supported by each device, so users 238can use `GetQosCapabilities` to query them for that. All upstream device types support QoS on a 239per-volume level using bdev layer's QoS mechanism. 240 241### sock 242 243Added new `ssl` based socket implementation, the code is located in `module/sock/posix`. 244For now we are using hard-coded PSK and only support TLS 1.3. 245 246### util 247 248Added new functions: `spdk_hexlify` and `spdk_unhexlify`. 249 250A new API `spdk_xor_gen` was added to generate XOR from multiple source buffers. It is going to be 251used by `raid5f` for calculating parity. 252 253### vfu_tgt 254 255Added vfu_tgt library abstraction based on libvfio-user for PCI device emulation. 256Besides the NVMe device emulation, its now possible to emulate virtio-blk and virtio-scsi 257devices. 258 259### virtio 260 261virtio-vhost-user no longer tries to support dynamic memory allocation. The vhost target does 262not support the high rate of SET_MEM_TABLE vhost messages that result from dynamic memory 263allocation, so a virtio-vhost-user device will now present an ERRLOG, assert, and skip the 264SET_MEM_TABLE vhost message if a memory notification is received outside of the normal device 265start/stop. Applications using the virtio library in vhost-user mode should now pre-allocate 266the application's memory using the -s/--mem-size option and use single shared memory file 267segments using the -g/--single-file-segments option. 268 269Added `vfio-user` transport type for virtio-blk and virtio-scsi devices. 270 271### vmd 272 273Fixed hotplug when a device is inserted in a slot in which a disk was already enumerated previously. 274Added two new RPCs: `vmd_remove_device` simulating a hotremove, and `vmd_rescan`, which rescans all 275buses managed by the VMD driver and hotplugs all newfound devices. 276 277## v22.05 278 279### sock 280 281A new option `ack_timeout` was added to the `spdk_sock_opts` structure. 282 283### util 284 285A new parameter `bounce_iovcnt` was added to `spdk_dif_generate_copy` and `spdk_dif_verify_copy`. 286The `bounce_iovcnt` is used to specify the number of bounce_iov to support multiple block-aligned 287fragment copies. 288 289A new API `spdk_copy_iovs_to_buf` and `spdk_copy_buf_to_iovs` were added to copy iovs to buf or 290copy buf to iovs. There're many cases need to use these two APIs. 291 292### bdev 293 294Removed deprecated spdk_bdev_module_finish_done(). Use spdk_bdev_module_fini_done() instead. 295 296A new API `spdk_bdev_unregister_by_name` was added to handle race conditions correctly. 297 298New APIs, `spdk_for_each_bdev` and `spdk_for_each_bdev_leaf`, were added to provide iteration 299safe for race conditions. 300 301A new RPC `bdev_nvme_get_io_paths` was added to get all active I/O paths. 302 303A new RPC `bdev_nvme_set_preferred_path` was added to set preferred I/O path for an NVMe bdev 304when in multipath mode. This RPC does not support NVMe bdevs in failover mode. 305 306A new RPC `bdev_nvme_set_multipath_policy` was added to set multipath policy of a NVMe bdev 307in multipath mode. 308 309A new option `disable_auto_failback` was added to the `bdev_nvme_set_options` RPC to disable 310automatic failback. 311 312### idxd / dsa 313 314A new parameter `flags` was added to all low level submission and preparation 315APIs to enable the caller to pass operation flags per the DSA specification. 316 317A new flag 'SPDK_IDXD_FLAG_PERSISTENT' was added to let DSA know that 318the destination is persistent. 319 320The RPC `idxd_scan_accel_engine` has been renamed to `dsa_scan_accel_engine` 321 322The RPC `iaa_scan_accel_engine` has been added. 323 324Many HW related structs/functions with the name `idxd` have been renamed `dsa` 325to more accurately represent the HW they are associated with. 326 327Two new functions were added to the library `spdk_idxd_submit_compress` and 328`spdk_idxd_submit_decompress` 329 330### accel_fw 331 332A new parameter `flags` was added to accel API. 333The APIs include: 334`spdk_accel_submit_copy` 335`spdk_accel_submit_dualcast` 336`spdk_accel_submit_fill` 337`spdk_accel_submit_copy_crc32c` 338`spdk_accel_submit_copy_crc32cv` 339`spdk_accel_submit_compress` 340`spdk_accel_submit_decompress` 341 342A new flag `ACCEL_FLAG_PERSISTENT` was added to indicate the target memory is PMEM. 343 344The API `spdk_accel_get_capabilities` has been removed. 345 346### crypto 347 348Support for AES_XTS was added for MLX5 polled mode driver (pmd). 349 350bdev_crypto_create RPC now requires hexlified 'key' and 'key2' params for all pmd drivers. 351Unhexlifying is performed during RPC command processing and the vbdev crypto module runs on 352binary keys as before. 353 354### bdev 355 356Added a timeout option to the `bdev_get_bdevs` RPC. It allows the user to specify the amount of 357time to wait until a bdev with a given name appears in the system. 358 359### bdev_nvme 360 361Added `bdev_nvme_add_error_injection` and `bdev_nvme_remove_error_injection` RPCs to add and 362remove NVMe error injections. 363 364New parameters, `ctrlr_loss_timeout_sec`, `reconnect_delay_sec`, and `fast_io_fail_timeout_sec`, are 365added to the RPC `bdev_nvme_set_options`. They can be overridden if they are given by the RPC 366`bdev_nvme_attach_controller`. 367 368### blobstore 369 370New functions `spdk_blob_io_writev_ext` and `spdk_blob_io_readv_ext` are added. The new functions accept 371`spdk_blob_ext_io_opts` structure with extended IO request options. 372 373### event 374 375Added `msg_mempool_size` parameter to `spdk_reactors_init` and `spdk_thread_lib_init_ext`. 376The size of `g_spdk_msg_mempool` can now be controlled through the same-named 377user option of `spdk_app_opts` structure. 378 379### nvme 380 381The API `spdk_nvme_ctrlr_prepare_for_reset()` was deprecated. The functionality provided by the 382`spdk_nvme_ctrlr_prepare_for_reset()` was merged into the API `spdk_nvme_ctrlr_disconnect()`. 383 384### nvmf 385 386Removed deprecated max_qpairs_per_ctrlr parameter from nvmf_create_transport RPC. Use 387max_io_qpairs_per_ctrlr instead. 388 389Deprecated the ability for hosts to connect to the discovery subsystem automatically on any 390existing listener. Users should now explicitly add listeners for the discovery subsystem. 391Host can still connect to the discovery subsystem as before, but a warning message will be 392emitted if no listener was configured for the transport ID of the incoming connection. 393 394Added adaptive interrupt feature for vfio-user transport. New parameter `disable_adaptive_irq` 395is added to the RPC `nvmf_create_transport`. 396 397### thread 398 399Added `spdk_thread_exec_msg()` API. 400 401### scheduler 402 403`framework_set_scheduler` can now be called after application initialization. 404Added callbacks to set custom parameters specific for each scheduler implementation 405and `framework_get_scheduler` to retrieve them. 406 407Added `dynamic` scheduler options: load_limit, core_limit, core_busy. Their descriptions 408are available in JSON-RPC document, in section 409[framework_set_scheduler](jsonrpc.html#rpc_framework_set_scheduler). 410 411### raid 412 413Add concat as a special raid module. The concat module could create a virtual bdev. The 414virtual bdev combines multiple underlying bdevs together. The layout of the underlying 415bdevs is one after another. The concat bdev is extendable. When the free space of the 416concat bdev is not enough, the user can deconstruct the concat bdev, then reconstruct it 417with an additional underlying bdev. 418 419### sock 420 421Allow MSG_ZEROCOPY flag to be set or not according to data size, which can be enabled and 422set by setting "zerocopy_threshold". zerocopy_threshold = 0 means disable this function; 423zerocopy_threshold > 0 means enable it and use this value as the threshold. 424 425### rpc 426 427Introduced `zerocopy_threshold` to enable zerocopy on send for server sockets according to 428data size to be flushed. 429 430## v22.01 431 432### accel 433 434The batching capability was removed. Batching is now considered an implementation 435detail of the low level drivers. 436 437### bdev 438 439The NVMe bdev module supports multipath and improved I/O error resiliency. 440 441The parameter `retry_count` of the RPC `bdev_nvme_set_options` was deprecated and will be 442removed in SPDK 22.04, and the parameter `transport_retry_count` is added and used instead. 443 444An new parameter `bdev_retry_count` is added to the RPC `bdev_nvme_set_options`. 445 446New parameters, `ctrlr_loss_timeout_sec`, `reconnect_delay_sec`, and `fast_io_fail_timeout_sec`, are 447added to the RPC `bdev_nvme_attach_controller`. 448 449An new parameter `num_io_queues` is added to `bdev_nvme_attach_controller` RPC to allow specifying amount 450of requested IO queues. 451 452Added `key_file` parameter to the `rbd_register_cluster` RPC. It is an optional parameter to 453specify a keyring file to connect to a RADOS cluster. 454 455Added `spdk_bdev_get_zone_id` API to retrieve zone_id for a certain LBA. 456 457### bdev_aio 458 459Added `bdev_aio_rescan` RPC to allow rescanning the size of aio bdev. 460 461### bdev_nvme 462 463Added discovery service to bdev_nvme module, which now can connect to a discovery controller. 464bdev_nvme will connect to all current and future subsystems in the discovery controller. 465Added `bdev_nvme_start_discovery` and `bdev_nvme_stop_discovery` RPC. 466 467### dpdk 468 469Updated DPDK submodule to DPDK 21.11. 470 471### env 472 473Added `spdk_pci_for_each_device`. 474 475Removed `spdk_pci_get_first_device` and `spdk_pci_get_next_device`. These APIs were unsafe, because 476they did not account for PCI devices being inserted or removed while the caller was using handles 477returned from these APIs. Existing users of these APIs should switch to `spdk_pci_for_each_device` 478instead. 479 480Added 3 experimental APIs to handle PCI device interrupts (`spdk_pci_device_enable_interrupt`, 481`spdk_pci_device_disable_interrupt`, `spdk_pci_device_get_interrupt_efd`). 482 483Added `framework_get_pci_devices` RPC to list PCIe devices attached to an SPDK application. 484 485### idxd 486 487Many APIs are now vectored rather than scalar, meaning they take iovecs instead of individual pointers. 488 489### json 490 491Added `spdk_json_write_bytearray` API to serialize a buffer as a hex string. 492 493### nvme 494 495API `spdk_nvme_trtype_is_fabrics` was added to return existing transport type 496is fabric or not. 497 498API `spdk_nvme_poll_group_remove` was limited to be available only for a 499disconnected qpair in the group. 500 501New APIs, `spdk_nvme_ctrlr_disconnect`, `spdk_nvme_ctrlr_reconnect_async`, and 502`spdk_nvme_ctrlr_reconnect_poll_async`, have been added to improve error recovery, and 503the existing APIs,`spdk_nvme_ctrlr_reset_async` and `spdk_nvme_ctrlr_reset_poll_async` 504were deprecated. 505 506Added `spdk_nvme_ctrlr_get_discovery_log_page` API for getting the full discovery log page 507from a discovery controller. 508 509### nvmf 510 511Added support for zero-copy operations in the NVMe-oF TCP target. It can be enabled via 512the `zcopy` parameter when creating a transport. The zero-copy operations are only used 513for requests not using in-capsule data. 514 515Added a `subsystem` parameter to `spdk_nvmf_transport_stop_listen_async`. When not NULL, 516it will only disconnect qpairs for controllers associated with the specified subsystem. 517 518Removed accept poller from transport layer. Each transport can have its own policy of 519handling new connections. To notify transport layer `spdk_nvmf_poll_group_add` and 520`spdk_nvmf_tgt_new_qpair` can be used. 521 522### scsi 523 524Structure `spdk_scsi_lun` has been extended with new member `resizing` so that SCSI layer now reports 525unit attention for disk resize. 526 527### trace 528 529Added `spdk_trace_create_tpoint_group_mask` to return tracepoint group mask from 530a tracepoint group name. 531 532Added `trace_set_tpoint_mask` and `trace_clear_tpoint_mask` RPC to allow enabling 533individual traces. 534 535### util 536 537Added `spdk_ioviter_first` and `spdk_ioviter_next` to iterate over two iovecs and 538yield pointers to common length segments. 539 540### sock 541 542A new parameter `hint` is added to `spdk_sock_get_optimal_sock_group`. It allows to suggest 543a poll group when no optimal poll group is found. 544 545## v21.10 546 547Structure `spdk_nvmf_target_opts` has been extended with new member `discovery_filter` which allows to specify 548filtering rules applied during discovery log generation. Refer to `enum spdk_nvmf_tgt_discovery_filter` for more info. 549 550### bdev 551 552New API `spdk_bdev_get_memory_domains` has been added, it allows to get SPDK memory domains used by bdev. 553 554New API functions `spdk_bdev_readv_blocks_ext` and `spdk_bdev_writev_blocks_ext` have been added. 555These functions accept `spdk_bdev_ext_io_opts` structure with extended IO request 556options, e.g. DMA memory domain which describes data that may belong to another memory domain and 557can't be accessed directly. 558 559Added `async_fini_start` to allow bdev modules to complete the `fini_start` asynchronously, 560with new `spdk_bdev_module_fini_start_done` API. 561 562Deprecated `spdk_bdev_module_finish_done()` API, which will be removed in SPDK 22.01. 563Bdev modules should use `spdk_bdev_module_fini_done()` instead. 564 565The `ocssd` bdev has been removed. The Open Channel specification has been largely superseded by 566zoned namespaces, few if any devices have been brought to market, and there is little reason to 567continue to support this. OCSSD support in the nvme driver will remain for now. 568 569### dma 570 571A new library, lib/dma, has been added. This library provides the necessary infrastructure for 572handling systems and devices with multiple memory domains. For example, a PCIe add-in card with an 573SoC may be running SPDK on the SoC. That SoC has its own local memory, but SPDK may be controlling 574devices that can also access the host system memory. This library provides infrastructure to enumerate 575the memory domains and request hardware perform DMA transfers between them. 576 577### dpdk 578 579Updated DPDK submodule to DPDK 21.08. 580 581### event 582 583Added the `disable_signal_handlers` flag to the `spdk_app_opts` struct. 584 585### idxd 586 587Added `spdk_idxd_get_socket` to query the socket that the idxd device 588is on. 589 590### json 591 592Added API to allow for writing and decoding of new types: 593 594- `spdk_json_write_named_uint16` 595- `spdk_json_write_named_uint8` 596- `spdk_json_write_uint16` 597- `spdk_json_write_uint8` 598- `spdk_json_number_to_uint8` 599- `spdk_json_decode_uint8` 600 601### log 602 603Added API `spdk_log_to_syslog_level` to return syslog level based on SPDK's 604log level. 605 606### nvme 607 608Added new functions `spdk_nvme_zns_set_zone_desc_ext` and `spdk_nvme_zns_ext_report_zones` 609to set zone descriptor extension and to get extended zone report respectively. 610 611New API `spdk_nvme_ctrlr_get_memory_domains` has been added, it allows to get SPDK memory domains used by nvme controller. 612 613New API functions `spdk_nvme_ns_cmd_readv_ext` and `spdk_nvme_ns_cmd_writev_ext` 614have been added. These functions accept `spdk_nvme_ns_cmd_ext_io_opts` structure with extended IO request 615options, e.g. DMA memory domain which describes data that may belong to another memory domain and 616can't be accessed directly. 617 618Added a new function `spdk_nvme_ctrlr_get_regs_bpinfo` to get boot partition info of a controller. 619Added new functions `spdk_nvme_ctrlr_write_boot_partition`, 620`spdk_nvme_ctrlr_read_boot_partition_start` and `spdk_nvme_ctrlr_read_boot_partition_poll` 621to write and read the boot partitions of a controller. 622 623Added `spdk_nvme_ctrlr_get_opts` to retrieve the current controller options. 624 625Added `async_mode` to `spdk_nvme_io_qpair_opts` to enable creation of submission and completion 626queues asynchronously. This mode is currently supported at PCIe layer, 627which tracks the qpair creation with state machine and returns to the user immediately. 628Default mode is set to false to create io qpairs synchronously. 629 630Added `spdk_nvme_ctrlr_get_regs_cc` to retrieve NVMe controller CC (Configuration) register. 631 632Added `spdk_nvme_ctrlr_prepare_for_reset` to inform the driver that the application is preparing 633to reset the specified NVMe controller. This function allows the driver to make decisions 634knowing that a reset is about to happen. 635 636### nvmf 637 638Added `oncs` to `struct spdk_nvmf_ctrlr_data` so that the transport layer 639can decide support RESERVATION feature or not. 640 641An `opts_size` element was added in the `spdk_nvmf_ns_opts` structure to solve the 642ABI compatibility issue between different SPDK version. An new option `anagrpid` was 643added in the `spdk_nvmf_ns_opts` structure. 644 645An new parameter `anagrpid` was added to the RPC `nvmf_subsystem_add_ns`. 646 647An new parameter `anagrpid` was added to the RPC `nvmf_subsystem_listener_set_ana_state`. 648 649`spdk_nvmf_subsystem_destroy` is now can be asynchronous, it accepts a callback and callback argument. 650 651A new parameter, `poll_groups_mask` was added to the `nvmf_set_config` RPC that allows specifying 652a subset of cores for the nvmf poll groups. This helps to avoid imbalances when some cores are 653busy with periodic timer tasks that run very frequently. 654 655A new parameter, `commit` was added to `nvmf_bdev_ctrlr_end_zcopy` that allows indicating whether 656the buffers should be committed. 657 658Added `listen_dump_opts` to `spdk_nvmf_transport_ops` so that the transport layer can display 659listen opts. 660 661Added `fabrics_connect_timeout_us` to `bdev_nvme_attach_controller` RPC to allow specifying 662timeout for connect operation. 663 664Added `multipath` to `bdev_nvme_attach_controller` RPC to allow specifying multipath behavior. 665 666### scheduler 667 668New API for implementing schedulers and governors. Please see `include/spdk/scheduler.h` for details. 669 670### scsi 671 672New functions, `spdk_scsi_dev_get_first_lun` and `spdk_scsi_dev_get_next_lun` 673have been added to iterate LUNs of a SCSI device. 674 675Each SCSI device supports 256 LUNs at the maximum now and the macro constant 676`SPDK_SCSI_DEV_MAX_LUN` was removed. 677 678### trace_parser 679 680A new library, lib/trace_parser, has been added. This library provides functions that parse traces 681recorded by an SPDK application. That includes merging traces from multiple cores, 682sorting them by their timestamp and constructing trace entries spanning across multiple buffers. 683 684### util 685 686The `spdk_fd_group_add` API now takes a `name` parameter. 687 688## v21.07 689 690### accel_fw 691 692Added API `spdk_accel_submit_copy_crc32c` to perform a CRC32C while copying data. 693 694Added API `spdk_accel_batch_prep_copy_crc32c` to batch CRC32C + copy commands. 695 696Added API `spdk_accel_submit_copy_crc32cv` to submit chained CRC32C + copy commands. 697 698### bdev 699 700Change `spdk_bdev_read_blocks_with_md` arg offset definition from int64_t to uint64_t. 701 702Red-black tree has been used to organize the bdev names and aliases uniformly 703to provide faster lookup. 704 705Removed ZCOPY emulation: The bdev module can be checked to see if it supports ZCOPY 706and if not supported then use existing READ/WRITE commands. 707 708Added iov to spdk_bdev_zcopy_start. 709 710### dpdk 711 712Updated DPDK submodule to DPDK 21.05. 713 714### idxd 715 716Remove the `probe_cb` parameter in `spdk_idxd_probe` function. And remove the definition 717of `spdk_idxd_probe_cb` function pointer. It should be implemented in idxd_user.c. 718 719Added API `spdk_idxd_submit_copy_crc32c` to perform a CRC32C while copying data. 720 721Added API `spdk_idxd_batch_prep_copy_crc32c` to prepare a batch operation to perform 722a CRC32C while copying data. 723 724We have userspace idxd driver under accel_engine library (module/accel/idxd/accel_engine). 725And kernel idxd driver usage is also added under the accel_engine library. This approach 726implemented a wrapper library to use IDXD device by leveraging the kernel DSA driver in 727SPDK idxd library (lib/idxd). Then users can leverage the RPC later to configure how to 728use the DSA device by user space driver or kernel driver. 729 730### init 731 732Added new `init` library that initializes the SPDK subsystems, which previously was 733internal to application framework. That functionality has been made public and for 734use by applications which don't leverage SPDK's application framework. 735 736### iscsi 737 738New parameters, `pdu_pool_size`, `immediate_data_pool_size`, and `data_out_pool_size`, 739were added to the RPC `iscsi_set_options` to run iSCSI target with varying amount of 740available memory. 741 742### json 743 744Added API `spdk_json_write_named_uint128` and `spdk_json_write_uint128` to perform 745the uint128 related data. 746 747### net 748 749Removed deprecated `net` library. 750 751Added support for ZCOPY. ZCOPY is used in preference to READ and WRITE if the 752bdev module supports ZCOPY and the bdev module has ZCOPY enabled. 753 754### nvme 755 756`spdk_nvme_map_prps` and `spdk_nvme_map_cmd` were moved to nvmf/vfio-user as internal APIs 757as vfio-user is the only user for the above two APIs. 758 759Added a new function `spdk_nvme_ns_cmd_copy` to submit a Simple Copy Command to a Namespace. 760 761Update the `spdk_nvme_generic_command_status_code` structure with new status code 762according to the definition in NVMe 1.4 spec. 763 764`spdk_nvme_ctrlr_get_default_ctrlr_opts` now sets `use_cmb_sqs` to false. This means 765that if a controller has a CMB and supports SQs in the CMB, SPDK will not use 766the CMB for SQs by default - the user must set `use_cmb_sqs` to true in 767the `spdk_nvme_ctrlr_opts` structure prior to controller attach. 768 769Add a new function `spdk_nvme_detach_poll` to simplify a common use case to continue 770polling until all detachments complete. 771 772Added new argument `timeout_admin_us` to `spdk_nvme_ctrlr_register_timeout_callback` so callers 773can specify a different timeout for admin commands vs. io commands. 774 775An existing function `spdk_nvme_detach_async` was updated to add one or more detachments 776to an active context while it is being polled. 777 778Rename a variable in the member `cmic` of the struct `spdk_nvme_ctrlr_data` from 779`multi_host` to `multi_ctrlr`. The variable means that the NVM subsystem may have two or 780more controllers if set to 1. However `multi_host` had indicated a particular use case 781such that the NVM subsystem is used by multiple hosts. 782 783A new option `disable_read_ana_log_page` was added to struct `spdk_nvme_ctrlr_opts` to disable 784reading ANA log page. The upper layer is expected to read ANA log page instead if `true`. 785The default value is `false`. 786 787New APIs, `spdk_nvme_ctrlr_reset_async` and `spdk_nvme_ctrlr_reset_poll_async`, have been added to 788reset a controller asynchronously. 789 790New RPC `bdev_nvme_reset_controller` was added, to reset an NVMe controller. 791 792Added `spdk_nvme_ns_get_nguid` function to get NGUID for the given namespace. 793 794Added `spdk_nvme_ctrlr_is_fabrics` function to indicate whether a ctrlr handle 795is associated with a fabrics controller. 796 797### nvmf 798 799Added `min_cntlid` and `max_cntlid` to `nvmf_create_subsystem` to limit the controller ID range. 800Added `spdk_nvmf_subsystem_get_min_cntlid` and `spdk_nvmf_subsystem_get_max_cntlid` to request those values. 801 802`spdk_nvmf_request_get_buffers_multi` API is removed. 803 804Added the `nvmf_set_crdt` RPC for setting command retry delay times. 805 806Expanded `spdk_nvmf_poll_group_stat` with current qpair count statistics. 807 808Removed following deprecated APIs: 809 810- `spdk_nvmf_poll_group_get_stat` (function in `nvmf.h`), 811- `spdk_nvmf_transport_poll_group_get_stat` (function in `nvmf.h`), 812- `spdk_nvmf_transport_poll_group_free_stat`(function in `nvmf.h`), 813- `spdk_nvmf_rdma_device_stat` (struct in `nvmf.h`), 814- `spdk_nvmf_transport_poll_group_stat` (struct in `nvmf.h`), 815- `poll_group_get_stat` (transport op in `nvmf_transport.h`), 816- `poll_group_free_stat` (transport op in `nvmf_transport.h`). 817 818### rpc 819 820New RPC `bdev_rbd_register_cluster` and `bdev_rbd_unregister_cluster` was added, it allows to create 821and delete the rados object cluster, then users can choose the cluster to create related rbd 822device. 823 824Revised `bdev_rbd_create` parameter, it allows to use an optional parameter `--cluster-name` 825to create a rbd bdev with an already registered Rados Cluster Object. 826 827New RPC `bdev_rbd_get_clusters_info` was added, it allows to get the info of the registered 828Rados Cluster names. 829 830New optional parameter, `timeout_admin_us`, added to the bdev_nvme_set_options RPC. 831 832Revised a parameter `--stripe-size_kb` to `--stripe-size-kb` of `bdev_raid_create` method 833provided in `scripts/rpc.py` for consistency. 834 835An new optional parameter `config_kernel_mode` was added to the RPC `idxd_scan_accel_engine`, 836and this is used to enable using the kernel mode IDXD driver. 837 838Removed deprecated parameter `enable-zerocopy-send` of RPC `sock_impl_set_options`, 839use `enable-zerocopy-send-server` or `enable-zerocopy-send-client` instead. 840Removed deprecated parameter `disable-zerocopy-send` of RPC `sock_impl_set_options`, 841use `disable-zerocopy-send-server` or `disable-zerocopy-send-client` instead. 842 843### rpm 844 845Removed deprecated `pkg/spdk.spec`, please use `rpmbuild/spdk.spec` instead. 846See [RPM documentation](https://spdk.io/doc/rpm.html) for more details. 847 848### thread 849 850Red-black tree has been used for timed pollers to provide faster insertion and deletion 851and for io_devices to provide faster lookup. 852 853Removed `spdk_io_channel` structure from public header and moved it to thread_internal.h. 854 855### trace 856 857Added `spdk_trace_register_description_ext` function to register variable number of tracepoint arguments. 858 859Added ability to chain multiple trace entries together to extend the size of the argument buffer. 860 861### util 862 863Red-black tree macros has been added by using the macros provided by the FreeBSD operating system 864under the same BSD license. 865 866Add an new macro `SPDK_SIZEOF_MEMBER` to get the size of a member of a struct. 867 868`spdk_crc32c_iov_update` function was added to support calculating the crc32c of the iovs. 869 870Added zipf random number generator with power law probability distribution. 871When applied to performance testing of block devices, it will select blocks over 872the full range of LBAs, but will more frequently select lower-numbered LBAs. 873 874## v21.04 875 876### accel 877 878Two new accelerated crc32 functions `spdk_accel_submit_crc32cv` and 879`spdk_accel_batch_prep_crc32cv` are added in order to provide the 880chained accelerated CRC32 computation support. 881 882### bdev 883 884For `bdev_ocssd_create` RPC, the optional parameter `range` was removed. 885Only one OCSSD bdev can be created for one OCSSD namespace. 886 887Removed the `spdk_bdev_open` from bdev library API. 888Removed the `spdk_vbdev_register` and `spdk_bdev_part_base_construct` from bdev module API. 889Removed the `config_text` function for bdev modules to report legacy config. 890 891Added `spdk_bdev_get_max_active_zones` API to display maximum number active zones of a given bdev. 892 893Added `spdk_bdev_get_max_zone_append_size` API to display maximum zone append data transfer size. 894 895### bdev_nvme 896 897Added support for zoned namespaces. 898 899### blobstore 900 901Removed the `spdk_bdev_create_bs_dev_from_desc` and `spdk_bdev_create_bs_dev` API. 902 903### env 904 905Added `spdk_pci_device_allow` API to allow applications to add PCI addresses to 906the allowed list after the application has started. 907 908Removed the `pci_whitelist`, `pci_blacklist` and `master_core` members of struct `spdk_env_opts`. 909 910Added hotplug support based on uevent in `pci_event.c`. Added usage of this functionality in 911nvme, virtio-scsi and virtio_blk libraries. Please see the new API `spdk_pci_event_listen`, 912`spdk_pci_get_event`, `spdk_pci_register_error_handler` and `spdk_pci_unregister_error_handler`. 913 914### event 915 916Removed the `config_file`, `max_delay_us`, `pci_whitelist` 917and `pci_blacklist` members of struct `spdk_app_opts`. 918 919### idxd 920 921A new API `spdk_idxd_device_needs_rebalance` was added so that users of the library 922can know whether they need to rebalance the flow control for the channel 923that was just added/removed. This is based on how the low level library 924shares devices amongst channels. 925 926The API `spdk_idxd_reconfigure_chan` had the `num_channels` removed as this 927is now tracked in the library. The app makes use the new API above to 928determine whether to rebalance or not. This applies to `spdk_idxd_configure_chan` 929as well. 930 931The API `spdk_idxd_put_channel` now returns the rebalance state for the 932underlying device. 933 934### iscsi 935 936A security vulnerability has been identified and fixed in the SPDK iSCSI target. 937A TEXT PDU with no data, but CONTINUE flag set, would result in a NULL pointer dereference 938and crash the SPDK iSCSI target process. All users of the SPDK iSCSI target 939are recommended to update. All SPDK versions <= v21.01 are affected. 940 941### net 942 943The net library is deprecated and will be removed in the 21.07 release. 944 945### nvme 946 947Added a new function `spdk_nvme_ctrlr_get_regs_pmrcap` to get the PMR capabilities. 948 949Added an accelerated table pointer in `spdk_nvme_poll_group` 950which can be used to provide the accelerated functions by users with 951hardware engine, such as crc32c accelerated function. 952 953Added new functions `spdk_nvme_ctrlr_get_pmrsz`, `spdk_nvme_ctrlr_enable_pmr`, 954`spdk_nvme_ctrlr_disable_pmr`, `spdk_nvme_ctrlr_map_pmr` and `spdk_nvme_ctrlr_unmap_pmr`. 955 956Added NVMe transport operations to enable, disable, map and unmap the PMR. 957 958Added `spdk_nvme_qpair_get_optimal_poll_group` function and `qpair_get_optimal_poll_group` 959function pointer in spdk_nvmf_transport_ops structure in order to add the qpair to the most 960suitable polling group. 961 962Added OPTPERF and namespace optimal performance fields to nvme_spec.h. 963 964Added `spdk_nvme_set_hotplug_filter` API to allow applications to choose which 965hot-inserted SSDs should be probed. This is useful for use cases where multiple 966independent SPDK processes are running on one node. The filter function can 967then be implemented in these processes to decide which SSDs to probe based on 968the new SSD's PCI address. 969 970New functions `spdk_nvme_poll_group_get_stats` and `spdk_nvme_poll_group_free_stats` 971were added. These functions allow to get transport statistics per NVME poll group. 972 973Added `spdk_nvme_map_cmd` API to map the NVMe command with SGL cases. 974 975Added support for vector variant of ZNS zone append commands with new API 976`spdk_nvme_zns_zone_appendv` and `spdk_nvme_zns_zone_appendv_with_md`. 977 978Added `spdk_nvme_zns_ns_get_max_open_zones` and `spdk_nvme_zns_ns_get_max_active_zones` API, 979to display maximum number of open and active zones of the given namespace. 980 981Added `spdk_nvme_zns_ns_get_zone_size_sectors` API to provide size of zone in number of 982sectors. 983 984Added `spdk_nvme_qpair_get_id` API to display the ID of the specified qpair. 985 986### nvmf 987 988Removed the `spdk_nvmf_tgt_listen` and `spdk_nvmf_subsystem_add_ns` API. 989 990Added new APIs: 991 992- `spdk_nvmf_poll_group_dump_stat` (function in `nvmf.h`). 993- `poll_group_dump_stat` (transport op in `nvmf_transport.h`). 994 995The following APIs have been deprecated and will be removed in SPDK 21.07: 996 997- `spdk_nvmf_poll_group_get_stat` (function in `nvmf.h`), 998- `spdk_nvmf_transport_poll_group_get_stat` (function in `nvmf.h`), 999- `spdk_nvmf_transport_poll_group_free_stat`(function in `nvmf.h`), 1000- `spdk_nvmf_rdma_device_stat` (struct in `nvmf.h`), 1001- `spdk_nvmf_transport_poll_group_stat` (struct in `nvmf.h`), 1002- `poll_group_get_stat` (transport op in `nvmf_transport.h`), 1003- `poll_group_free_stat` (transport op in `nvmf_transport.h`). 1004 1005See header files for details. 1006 1007The `trtype` field in JSON returned by `nvmf_get_stats` RPC contains now the name of the transport, 1008which is the same as the type for defined transports and more informative for a custom transport. 1009 1010Added `hdgst` and `ddgst` parameters to `bdev_nvme_attach_controller` RPC in order change 1011state of TCP header and data digest. 1012 1013Added `num_cqe` parameter to `nvmf_create_transport` RPC to set number of completion queues (CQ) 1014for RDMA transport. Useful when CQ resize operation is not supported, for example iWARP. 1015 1016### ocf 1017 1018Updated OCF submodule to v20.12.2 1019 1020Added `bdev_ocf_set_cache_mode` RPC to dynamically switch cache mode of OCF bdev. 1021 1022### opal 1023 1024Removed the `spdk_opal_supported` API. 1025 1026### raid 1027 1028For `bdev_raid_create` RPC, the deprecated parameter `strip_size` was removed. 1029 1030### rpc 1031 1032New RPC `bdev_nvme_get_transport_statistics` was added, it allows to get transport statistics 1033of nvme poll groups. 1034 1035Parameter `enable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07, 1036use `enable-zerocopy-send-server` or `enable-zerocopy-send-client` instead. 1037Parameter `disable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07, 1038use `disable-zerocopy-send-server` or `disable-zerocopy-send-client` instead. 1039 1040Added cmd_parser.py used to parse the args from argparse. There are 1041two benefit to use command parser: 1042 1043- Simplify the definition of rpc method. It will reduce the rpc method code. 1044- Make the rpc call more versatile. User can add private args into rpc method. 1045 1046### rpm 1047 1048Added support for new RPM spec, rpmbuild/spdk.spec, which can be used for packaging the 1049SPDK. The pkg/spdk.spec is considered to be deprecated and scheduled for removal in SPDK 21.07. 1050See [RPM documentation](https://spdk.io/doc/rpm.html) for more details. 1051 1052### sock 1053 1054The type of `enable_placement_id` in struct `spdk_sock_impl_opts` is changed from 1055bool to int. We can use RPC to configure different value of `enable_placement_id`. 1056Then we can leverage SO_INCOMING_CPU to get placement_id, which aims to utilize 1057CPU cache locality, enabled by setting enable_placement_id=2. 1058 1059A new socket placement mode called PLACEMENT_MARK has been added. Some NICs allow 1060sockets to be marked using the SO_MARK socket option as a hint for which hardware 1061queue they should be associated with. This mode leverages that by setting the same 1062value for all sockets within a poll group. 1063 1064New parameters `enable_zerocopy_send_server` and `enable_zerocopy_send_client` were added 1065to struct spdk_sock_impl_opts, these parameters enable or disable zero copy send for server 1066and client sockets which are created using `spdk_sock_listen` and `spdk_sock_listen_ext` (server); 1067`spdk_sock_connect` and `spdk_sock_connect_ext` (client) functions. Existing parameter 1068`enable_zerocopy_send` enables or disables zero copy send for both server and client sockets. 1069 1070### thread 1071 1072A new API `spdk_io_channel_get_io_device` was added to get the io_device for the specified 1073I/O channel. 1074 1075Added `spdk_thread_set_interrupt_mode` function in order to set present spdk_thread into 1076interrupt mode or back to poll mode. It is valid only when thread interrupt facility is 1077enabled by `spdk_interrupt_mode_enable`. 1078 1079Added `spdk_poller_register_interrupt` function to mark that the poller is capable of 1080entering interrupt mode. Callback function will be called when the poller must transition 1081into or out of interrupt mode. 1082 1083### virtio 1084 1085Added the `bdev_virtio_blk_set_hotplug` RPC for the virtio blk pci device. 1086 1087## v21.01 1088 1089### bdev 1090 1091An `opts_size` element was added in the `spdk_bdev_opts` structure to solve the 1092ABI compatibility issue between different SPDK version. And also add `opts_size` 1093parameter in spdk_bdev_get_opts function. Two fields `small_buf_pool_size` and 1094`large_buf_pool_size` were added into spdk_bdev_opts, which were used to determine 1095the small and large buffer pool size of the whole bdev module. 1096 1097A new API `spdk_bdev_wait_for_examine` was added to allow for checking state of 1098examine process. Along with corresponding `bdev_wait_for_examine` RPC, which 1099is now always called during `spdk_bdev_subsystem_config_json` making sure 1100every bdev is ready to be used. 1101 1102A new API `spdk_bdev_io_get_aio_status` was added for getting the status of 1103bdev_io as Linux AIO errno. Also `spdk_bdev_io_complete_aio_status` function 1104and `SPDK_BDEV_IO_STATUS_AIO_ERROR` were added for bdev module to complete 1105a bdev_io with Linux AIO errno. 1106 1107A new API `spdk_bdev_get_module_name` was added for getting block device module name. 1108Also `spdk_bdev_get_module_ctx` was added to obtain a bdev module context for 1109the block device opened by the specified descriptor. 1110 1111Added `max_segment_size` and `max_num_segments` to `spdk_bdev` structure for 1112bdev modules to specify splitting requirements. 1113 1114### blob 1115 1116An `opts_size` element was added in the `spdk_bs_opts` structure to solve the 1117ABI compatibility issue between different SPDK version. And also add `opts_size` 1118parameter in `spdk_bs_opts_init` function. 1119 1120An `opts_size` element was added in the `spdk_blob_opts` structure to solve the 1121ABI compatibility issue between different SPDK version. And also add `opts_size` 1122parameter in `spdk_blob_opts_init` function. 1123 1124An `opts_size` element was added in the `spdk_blob_open_opts` structure to solve the 1125ABI compatibility issue between different SPDK version. And also add `opts_size` 1126parameter in `spdk_blob_open_opts_init` function. 1127 1128### build 1129 1130SPDK now generates pkg-config files to simplify the process of determining which 1131libraries must be linked into an SPDK application. 1132 1133### dpdk 1134 1135Updated DPDK submodule to DPDK 20.11. 1136 1137Removed `--with-igb-uio-driver` configure option. Since DPDK 20.11 igb_uio driver 1138was moved to separate dpdk-kmods repository. If required, users need to refer to 1139dpdk-kmods repository to build the driver. 1140 1141### env 1142 1143The `pci_whitelist`, `pci_blacklist` and `master_core` members of struct `spdk_env_opts` 1144have been deprecated. The new members are named `pci_allowed`, `pci_blocked` and 1145`main_core` respectively. 1146 1147An `opts_size` element was added in the `spdk_app_opts` structure 1148to solve the ABI compatibility issue between different SPDK version. An `opts_size` 1149parameter is added into `spdk_app_opts_init` function. 1150 1151### event 1152 1153The `pci_whitelist` and `pci_blacklist` members of struct `spdk_app_opts` have been 1154deprecated. The new members are named `pci_allowed` and `pci_blocked` respectively. 1155 1156The `--pci-blacklist` command line option has been deprecated, replaced with 1157`--pci-blocked`. 1158 1159The `--pci-whitelist/-W` command line options have been deprecated, replaced with 1160`--pci-allowed/-A`. 1161 1162Added new experimental `dynamic` scheduler that rebalances idle threads, adjusts CPU frequency 1163using dpdk_governor and turns idle reactor cores to interrupt mode. Please see 1164[scheduler documentation](https://www.spdk.io/doc/scheduler.html) for details. 1165 1166## ioat 1167 1168The PCI BDF whitelist option has been removed from the `ioat_scan_accel_engine` RPC. 1169IOAT PCI functions can still be allowed or denied using SPDK application command 1170line options. 1171 1172### isa-l 1173 1174Updated ISA-L submodule to v2.30.0. 1175 1176### json 1177 1178A new API `spdk_jsonrpc_send_bool_response` was added to allow sending response for 1179writing json bool results into one function. 1180Update API `bdev_nvme_set_options` and add a `keep_alive_timeout_ms` parameter. Now you 1181can specify the `keep_alive_timeout` before creating NVMe bdev. 1182 1183### nbd 1184 1185Change the return type of function `spdk_nbd_stop` from void to int. And update the 1186`spdk_nbd_fini` with two parameters to make its behavior from sync to async. 1187 1188### nvme 1189 1190Directives support was added to the NVMe driver. 1191 1192Two async APIs `spdk_nvme_ctrlr_cmd_directive_receive` and `spdk_nvme_ctrlr_cmd_directive_send` 1193are added for Directive Send and Directive Receive command, respectively. 1194 1195Added a new function `spdk_nvme_ctrlr_reset_subsystem` to perform a NVMe 1196subsystem reset. Note: The NVMe-oF target does not support the subsystem reset yet. 1197 1198Add a new function `spdk_nvme_bytes_to_numd` to transfer bytes to number of 1199dwords. 1200 1201Added a new custom transport `SPDK_NVME_TRANSPORT_VFIOUSER` to enable NVMe 1202driver running with NVMe over vfio-user target. 1203 1204Added the vfio-user custom transport implementation in NVMe driver which can connect 1205to NVMe over vfio-user target via vfio-user transport. 1206 1207Added a new function `spdk_nvme_ctrlr_set_remove_cb` to remove or override 1208`remove_cb` and `remove_ctx` specified when the controller was probed. 1209 1210Added support for ZNS zone append command with new API `spdk_nvme_zns_zone_append` and 1211`spdk_nvme_zns_zone_append_with_md`. 1212 1213### nvmf 1214 1215`nvmf_fc_lld_fini` now takes callback and hence updating FC Broadcom LLD driver 1216to the latest is required. 1217 1218FC transport supported primary tagging and VMID. 1219 1220Broadcom FC LLD driver and SPDK NVMe-oF FC transport consolidated one LLD API, 1221`nvmf_fc_init_poller_queues` into another LLD API `nvmf_fc_init_q`. 1222Hence updating Broadcom FC LLD driver to the latest is required. 1223 1224The functions `destroy` and `qpair_fini` in the transport interface now accept a 1225`cb_fn` and `cb_arg` to call upon completion, and their execution can be asynchronous. 1226 1227The SPDK NVMe-oF target now supports async event notification for discovery log changes. 1228This allows the initiator to create persistent connection to discovery controller and 1229be notified of any discovery log changes. 1230 1231An `opts_size` element was added in the `spdk_nvmf_transport_opts` structure 1232to solve the ABI compatibility issue between different SPDK version. And also add 1233`opts_size` parameter in `spdk_nvmf_transport_opts_init` function. 1234 1235Added a new custom vfio-user transport implementation in NVMe-oF which can provide 1236emulated NVMe devices to QEMU and SPDK NVMe driver. 1237 1238Added new API `spdk_nvmf_tgt_listen_ext` that uses `spdk_nvmf_listen_opts` to allow 1239passing generic options to specific transport. This functionality replaces one provided 1240with `nvmf_subsystem_set_options`. Also removed `nvmf_subsystem_set_options` RPC 1241that allowed transport specific options within subsystem. 1242 1243The `trsvcid` in `nvmf_subsystem_add_listener` RPC is now optional. 1244 1245Pausing a subsystem now only pauses all admin queues. This allows for the 1246management of hosts and listeners, plus the addition of namespaces without a 1247full subsystem pause. Additionally, the target now allows for pausing 1248individual namespaces within a subsystem. To remove a namespace from a 1249subsystem, only the specific namespace must be paused. I/O will continue to 1250other namespaces while these operations execute. 1251 1252### rpc 1253 1254An new optional parameter `wait` was added to the RPC `iscsi_create_portal_group`, 1255and an new RPC `iscsi_start_portal_group` was added. They will be used not to start 1256listening on portals for a portal group until all associated target nodes are created 1257at startup, otherwise some iSCSI initiators may fail to re-login when SPDK iSCSI 1258target application restarts. 1259 1260Two optional parameter `--small-buf-pool-size` and `--large-buf-pool-size` were added 1261into `bdev_set_options` function. 1262 1263### vhost 1264 1265Added optional `packed_ring_recovery` parameter to `vhost_create_blk_controller` RPC 1266enabling packed ring live recovery. 1267 1268## v20.10 1269 1270### accel 1271 1272New APIs `spdk_accel_batch_cancel` and `spdk_idxd_batch_cancel` were added to allow 1273cancelling a batch sequence. 1274 1275### bdev 1276 1277A new `spdk_bdev_part_base_construct_ext` function has been added and the 1278`spdk_bdev_part_base_construct` has been deprecated. The 1279`spdk_bdev_part_base_construct_ext` function takes bdev name as an argument instead 1280of bdev structure to avoid a race condition that can happen when the bdev is being 1281removed between a call to get its structure based on a name and actually opening it. 1282 1283Removed `spdk_bdev_config_text` function for bdev modules to report legacy config. 1284 1285### blobstore 1286 1287A new `spdk_bdev_create_bs_dev_ext` function has been added and `spdk_bdev_create_bs_dev_from_desc` 1288function has been deprecated. 1289 1290### dpdk 1291 1292Updated DPDK submodule to DPDK 20.08. 1293 1294### env 1295 1296A new API `spdk_mem_get_fd_and_offset` was added to get file descriptor and offset for 1297a given virtual address. 1298 1299### event 1300 1301Removed `spdk_subsystem_config` callback for submodules as part of legacy config removal. 1302 1303Removed `spdk_app_get_running_config` function that printed configuration in legacy format, 1304and removed `usr1_handler` from `struct spdk_app_opts` callback that was used to call it. 1305 1306Added SPDK thread scheduler framework which is used to rebalance load among CPU cores. 1307The scheduler implementation is pluggable and two schedulers are added first, `static` scheduler 1308and `gscheduler` scheduler. 1309 1310`static` scheduler is used by default and does not reschedule threads and keeps the initial 1311assignments. 1312 1313CPU frequency governor framework and implementation are also added. 1314`dpdk_governor` is the first implementation and is based on rte_power library of DPDK. 1315`gscheduler` scheduler utilizes the CPU frequency governor. 1316 1317Scheduler and governor frameworks are experimental features. 1318 1319### fio 1320 1321Bdev fio_plugin no longer supports legacy configuration files. Options `spdk_conf` and 1322`spdk_json_conf` have to point to valid JSON configuration. 1323 1324### gpt 1325 1326Removed option to disable GPT probing via legacy configuration. Please use generic 1327bdev functionality to replicate the behavior. See `bdev_set_options --disable-auto-examine` 1328and `bdev_examine` RPC. 1329 1330### intel-ipsec-mb 1331 1332Updated intel-ipsec-mb submodule to v0.54 1333 1334### isa-l 1335 1336Updated ISA-L submodule to v2.29.0. 1337 1338### iscsi 1339 1340The iSCSI target supports iSCSI login redirection feature to achieve fault tolerance 1341and load balancing particularly in scale out iSCSI target system, which runs multiple 1342SPDK iSCSI targets. 1343 1344### json 1345 1346A new API `spdk_json_decode_object_relaxed` was added to allow parsing json values 1347even if decoder for a given key is not found. 1348 1349A new API `spdk_json_free_object` was added to free memory allocated by `spdk_json_decode_object`. 1350 1351### log 1352 1353A log flag structure, `spdk_log_register_flag`, `spdk_log_get_first_flag`, 1354`spdk_log_get_next_flag` and macro `SPDK_LOG_REGISTER_COMPONENT`, have been added which 1355enable registering and interacting with log flags. Added `SPDK_INFOLOG`, `SPDK_DEBUGLOG` 1356and `SPDK_LOGDUMP` macros to display logs for specified log flag. 1357 1358The log flags in the event framework `-L` and several SPDK applications has been enabled on 1359release builds of SPDK. On debug builds this option will additionally set 1360log print level to `SPDK_LOG_DEBUG`. 1361 1362A new API `spdk_log_enable_timestamps` and new RPC `log_enable_timestamps` was added to 1363toggle log timestamps. 1364 1365### miscellaneous 1366 1367The contents of the log_rpc library have been moved to the event library. The log_rpc 1368library now no longer exists. 1369 1370The contents of the app_rpc library have been moved to the event library. The app_rpc 1371library now no longer exists. 1372 1373The contents of the bdev_rpc library have been moved to the bdev library. The app_rpc 1374library now no longer exists. 1375 1376The bdevperf application now disables the zcopy API by default. Prior to this change, 1377bdevperf enabled using the zcopy API by default which caused a performance impact of 1378up to 25% on bdevs that don't natively support zcopy because the API emulates zero-copy 1379by allocating a buffer. The bdevperf `-x` param was renamed to `-Z` and the default 1380value changed to false. For bdevs that support zcopy, use the -Z flag to enable 1381using zcopy API. 1382 1383### net 1384 1385Net framework intended for use by user-space TCP stacks was removed. 1386 1387### nvme 1388 1389Zoned Namespace Command Set support has been added to NVMe driver, see `nvme_zns.h` for details. 1390 1391New APIs, `spdk_nvme_detach_async` and `spdk_nvme_detach_poll_async`, have been added to 1392detach multiple controllers in parallel to mitigate lengthy shutdown notification of 1393a few NVMe SSDs. 1394 1395New APIs, `spdk_nvme_ns_get_ana_group_id` and `spdk_nvme_ns_get_ana_state`, have been 1396added to get ANA group ID and ANA state of the given namespace, respectively. 1397 1398If no specific command set is requested (by setting the command_set member in the 1399`spdk_nvme_ctrlr_opts` structure), SPDK will automatically select the most appropriate 1400command set based on what the controller supports. 1401 1402### nvmf 1403 1404A new API `spdk_nvmf_subsystem_add_ns_ext` has been added and the API `spdk_nvmf_subsystem_add_ns` 1405has been deprecated. 1406 1407The NVMe-oF target now supports Asymmetric Namespace Access (ANA) Reporting to provide 1408multipath to NVMe-oF initiator. 1409 1410Add `no_wr_batching` parameter to `spdk_nvmf_transport_opts` struct to disable 1411Work Requests batching in RDMA transport. 1412 1413NVMf Target transports can now parse any additional JSON params in the nvmf_create_transport RPC 1414through the JSON context provided via spdk_nvmf_target_opts->transport_specific. 1415 1416A new RPC `nvmf_subsystem_set_options` was added to allow transport specific options within subsystem. 1417 1418A new API `spdk_nvmf_transport_stop_listen_async` was added to stop accepting new connections 1419at the provided address. `nvmf_subsystem_remove_listener` RPC now uses this function. 1420 1421A new API `spdk_nvmf_subsystem_disconnect_host` was added to disconnect all connections 1422originating from the provided hostnqn. `nvmf_subsystem_remove_host` RPC now uses this function. 1423 1424### ocf 1425 1426Updated OCF submodule to v20.03.1 1427 1428### rpc 1429 1430New optional parameters, `enable_placement_id` and `enable_quickack` were added to the 1431`sock_impl_set_options` RPC. 1432 1433A new RPC `bdev_examine_bdev` was added to allow users to examine a bdev explicitly. 1434It can be used only if bdev_auto_examine is set to false by the RPC `bdev_set_options`. 1435 1436New optional parameters `no_wr_batching` and `control_msg_num` were added to the RPC 1437'nvmf_create_transport'. 1438 1439New RPCs, `iscsi_target_node_set_redirect` and `iscsi_target_node_request_logout`, have 1440been added, and a new optional parameter `private` has been added to the RPC 1441`iscsi_create_portal_group` to support iSCSI login redirection feature. 1442 1443A new optional parameter `ana_reporting` was added to the RPC `nvmf_create_subsystem`, and 1444a new RPC `nvmf_subsystem_listener_set_ana_state` was added for ANA reporting. 1445 1446New RPCs, `nvmf_subsystem_get_listeners` and `nvmf_subsystem_get_qpairs`, were added to 1447retrieve configuration of the NVMe-oF subsystem. 1448 1449### scsi 1450 1451Two new APIs have been added `spdk_scsi_dev_construct_ext` and 1452`spdk_scsi_dev_add_lun_ext` that allow the upper layer(e.g. vhost-scsi) to 1453receive the notification when the scsi bdev has been resized. 1454 1455The `spdk_scsi_dev_construct` and `spdk_scsi_dev_add_lun` eventually may be 1456deprecated and removed. 1457 1458### sock 1459 1460The `enable_placement_id` field was added in the `struct spdk_sock_impl_opts` to 1461make the placement_id feature configurable by users. The default setting is 1462not enabled. 1463 1464The `enable_quick_ack` field was added in the `struct spdk_sock_impl_opts` to enable 1465or disable quick ack for the POSIX sock module. The default setting is not enabled. 1466 1467### thread 1468 1469`fd_group` is applied to support interrupt mode. 1470New APIs were added to support an experimental interrupt mode. This allows modules or 1471libraries to selectively register file descriptors that the spdk_thread can wait on, 1472as an alternative to polling. In v20.10, this functionality is enabled in a very small 1473subset of SPDK libraries and modules. 1474 1475### util 1476 1477A new utility named `fd_group` was add. It is now 1478implemented by epoll on Linux platform. It can be used by 1479spdk_thread and reactor to implement interrupt mode. 1480 1481Added `spdk_bit_pool` utility, see `bit_pool.h` for details. 1482 1483### vhost 1484 1485SPDK has switched to DPDK's rte_vhost library since 19.07 release, removed the internal 1486rte_vhost library which is used for DPDK older than 19.05, removed the experimental vhost 1487nvme target which depends on the internal rte_vhost library. 1488 1489### vpp 1490 1491Removed socket abstraction for VPP. 1492 1493## v20.07: SPDK CSI driver, new accel_fw commands, I/O abort support 1494 1495spdk_json_free_object() was added to free memory allocated by spdk_json_decode_object(). 1496 1497### accel 1498 1499A new API was added `spdk_accel_get_capabilities` that allows applications to 1500query the capabilities of the currently enabled accel engine back-end. 1501 1502A new capability, CRC-32C, was added via `spdk_accel_submit_crc32c`. 1503 1504The software accel engine implementation has added support for CRC-32C. 1505 1506A new capability, compare, was added via `spdk_accel_submit_compare`. 1507 1508The software accel engine implementation has added support for compare. 1509 1510Several APIs were added to `accel_engine.h` to support batched submission 1511of operations. 1512 1513Several APIs were added to `accel_engine.h` to support dualcast operations. 1514 1515### accel_fw 1516 1517The accel_fw was updated to no longer require the app to allocate an 1518accel_task on its behalf. All public APIs now take a callback arg as 1519the parameter that used to be the accel_task. 1520 1521The accel_fw API `spdk_accel_task_size` was removed as it is no longer 1522required. 1523 1524The accel_fw was updated to support compare, dualcast, crc32c. 1525 1526The accel_fw introduced batching support for all commands in all plug-ins. 1527See docs for detailed information. 1528 1529### bdev 1530 1531A new API `spdk_bdev_abort` has been added to submit abort requests to abort all I/Os 1532whose callback context match to the bdev on the given channel. 1533 1534### build 1535 1536The fio plugins now compile to `build/fio` and are named `spdk_bdev` and `spdk_nvme`. 1537Existing fio configuration files will need to be updated. 1538 1539### dpdk 1540 1541Updated DPDK submodule to DPDK 20.05. 1542 1543### env 1544 1545Several new APIs have been added to provide greater flexibility in registering and 1546accessing polled mode PCI drivers. See `env.h` for more details. 1547 1548### idxd 1549 1550The idxd library and plug-in module for the accel_fw were updated to support 1551all accel_fw commands as well as batching. Batching is supported both 1552through the library and the plug-in module. 1553 1554IDXD engine support for CRC-32C has been added. 1555 1556### ioat 1557 1558A new API `spdk_ioat_get_max_descriptors` was added. 1559 1560### nvme 1561 1562An `opts_size`element was added in the `spdk_nvme_ctrlr_opts` structure 1563to solve the ABI compatibility issue between different SPDK version. 1564 1565A new API `spdk_nvme_ctrlr_cmd_abort_ext` has been added to abort previously submitted 1566commands whose callback argument match. 1567 1568Convenience functions, `spdk_nvme_print_command` and `spdk_nvme-print_completion` were added 1569to the public API. 1570 1571A new function, `spdk_nvmf_cuse_update_namespaces`, updates the cuse representation of an NVMe 1572controller. 1573 1574A new function `qpair_iterate_requests` has been added to the nvme transport interface. ALl 1575implementations of the transport interface will have to implement that function. 1576 1577### nvmf 1578 1579The NVMe-oF target no longer supports connecting scheduling configuration and instead 1580always uses what was previously called "transport" scheduling. 1581 1582`spdk_nvmf_tgt_accept` no longer exists. The accept process now occurs automatically after 1583the creation of an nvmf target and queue pairs are assigned to poll groups by the underlying 1584transport. Further, `spdk_nvmf_transport_ops` has changed such that the accept function 1585pointer no longer takes a function pointer as an argument. Instead, transports should call 1586`spdk_nvmf_tgt_new_qpair` whenever they previously would have called that callback. 1587 1588The NVMe-oF target now supports aborting any submitted NVM or Admin command. Previously, 1589the NVMe-oF target could abort only Asynchronous Event Request commands. 1590 1591### rdma 1592 1593A new `rdma` library has been added. It is an abstraction layer over different RDMA providers. 1594Two providers are available - verbs (used by default when RDMA is enabled or enabled explicitly 1595using --with-rdma=verbs) and mlx5 Direct Verbs aka DV (enabled by --with-rdma=mlx5_dv). 1596Using mlx5_dv requires libmlx5 installed on the system. 1597 1598### rpc 1599 1600Parameter `-p` or `--max-qpairs-per-ctrlr` of `nvmf_create_transport` RPC command accepted by the 1601rpc.py script is deprecated, new parameter `-m` or `--max-io-qpairs-per-ctrlr` was added. 1602 1603Added `sock_impl_get_options` and `sock_impl_set_options` RPC methods. 1604 1605Command line parameters `-r` and `--rpc-socket` will longer accept TCP ports. RPC server 1606must now be started on a Unix domain socket. Exposing RPC on the network, as well as providing 1607proper authentication (if needed) is now a responsibility of the user. 1608 1609The `bdev_set_options` RPC has a new option, `bdev_auto_examine` to control the auto examine function 1610of bdev modules. 1611 1612New RPCs `sock_impl_get_options` and `sock_impl_set_options` been added to expose new socket features. 1613See `sock` section for more details. 1614 1615### sock 1616 1617Added `spdk_sock_impl_get_opts` and `spdk_sock_impl_set_opts` functions to set/get socket layer configuration 1618options. Options can be set independently for each implementation. 1619 1620Added `recv_buf_size` and 'send_buf_size' socket layer options. They are used only in posix implementation. 1621 1622Added `uring` based socket implementation, the code is located in module/sock/uring. This feature is only 1623available in Linux which requires kernel version is greater than 5.4.3. Currently, our CI pool added the uring 1624based socket tests for iSCSI target and also the tests for SPDK NVMe-oF tcp transport. 1625 1626Added `enable_recv_pipe` socket layer option to allow disabling of double buffering on receive. 1627New option is used only in posix implementation. 1628 1629Added `enable_zerocopy_send` socket layer option to allow disabling of zero copy flow on send. 1630New option is used only in posix implementation. 1631 1632### util 1633 1634Some previously exposed CRC32 functions have been removed from the public API - 1635`spdk_crc32_update`, `spdk_crc32_table_init`, and the `spdk_crc32_table` struct. 1636 1637### vhost 1638 1639The function `spdk_vhost_blk_get_dev` has been removed. 1640 1641## v20.04: SPDK Top, IDXD, NVMe qpair groups 1642 1643IDXD engine support for compare has been added. 1644 1645### configuration 1646 1647Legacy INI style configuration for SPDK applications has been deprecated and will be 1648removed in future release. 1649Please switch to JSON-RPC configuration files and/or RPC driven run-time configuration. 1650 1651### copy 1652 1653The copy engine library, modules and public APIs have been renamed. Use of the word `copy` 1654has been replaced with the word `accel` short for accelerator in preparation for adding new 1655capabilities in the future. Additionally, APIs for what was previously called the `memcpy` 1656engine have been renamed to identify the engine as a software accelerator. 1657 1658### crypto 1659 1660Support for AES_XTS was added for the QAT polled mode driver (pmd). The create RPC 1661`bdev_crypto_create` has 2 new optional parameters: cipher and key2. Cipher can be either 1662AES_CBC (default) or AES_XTS. AES_XTS is only valid when using the QAT polled mode driver. 1663The key2 parameter is the second key required for AES_XTS. 1664 1665### event 1666 1667Reactors now accumulate CPU stats and they are retrieved by the RPC `framework_get_reactors`. 1668 1669### idxd 1670 1671IDXD support was added in the form of a low level library that can directly 1672utilize the IDXD offload engine as well as an accel plug-in module allowing for use 1673with the generic accel framework API. IDXD is the first in a family of offload 1674engines that share the same interface, specifically DSA is added here. More info 1675can be found here: https://01.org/blogs/2019/introducing-intel-data-streaming-accelerator 1676 1677Much of the implementation models IOAT, however the low level interfaces are very 1678different. The RPC to enable IDXD requires a configuration number as well. The 1679code includes two pre-defined configurations of IDXD groups/work queues/engines. A future 1680version will provide an interface to allow for setting of individual configuration 1681parameters. 1682 1683IDXD is not yet available so this feature should be considered experimental. It will 1684be built up with additional documentation as an ongoing activity. 1685 1686### iscsi 1687 1688The iSCSI target now creates a lightweight thread per poll group instead of assuming a pool 1689of lightweight threads already exist at start up time. A poll group is a collection of 1690unrelated iSCSI connections. Each poll group is only accessed from the associated 1691lightweight thread. 1692 1693### ftl 1694 1695Several changes have been made to the `spdk_ftl_conf`, `spdk_ftl_dev_init_ops`, and 1696`spdk_ftl_attrs` structs. Please see `include/spdk/ftl.h` for more details. 1697 1698### miscellaneous 1699 1700The `--json-ignore-init-errors` command line parameter has been added to ignore 1701initialization errors on JSON config load. 1702 1703The public header file io_channel.h has been removed. Please use thread.h which has the 1704exact same API. 1705 1706### nvme 1707 1708Exported internal nvme_ctrlr_cmd_security_receive/send() APIs as public APIs with "the spdk_" 1709prefix. 1710 1711Added `priority` field in `spdk_nvme_transport_id`, this field is used to specify the priority 1712of the NVMe-oF connection, and currently it is used for NVMe-oF tcp connection. 1713 1714A new poll group API has been added to allow for pooling of nvme qpairs across a single 1715entity which can be polled for completions. This new API consists of the `spdk_nvme_poll_group` 1716family of functions. As a result of this new API, all NVMe transports are expected to implement 1717several poll group related functions. 1718 1719A new flag, `create_only`, has been added to the `spdk_nvme_io_qpair_opts` structure. This flag 1720allows a user to call `spdk_nvme_ctrlr_get_default_io_qpair` without also connecting the qpair 1721within the context of that call. 1722 1723As a result of the `create_only` flag, two new API functions, `spdk_nvme_ctrlr_connect_io_qpair` 1724and `spdk_nvme_ctrlr_disconnect_io_qpair`, have been added to facilitate connecting newly created 1725qpairs (for example, after they have been added to a poll group) and disconnecting qpairs without 1726destroying them (for example to disconnect a qpair before migrating it to a new poll group and 1727reconnecting it). 1728 1729The functions `spdk_nvme_ctrlr_alloc_cmb_io_buffer` and `spdk_nvme_ctrlr_free_cmb_io_buffer` 1730have been changed to `spdk_nvme_ctrlr_map_cmb` and `spdk_nvme_ctrlr_unmap_cmb` respectively. 1731 1732An additional function, `spdk_nvme_ctrlr_reserve_cmb`, has been added to facilitate reserving 1733the entire size of the controller memory buffer for data transfer. 1734 1735### nvme_cuse 1736 1737`spdk_nvme_cuse_get_ctrlr_name` now takes two additional parameters, `char *name` which 1738stores the pointer to the controller name, and `size_t *size` which stores the length of 1739the name. The return type has also been changed from char * to int. 1740 1741`spdk_nvme_cuse_get_ns_name` now takes two additional parameters, `char *name` which 1742stores the pointer to the namespace name, and `size_t *size` which stores the length of 1743the name. The return type has also been changed from char * to int. 1744 1745### nvme_opal 1746 1747Several public OPAL structure definitions have been changed since the last release. 1748 1749### nvmf 1750 1751`spdk_nvmf_poll_group_destroy()` is now asynchronous and accepts a completion callback. 1752 1753The NVMe-oF target now creates a lightweight thread per poll group instead of assuming a pool 1754of lightweight threads already exist at start up time. A poll group is a collection of 1755unrelated NVMe-oF connections. Each poll group is only accessed from the associated 1756lightweight thread. 1757 1758A new struct, `spdk_nvmf_subsystem_listener`, has been added to encapsulate the subsystem specific 1759nature of a listener object. 1760 1761`spdk_nvmf_tgt_listen` no longer accepts a callback function or argument. It also returns an 1762int to indicate the status of the listen call. 1763 1764The execution of `spdk_nvme_poll_group_destroy` is now asynchronous and the function accepts 1765a cb_fn and cb_arg to call upon completion. 1766 1767The execution of `spdk_nvmf_subsystem_add_listener` is now asynchronous and the function accepts 1768a cb_fn and cb_arg to call upon completion. 1769 1770The `nvmf_transport.h` header has been made public to allow custom NVMe-oF transports to integrate 1771with NVMe-oF libraries without using internal APIs. 1772 1773### ocf 1774 1775Updated the OCF submodule to OCF v20.03 1776 1777New version of OCF comes with API changes and bug fixes 1778 1779### rpc 1780 1781A new RPC `thread_set_cpumask` has been added to set the cpumask of the thread 1782to the specified value. 1783 1784A new RPC `thread_get_pollers` has been added to retrieve pollers from SPDK threads. 1785 1786A new RPC `thread_get_io_channels` has been added to retrieve I/O channels from SPDK threads. 1787 1788A new RPC `bdev_rbd_resize` has been added to resize Ceph RBD bdevs. 1789 1790### sock 1791 1792The `spdk_sock_set_priority` function has been removed since the feature to set the sock priority 1793will be contained in two new functions, i.e., `spdk_sock_listen_ext` and `spdk_sock_connect_ext`. 1794Users may now specify the priority of the socket in the opts that they want to use. 1795 1796### spdk_top 1797 1798A new application, `spdk_top`, has been added which allows users to monitor resource consumption 1799by a running SPDK application. More information on this application can be found in 1800`app/spdk_top/README`. 1801 1802### thread 1803 1804A new function `spdk_thread_lib_init_ext` has been added, and the function 1805`spdk_thread_lib_init` has been deprecated. The user of `spdk_thread_lib_init_ext` is 1806expected to implement both functions `spdk_thread_op_fn` and `spdk_thread_op_supported_fn`. 1807`spdk_thread_op_supported_fn` is called to check whether the SPDK thread operation 1808is supported. `spdk_thread_op_fn` is called to execute the SPDK thread operation. 1809Current SPDK operation types are `SPDK_THREAD_OP_NEW` and `SPDK_THREAD_OP_RESCHED`. 1810The operation `SPDK_THREAD_OP_NEW` is called each time a new thread is created. 1811The operation `SPDK_THREAD_OP_RESCHED` is called when SPDK thread needs to be rescheduled. 1812 1813A unique ID has been added for each created SPDK thread, it is retrieved by a new function 1814`spdk_thread_get_id`, and the SPDK thread which has the specific ID is got by 1815a new function `spdk_thread_get_by_id`. 1816 1817A new function `spdk_thread_cpumask` has been added to set the current thread's cpumask 1818to the specified value. The function requires the operation `SPDK_THREAD_OP_RESCHED` 1819is supported. 1820 1821A new function `spdk_poller_register_named` has been added to set arbitrary name to the 1822created poller. If NULL, the name is set to the pointer of the poller function. 1823 1824The function `spdk_thread_poll` now measures run time per call correctly on multiple SPDK 1825threads configuration, and a new function `spdk_thread_get_last_tsc` has been added to use together. 1826 1827Voluntary termination of SPDK thread has been supported by refining the functions `spdk_thread_exit` 1828and `spdk_thread_poll`. 1829 1830### util 1831 1832New functions `spdk_sn32_lt` and `spdk_sn32_gt` have been added. They compare two sequence 1833numbers based on serial number arithmetic. 1834 1835### vhost 1836 1837Poll groups per session have been replaced by SPDK threads per vhost controller. 1838 1839### vmd 1840 1841A new function, `spdk_vmd_fini`, has been added. It releases all resources acquired by the VMD 1842library through the `spdk_vmd_init` call. 1843 1844## v20.01: Optimized thin provisioning, FTL bdev, VMD hot plug, FUSED support 1845 1846### bdev 1847 1848A new function, `spdk_bdev_set_timeout`, has been added to set per descriptor I/O timeouts. 1849 1850A new class of functions `spdk_bdev_compare*`, have been added to allow native bdev support 1851of block comparisons and compare-and-write. 1852 1853A new class of bdev events, `SPDK_BDEV_EVENT_MEDIA_MANAGEMENT`, has been added to allow bdevs 1854which expose raw media to alert all I/O channels of pending media management events. 1855 1856A new API was added `spdk_bdev_io_get_aux_buf` allowing the caller to request 1857an auxiliary buffer for its own private use. The API is used in the same manner that 1858`spdk_bdev_io_get_buf` is used and the length of the buffer is always the same as the 1859bdev_io primary buffer. 'spdk_bdev_io_put_aux_buf' frees the allocated auxiliary 1860buffer. 1861 1862### blobfs 1863 1864Added boolean return value for function spdk_fs_set_cache_size to indicate its operation result. 1865 1866Added `blobfs_set_cache_size` RPC method to set cache size for blobstore filesystem. 1867 1868### blobstore 1869 1870Added new `use_extent_table` option to `spdk_blob_opts` for creating blobs with Extent Table descriptor. 1871Using this metadata format, dramatically decreases number of writes required to persist each cluster allocation 1872for thin provisioned blobs. Extent Table descriptor is enabled by default. 1873See the [Blobstore Programmer's Guide](https://spdk.io/doc/blob.html#blob_pg_cluster_layout) for more details. 1874 1875### dpdk 1876 1877Updated DPDK submodule to DPDK 19.11. 1878 1879### env_dpdk 1880 1881`spdk_env_dpdk_post_init` now takes a boolean, `legacy_mem`, as an argument. 1882 1883A new function, `spdk_env_dpdk_dump_mem_stats`, prints information about the memory consumed by DPDK to a file specified by 1884the user. A new utility, `scripts/dpdk_mem_info.py`, wraps this function and prints the output in an easy to read way. 1885 1886### event 1887 1888The functions `spdk_reactor_enable_framework_monitor_context_switch()` and 1889`spdk_reactor_framework_monitor_context_switch_enabled()` have been changed to 1890`spdk_framework_enable_context_switch_monitor()` and 1891`spdk_framework_context_switch_monitor_enabled()`, respectively. 1892 1893### ftl 1894 1895All NVMe dependencies were removed from ftl library. 1896From now ftl library is using bdev_zone API. 1897bdev_ftl becomes virtual bdev. 1898 1899`ctrlr` and `trid` fields in `spdk_ftl_dev_init_opts` structure were replaced by 1900`base_bdev_desc`. 1901 1902`bdev_ftl_create` RPC method `trtype` and `traddr` parameters were replaced by `base_bdev` 1903parameter. 1904 1905`spdk_ftl_module_init` and `spdk_ftl_module_fini` functions were removed. 1906 1907`spdk_ftl_punit_range` and `ftl_module_init_opts` structures were removed. 1908 1909### isa-l 1910 1911Updated ISA-L submodule to commit f3993f5c0b6911 which includes implementation and 1912optimization for aarch64. 1913 1914Enabled ISA-L on aarch64 by default in addition to x86. 1915 1916### nvme 1917 1918`delayed_pcie_doorbell` parameter in `spdk_nvme_io_qpair_opts` was renamed to `delay_cmd_submit` 1919to allow reuse in other transports. 1920 1921Added RDMA WR batching to NVMf RDMA initiator. Send and receive WRs are chained together 1922and posted with a single call to ibv_post_send(receive) in the next call to qpair completion 1923processing function. Batching is controlled by 'delay_cmd_submit' qpair option. 1924 1925The NVMe-oF initiator now supports plugging out of tree NVMe-oF transports. In order 1926to facilitate this feature, several small API changes have been made: 1927 1928The `spdk_nvme_transport_id` struct now contains a trstring member used to identify the transport. 1929A new function, `spdk_nvme_transport_available_by_name`, has been added. 1930A function table, `spdk_nvme_transport_ops`, and macro, `SPDK_NVME_TRANSPORT_REGISTER`, have been added which 1931enable registering out of tree transports. 1932 1933A new function, `spdk_nvme_ns_supports_compare`, allows a user to check whether a given namespace supports the compare 1934operation. 1935 1936A new family of functions, `spdk_nvme_ns_compare*`, give the user access to submitting compare commands to NVMe namespaces. 1937 1938A new function, `spdk_nvme_ctrlr_cmd_get_log_page_ext`, gives users more granular control over the command dwords sent in 1939log page requests. 1940 1941### nvmf 1942 1943Add SockPriority option in [Transport] section, this can be used for NVMe-oF target 1944on TCP transport to set sock priority for the incoming TCP connections. 1945 1946The NVMe-oF target now supports plugging out of tree NVMe-oF transports. In order 1947to facilitate this feature, several small API changes have been made: 1948 1949The `spdk_nvme_transport_id` struct now contains a trstring member used to identify the transport. 1950`spdk_nvmf_tgt_get_transport`, `spdk_nvmf_transport_opts_init`, and `spdk_nvmf_transport_create` all have been 1951modified to take a string. 1952A function table, `spdk_nvmf_transport_ops`, and macro, `SPDK_NVMF_TRANSPORT_REGISTER`, have been added which 1953enable registering out of tree transports. 1954 1955Add `spdk_nvmf_tgt_stop_listen()` that can be used to stop listening for 1956incoming connections for specified target and trid. Listener is not stopped 1957implicitly upon destruction of a subsystem any more. 1958 1959A custom NVMe admin command handler has been added which allows the user to use the real drive 1960attributes from one of the target NVMe drives when reporting drive attributes to the initiator. 1961This handler can be enabled via the `nvmf_set_config` RPC. 1962Note: In a future version of SPDK, this handler will be enabled by default. 1963 1964The SPDK target and initiator both now include compare-and-write functionality with one caveat. If using the RDMA transport, 1965the target expects the initiator to send both the compare command and write command either with, or without inline data. The 1966SPDK initiator currently respects this requirement, but this note is included as a flag for other initiators attempting 1967compatibility with this version of SPDK. 1968 1969The `spdk_nvme_ctrlr_opts` struct has been extended with new field `transport_ack_timeout` which allows 1970to configure transport ACK timeout. Applicable for RDMA transport only. 1971 1972### rpc 1973 1974A new RPC, `bdev_zone_block_create`, enables creating an emulated zoned bdev on top of a standard block device. 1975 1976A new RPC, `bdev_ocssd_create`, enables creating an emulated zoned bdev on top of an Open Channel SSD. 1977 1978A new RPC, `blobfs_set_cache_size`, enables managing blobfs cache size. 1979 1980A new RPC, `env_dpdk_get_mem_stats`, has been added to facilitate reading DPDK related memory 1981consumption stats. Please see the env_dpdk section above for more details. 1982 1983A new RPC, `framework_get_reactors`, has been added to retrieve a list of all reactors. 1984 1985`bdev_ftl_create` now takes a `base_bdev` argument in lieu of `trtype`, `traddr`, and `punits`. 1986 1987`bdev_nvme_set_options` now allows users to disable I/O submission batching with the `-d` flag 1988 1989`bdev_nvme_cuse_register` now accepts a `name` parameter. 1990 1991`bdev_uring_create` now takes arguments for `bdev_name` and `block_size` 1992 1993`nvmf_set_config` now takes an argument to enable passthru of identify commands to base NVMe devices. 1994Please see the nvmf section above for more details. 1995 1996### scsi 1997 1998`spdk_scsi_lun_get_dif_ctx` now takes an additional argument of type `spdk_scsi_task`. 1999 2000### sock 2001 2002Added spdk_sock_writev_async for performing asynchronous writes to sockets. This call will 2003never return EAGAIN, instead queueing internally until the data has all been sent. This can 2004simplify many code flows that create pollers to continue attempting to flush writes 2005on sockets. 2006 2007Added `impl_name` parameter in spdk_sock_listen and spdk_sock_connect functions. Users may now 2008specify the sock layer implementation they'd prefer to use. Valid implementations are currently 2009"vpp" and "posix" and NULL, where NULL results in the previous behavior of the functions. 2010 2011### thread 2012 2013`spdk_thread_send_msg` now returns int indicating if the message was successfully 2014sent. 2015 2016A new function `spdk_thread_send_critical_msg`, has been added to support sending a single message from 2017a context that may be interrupted, e.g. a signal handler. 2018 2019Two new functions, `spdk_poller_pause`, and `spdk_poller_resume`, have been added to give greater control 2020of pollers to the application owner. 2021 2022### util 2023 2024`spdk_pipe`, a new utility for buffering data from sockets or files for parsing 2025has been added. The public API is available at `include/spdk/pipe.h`. 2026 2027### bdev 2028 2029Added spdk_bdev_io_get_nvme_fused_status function for translating bdev_io status to NVMe status 2030code for fused compare-and-write operation. 2031 2032Added spdk_bdev_get_acwu function for getting block device atomic compare and write unit size. 2033 2034## v19.10: Zoned bdev API, Opal bdev, NVMe character devices 2035 2036### rpc 2037 2038Many of SPDK's RPCs were renamed to be more consistent and intuitive in this release. 2039The old names will continue to function, but will display a deprecation warning. 2040 2041Added optional parameters '--arbitration-burst' and '--low/medium/high-priority-weight' to 2042'bdev_nvme_set_options' RPC method. 2043 2044Added optional parameter '--md-size' to 'construct_null_bdev' RPC method. 2045 2046Added optional parameters '--dif-type' and '--dif-is-head-of-md' to 'construct_null_bdev' 2047RPC method. 2048 2049Added `blobfs_detect` RPC method to detect whether a blobfs exists on given bdev. 2050 2051Added `blobfs_create` RPC method to build blobfs on given bdev. 2052 2053Added `blobfs_mount` RPC method to mount blobfs on given bdev to a host path by FUSE. 2054Then on the host path, user can directly do some file operations which will be mapped 2055to blobfs. 2056 2057### bdev 2058 2059Added new parameter `cdw0` to `spdk_bdev_io_complete_nvme_status()` and 2060`spdk_bdev_io_get_nvme_status()` that allows setting/getting 2061the NVMe completion queue DW0 entry. This allows vendor specific IO commands 2062to return command specific completion info back to the initiator. 2063 2064Added `spdk_bdev_get_write_unit_size()` function for retrieving required number 2065of logical blocks for write operation. 2066 2067New zone-related fields were added to the result of the `get_bdevs` RPC call: 2068 2069- `zoned`: indicates whether the device is zoned or a regular 2070 block device 2071- `zone_size`: number of blocks in a single zone 2072- `max_open_zones`: maximum number of open zones 2073- `optimal_open_zones`: optimal number of open zones 2074 2075The `zoned` field is a boolean and is always present, while the rest is only available for zoned 2076bdevs. 2077 2078A new `spdk_bdev_open_ext` function has been added and `spdk_bdev_open` function has been deprecated. 2079The new open function introduces requirement to provide callback function that will be called by 2080asynchronous event such as bdev removal. `spdk_bdev_open_ext` function takes bdev name as 2081an argument instead of bdev structure to avoid a race condition that can happen when the bdev 2082is being removed between a call to get its structure based on a name and actually opening it. 2083 2084New 'resize' event has been added to notify about change of block count property of block device. 2085Event is delivered only if block device was opened with `spdk_bdev_open_ext` function. 2086 2087### bdev zone 2088 2089Added new public header for zoned bdev. Zoned bdev is an extension 2090of the bdev interface. 2091 2092`spdk_bdev_get_zone_size()`, `spdk_bdev_get_max_open_zones()`, `spdk_bdev_get_optimal_open_zones()` 2093APIs were added for retrieving zoned device information. 2094`spdk_bdev_get_zone_info()` API was added for retrieving information about zones in zoned 2095device. 2096Added `spdk_bdev_zone_management()` API for changing zone state. 2097`spdk_bdev_zone_append()` and `spdk_bdev_zone_append_with_md()` APIs were added for 2098appending data to a zone. 2099Added `spdk_bdev_io_get_append location()` function for retrieving append location for I/O. 2100Added `spdk_bdev_is_zoned()` function for checking if bdev supports zoned namespace semantics. 2101 2102### bdev opal 2103 2104EXPERIMENTAL: A new opal bdev has been added to support management of 2105NVMe self-encrypting drives through the Opal specification. Users can 2106create opal bdevs from an NVMe namespace bdev, if the controller 2107containing that namespace supports Opal. Currently this is only 2108supported for namespace ID=1. The following RPCs have been added to 2109support Opal: `bdev_nvme_opal_init`, `bdev_nvme_opal_revert`, 2110`bdev_opal_create`, `bdev_opal_delete`, `bdev_opal_get_info`, 2111`bdev_opal_new_user`, `bdev_opal_set_lock_state`. 2112It does not yet support recreating the opal bdevs after application restart. 2113This bdev module should be considered very experimental, and the RPCs may 2114change significantly in future releases. 2115 2116### delay bdev 2117 2118The `bdev_delay_update_latency` has been added to allow users to update 2119a latency value for a given delay bdev. 2120 2121### compress bdev 2122 2123A new RPC `bdev_compress_get_orphans` has been added to list compress bdevs 2124that were not loaded due to a missing pm metadata file. In this state they 2125can only be deleted. 2126 2127### null bdev 2128 2129Metadata support has been added to Null bdev module. 2130 2131Protection information support has been added to Null bdev module. 2132 2133### nvme 2134 2135Added `no_shn_notification` to NVMe controller initialization options, users can enable 2136it for NVMe controllers. When the option is enabled, the controller will not do the 2137shutdown process and just disable the controller, users can start their application 2138later again to initialize the controller to the ready state. 2139 2140A controller flag `SPDK_NVME_CTRLR_WRR_SUPPORTED` was added to indicate the controller 2141can support weighted round robin arbitration feature with submission queue. 2142 2143Added `arbitration_burst` option for arbitration feature, and added three 2144`low/medium/high_priority_weight` options for weighted round robin arbitration. 2145 2146Added `spdk_nvme_ns_cmd_write_uncorrectable`. 2147 2148Added new error handling and reporting functionality. This includes several 2149new API functions to facilitate applications recovering when a qpair or 2150controller fails. 2151 2152`spdk_nvme_ctrlr_reconnect_io_qpair` - Reconnects a failed I/O qpair. 2153`spdk_nvme_ctrlr_set_trid` - Sets the trid of an existing controller. Can be used to 2154change the trid for failover cases. 2155`spdk_nvme_ctrlr_is_failed` - Returns the failed state of a controller. 2156`spdk_nvme_ctrlr_fail` - Forces a controller into a failed state. 2157 2158Modified the return behavior of several API functions to better indicate to 2159applications when a qpair is failed. This list of functions includes: 2160 2161`spdk_nvme_qpair_process_completions` 2162`spdk_nvme_ns_cmd_*` 2163`spdk_nvme_ctrlr_process_admin_completions` 2164`spdk_nvme_ctrlr_cmd_*` 2165 2166These functions now return -ENXIO when the qpair or controller on which they 2167operate is failed. 2168 2169EXPERIMENTAL: Added NVMe character device support to allow to create NVMe device nodes in Linux 2170kernel for controller as well as for namespace and process ioctl requests as usual 2171from linux environment. 2172 2173### nvmf 2174 2175The `spdk_nvmf_tgt_create` function now accepts an object of type `spdk_nvmf_target_opts` 2176as its only parameter. This new structure contains the max_subsystems parameter previously 2177passed into that function. 2178 2179A new public API function `spdk_nvmf_get_tgt` has been added which allows users to 2180retrieve a pointer to an `spdk_nvmf_tgt` object by supplying its name. In the special 2181case where an RPC or application only creates a single target, this function can accept 2182a null name parameter and will return the only available target. 2183 2184The majority of the NVMe-oF RPCs now accept an optional tgt_name parameter. This will 2185allow those RPCs to work with applications that create more than one target. 2186 2187Three new NVMe-oF RPCs have been added `nvmf_create_target`, `nvmf_delete_target`, and 2188`nvmf_get_targets`. These new RPCs provide a basic interface for managing multiple target 2189objects. In SPDK the target object defines a unique discovery service. As of this release, 2190these RPCs are not intended to be used with the in-tree SPDK target applications, spdk_tgt and 2191nvmf_tgt, which use a single, global target structure. As such, they are not included in scripts/rpc.py 2192 2193Three new header functions have also been added to help deal with multiple targets. 2194`spdk_nvmf_tgt_get_name` takes a target pointer as an argument and returns its human readable name. 2195`spdk_nvmf_get_first_target` takes no arguments and returns the first target in the global list. 2196`spdk_nvmf_get_next_tgt` takes a target pointer as an argument and returns the next one in the global list. 2197 2198The `spdk_nvmf_tgt_accept` takes additional argument allowing to pass arbitrary context 2199information to the `new_qpair` callback. This will simplify the code when having multiple 2200nvmf targets or when retrieving the context information from globals is not suitable. 2201 2202### blobstore 2203 2204A new `spdk_bdev_create_bs_dev_from_desc` function has been added and `spdk_bdev_create_bs_dev` 2205function has been deprecated. 2206The new create function can cowork with `spdk_bdev_open_ext` function, which provides callback 2207function that will be called by asynchronous event such as bdev removal. 2208 2209### blobfs_bdev 2210 2211A new blobfs module `bdev` has been added to simplify the operations of blobfs on bdev. 2212 2213Function `spdk_blobfs_bdev_detect` is added to detect whether blobfs exists on the given block device. 2214 2215Function `spdk_blobfs_bdev_create` is added to create a blobfs on the given block device. 2216 2217Function `spdk_blobfs_bdev_mount` is added to mount a blobfs on the given block device to 2218a host path by FUSE. Then, a new thread is created dedicatedly for one mountpoint to handle 2219FUSE request by blobfs API. 2220 2221### build 2222 2223Option to build FUSE components into blobfs_bdev module for mounting a blobfs filesystem. 2224It requires the installation of libfuse3. By default, it is disabled. And it will be 2225enabled if run `./configure` with `--with-fuse` option. 2226 2227### iSCSI 2228 2229Portals may no longer be associated with a cpumask. The scheduling of 2230connections is moving to a more dynamic model. 2231 2232An new RPC `iscsi_portal_group_set_auth` has been added to set CHAP authentication 2233for discovery sessions specific for the existing iSCSI portal group. This RPC overwrites 2234the setting by the global parameters for the iSCSI portal group. 2235 2236### socket 2237 2238Added `spdk_sock_is_connected` to check whether the socket is currently connected. 2239`spdk_sock_group_poll` now returns number of events on success. 2240 2241### env 2242 2243Added `spdk_pci_device_unclaim()` function to cleanup pci claim file. 2244 2245### event 2246 2247`framework_start_init` RPC no longer stops the application on error during 2248initialization. 2249 2250### DPDK 2251 2252Updated DPDK submodule to DPDK 19.08. 2253 2254### ocf 2255 2256Updated OCF submodule to OCF v19.06 2257 2258Along with update, new cache mode 'write only' was added. 2259 2260New cache modes added to use via RPC, wi - write invalidate and wa - write around. 2261 2262New version of OCF provides fully asynchronous management API. 2263 2264## v19.07: NVMe-oF FC Transport, VMD, NVMe-oF Persistent reservations, Bdev I/O with separate metadata 2265 2266### ftl 2267 2268EXPERIMENTAL: Added ability to mirror writes to persistent write buffer cache 2269to allow for recovery from dirty shutdown event. 2270 2271Added handling of Asynchronous Nand Management Events (ANM). 2272 2273### vmd 2274 2275EXPERIMENTAL: Added Intel Volume Management Device (VMD) driver. VMD is an integrated 2276controller inside the CPU PCIe root complex. It enables virtual HBAs for the connected 2277NVMe SSDs. `spdk_vmd_init()` enumerates NVMe SSDs behind VMD device and hook them into 2278SPDK PCI subsystem. `spdk_nvme_probe()` or `spdk_nvme_connect()` can be used to connect 2279NVMe driver to the device located at the given transport ID. 2280 2281To obtain transport ID of NVMe SSD behind VMD `spdk_lspci` can be used. 2282 2283Current implementation does not support hotplug. 2284 2285### blobfs 2286 2287Blobfs file asynchronous operations were added to public APIs. 2288 2289### util 2290 2291A new file API `spdk_posix_file_load` was added to load file content into a data buffer. 2292 2293New APIs `spdk_dif_ctx_set_data_offset`, `spdk_dif_verify_stream`, 2294`spdk_dif_get_range_with_md`, `spdk_dif_get_length_with_md` have been added, 2295and existing APIs `spdk_dif_ctx_init`, `spdk_dif_set_md_interleave_iovs`, and 2296`spdk_dif_generate_stream` have been refined to insert or strip DIF into iovs 2297windows of any alignment. 2298 2299New APIs `spdk_dif_ctx_set_remapped_init_ref_tag`, `spdk_dif_remap_ref_tag`, 2300and `spdk_dix_remap_ref_tag` have been added to remap DIF reference tag. 2301 2302New APIs `spdk_dif_update_crc32c` and `spdk_dif_update_crc32c_stream` have been 2303added to compute CRC-32C checksum for extended LBA payload. 2304 2305Bdevperf and bdevio applications now support starting tests with application specific 2306RPCs. Please see helper Python scripts in their respective directories. 2307This is a move towards simpler RPC-only configuration for all main 2308and auxiliary applications. 2309 2310Legacy INI style configuration for SPDK applications will become deprecated in SPDK 19.10, 2311and removed in SPDK 20.01. Please consider moving to JSON-RPC configuration files and/or 2312RPC driven run-time configuration. 2313 2314### nvmf 2315 2316EXPERIMENTAL: A Fibre Channel transport that supports Broadcom HBAs has been 2317added. This depends on the FC HBA driver at 2318https://github.com/ecdufcdrvr/bcmufctdrvr. See [the documentation](https://spdk.io/doc/nvmf.html#nvmf_fc_transport) 2319for more information. 2320 2321Persistent reservation emulation has been added to the NVMe-oF target. Persistent reservation 2322state is stored in a JSON file on the local filesystem between target restart. To support this, 2323an optional parameter to the RPC method `nvmf_subsystem_add_ns` called `--ptpl-file` was added. 2324This allows the user to specify which file to store the persistent reservation state in. Note 2325that this is done per namespace. 2326 2327The c2h success optimization under which a command capsule response is not sent 2328for reads is turned on by default. A config knob was added to allow disabling 2329the optimization. This will mostly be used for integration testing with 5.0.x kernels 2330while some compatibility fixes make their way down the pipeline for 5.1.x kernels. 2331 2332The sock priority setting of the TCP connection owned by the tcp transport is added. It is 2333used to optimize the TCP connection performance under designated traffic classes. And the 2334priority is used to differentiate the sock priority between SPDK NVMe-oF TCP target application 2335and other TCP based applications. 2336 2337Shared receive queue can now be disabled even for NICs that support it using the 2338`nvmf_create_transport` RPC method parameter `no_srq`. The actual use of a shared 2339receive queue is predicated on hardware support when this flag is not used. 2340 2341spdk_nvmf_get_optimal_poll_group was added, which is used to return the optimal 2342poll group for the qpair. And `ConnectionScheduler` configuration is added into the 2343[Nvmf] section in etc/spdk/nvmf.conf.in to demonstrate how to configure the connection 2344scheduling strategy among different spdk threads. 2345 2346Added infrastructure to retrieve global and per poll group NVMf statistics. 2347 2348DIF strip and insert is now supported for TCP transport. When it is enabled, DIF 2349setting is not exposed to the NVMe-oF initiator, and DIF is attached into data 2350for write I/O and stripped from data for read I/O. 2351 2352Added a field `dif_insert_or_strip` to struct spdk_nvmf_transport_opts, and 2353updated the related rpc function nvmf_create_transport to make this 2354configurable parameter available to users. The `dif_insert_or_strip` is relevant 2355for TCP transport for now and used to configure the DIF strip and insert. 2356 2357Added infrastructure to retrieve NVMf transport statistics. 2358 2359### notify 2360 2361The function `spdk_notify_get_types()` and `spdk_notify_get_events()` were 2362renamed to `spdk_notify_foreach_type()` and `spdk_notify_foreach_event()`, 2363respectively. And update type name of callback accordingly. 2364 2365### bdev 2366 2367The format of the data returned by the get_bdevs_iostat RPC has changed to 2368make it easier to parse. It now returns an object with a "ticks" object 2369and "bdevs" array with the per-bdev statistics. 2370 2371A new bdev module `delay` has been added which simulates a drive latency when placed 2372on top of a Null bdev. This module is intended only for testing and can be created using 2373the new RPC `bdev_delay_create`. That RPC takes the name of the underlying bdev as well 2374as average and p99 latency arguments for both read and write operations. Average latency is 2375defined as a value close to what you would expect a perf tool such as FIO to report back as 2376the mean latency of all I/O submitted to the drive. p99 latency is defined as the value one 2377would expect the drive to see the slowest 1% of I/O report. For underlying drives with already 2378significant latency, the latency values provided to the drive will be additive. This should be 2379taken into account if trying to achieve an artificial latency on top of an nvme drive or aio device. 2380 2381DIF reference tag remapping is now supported for partition type virtual bdev 2382modules. When using partition type virtual bdevs, block address space is 2383remapped during I/O processing and DIF reference tag is remapped accordingly. 2384 2385Added spdk_bdev_*_with_md() functions allowing for IO with metadata being transferred in 2386separate buffer. To check support for separate metadata, use spdk_bdev_is_md_separate(). 2387 2388All bdevs now have a UUID. For devices whose backing hardware does not provide a UUID, 2389one is automatically generated. Across runs of SPDK, bdevs whose UUID is automatically 2390generated may change. 2391 2392A new virtual bdev module `compress` has been added to provide compression services on top of 2393a thinly provisioned logical volume. See documentation for complete details. 2394 2395### nvme 2396 2397Added an optional parameter `--io-queue-requests` to RPC `set_bdev_nvme_options`, which 2398can be used to change the number of requests allocated for one NVMe I/O queue. For 2399very big I/O size, e.g. 128MiB, with this option user will not get an error due to 2400limited requests in NVMe driver layer. 2401 2402Added spdk_nvme_ctrlr_get_transport_id() to get the transport ID from a 2403previously attached controller. 2404 2405Nvme Opal library spdk_opal_cmd deprecated. Adding separate command APIs. 2406NVMe Opal library add support for activating locking SP which will make the transaction 2407from "Manufactured-Inactive" state to "Manufactured" state. Upon successfully invoking 2408of this method, lock and unlock features will be enabled. 2409NVMe Opal library add support for locking/unlocking range and list locking range info. 2410NVMe opal library add support for multiuser. Admin can enable user and add user to specific 2411locking range and the user can lock/unlock his range. 2412 2413Added spdk_nvme_ctrlr_io_cmd_raw_no_payload_build() allowing a caller to pass 2414a completely formed command to an NVMe submission queue (buffer addresses and all). 2415This is supported on the PCIe transport only. 2416 2417Added spdk_nvme_get_ctrlr_registers() to return a pointer to the virtual address 2418of the NVMe controller registers. This is supported on the PCIe transport only. 2419 2420Added additional options to the spdk_nvme_ctrlr_alloc_qpair() option parameter 2421structure to allow caller to override the virtual and optionally physical address 2422of the submission and completion queue pair to be created. This is supported on 2423the PCIe transport only. 2424 2425Added `disable_error_logging` to struct spdk_nvme_ctrlr_opts, which disables 2426logging of failed requests. By default logging is enabled. 2427 2428Added spdk_nvme_qpair_print_command(), spdk_nvme_qpair_print_completion() and 2429spdk_nvme_cpl_get_status_string(). Allowing for easier display of error messages. 2430 2431Added support for NVMe Sanitize command. 2432 2433### env 2434 2435The parameter `free_space` has been added to spdk_ring_enqueue() to wait when 2436the ring is almost full and resume when there is enough space available in 2437the ring. 2438 2439A new API `spdk_mempool_lookup` has been added to lookup the memory pool created 2440by the primary process. 2441 2442Added spdk_pci_get_first_device() and spdk_pci_get_next_device() to allow 2443iterating over PCI devices detected by SPDK. Because of this, all SPDK APIs 2444to attach/detach PCI devices are no longer thread safe. They are now meant to 2445be called from only a single thread only, the same only that called spdk_env_init(). 2446This applies to the newly added APIs as well. 2447 2448### vpp 2449 2450SPDK now supports VPP version 19.04.2, up from VPP 18.01. 2451 2452VPP socket abstraction now uses VPP Session API, instead of VLC (VPP Communications Library). 2453This allows for better control over sessions and queues. 2454Please see VPP documentation for more details: 2455[VPP Host Stack](https://wiki.fd.io/view/VPP/HostStack) 2456 2457### sock 2458 2459Add spdk_sock_get_optimal_sock_group(), which returns the optimal sock group for 2460this socket. When a socket is created, it is often assigned to a sock group using 2461spdk_sock_group_add_sock so that a set of sockets can be polled more efficiently. 2462For some network devices, it is optimal to assign particular sockets to specific 2463sock groups. This API is intended to provide the user with that information. 2464 2465spdk_sock_group_get_ctx() was added to return the context of the spdk_sock_group. 2466spdk_sock_group_create() is updated to allow input the user provided ctx. 2467spdk_sock_set_priority() is added to set the priority of the socket. 2468 2469### rpc 2470 2471Added thread_get_stats RPC method to retrieve existing statistics. 2472 2473Added nvmf_get_stats RPC method to retrieve NVMf subsystem statistics. 2474 2475Response buffers for RPC requests are now always pre-allocated, which implies 2476that all spdk_jsonrpc_begin_result() calls always succeed and return a valid 2477buffer for JSON response. RPC calls no longer need to check if the buffer is 2478non-NULL. 2479 2480Added SPDK_RPC_REGISTER_ALIAS_DEPRECATED to help with deprecation process when 2481renaming existing RPC. First time a deprecated alias is used, it will print 2482a warning message. 2483 2484RPC `get_rpc_methods` was renamed `rpc_get_methods`. The old name is still usable, 2485but is now deprecated. 2486 2487### blobstore 2488 2489A snapshot can now be deleted if there is only a single clone on top of it. 2490 2491### build 2492 2493Preliminary support for cross compilation is now available. Targeting an older 2494CPU on the same architecture using your native compiler can be accomplished by 2495using the `--target-arch` option to `configure` as follows: 2496 2497~~~bash 2498./configure --target-arch=broadwell 2499~~~ 2500 2501Additionally, some support for cross-compiling to other architectures has been 2502added via the `--cross-prefix` argument to `configure`. To cross-compile, set CC 2503and CXX to the cross compilers, then run configure as follows: 2504 2505~~~bash 2506./configure --target-arch=aarm64 --cross-prefix=aarch64-linux-gnu 2507~~~ 2508 2509### vhost 2510 2511A security vulnerability has been identified and fixed in SPDK Vhost-SCSI target. 2512A malicious client (e.g. a virtual machine) could send a carefully prepared, 2513invalid I/O request to crash the entire SPDK process. All users of SPDK Vhost-SCSI 2514target are strongly recommended to update. All SPDK versions < 19.07 are affected. 2515 2516By default, SPDK will now rely on upstream DPDK's rte_vhost instead of its fork 2517located inside SPDK repo. The internal fork is still kept around to support older 2518DPDK versions, but is considered legacy and will be eventually removed. 2519 2520`configure` will now automatically use the upstream rte_vhost if the used DPDK 2521version is >= 19.05. 2522 2523spdk_vhost_init() is now asynchronous and accepts a completion callback. 2524 2525### iscsi target 2526 2527A security vulnerability has been identified and fixed in SPDK iSCSI target. 2528A malicious client (e.g. an iSCSI initiator) could send a carefully prepared, 2529invalid I/O request to crash the entire SPDK process. All users of SPDK iSCSI 2530target are strongly recommended to update. All SPDK versions < 19.07 are affected. 2531 2532### thread 2533 2534Exposed spdk_set_thread() in order for applications to associate 2535with SPDK thread when necessary. 2536 2537Added spdk_thread_destroy() to allow framework polling the thread to 2538release resources associated with that thread. 2539 2540## v19.04: Compression bdev, Notification library, NVMe Opal support 2541 2542### nvme 2543 2544Added asynchronous probe support. New APIs spdk_nvme_probe_async(), 2545spdk_nvme_connect_async() and spdk_nvme_probe_poll_async() were added to enable 2546this feature. spdk_nvme_probe_async() and spdk_nvme_connect_async() return a 2547context associated with the specified controllers. Users then call 2548spdk_nvme_probe_poll_async() until it returns 0, indicating that the operation 2549completed. 2550 2551A new qpair creation option, delay_pcie_doorbell, was added. This can be passed 2552to spdk_nvme_alloc_io_qpair(). This makes the I/O submission functions, such as 2553spdk_nvme_ns_writev(), skip ringing the submission queue doorbell. Instead the 2554doorbell will be rung as necessary inside spdk_nvme_qpair_process_completions(). 2555This can result in significantly fewer MMIO writes to the doorbell register 2556under heavy load, greatly improving performance. 2557 2558spdk_nvme_ctrlr_get_regs_cmbsz() was added to report the size of the controller 2559memory buffer, if available. 2560 2561spdk_nvme_ctrlr_get_flags() was added to return controller feature 2562flags. Two flags are currently tracked: 2563SPDK_NVME_CTRLR_SGL_SUPPORTED 2564SPDK_NVME_CTRLR_SECURITY_SEND_RECV_SUPPORTED 2565 2566The NVMe hotplug poller is now able to detach devices hot-removed from the system 2567via `/sys/bus/pci/devices/<bdf>/remove` and `/sys/bus/pci/devices/<bdf>/driver/unbind`. 2568 2569Opal support was added for scan, take ownership, revert TPer, and dumping device 2570info. The nvme_manage tool can be used to perform these operations. The public 2571API functions are spdk_nvme_ctrlr_security_receive() and 2572spdk_nvme_ctrlr_security_send(). This module should be considered experimental 2573pending additional features and tests. 2574 2575The NVMe-oF initiator is now able to transfer IO whose size is more than 128KiB 2576if the corresponding NVMe-oF target allows. 2577 2578### raid 2579 2580Added new strip_size_kb rpc param on create to replace the more ambiguous 2581strip_size. The strip_size rpc param is deprecated. 2582 2583Changed the raid bdev product_name from "Pooled Device" to "Raid Volume" 2584 2585### thread 2586 2587Added spdk_thread_has_pollers() function to verify if there are any registered 2588pollers to be run on the thread. Added spdk_thread_is_idle() function to check 2589if there are any scheduled operations to be performed on the thread at given 2590time. 2591 2592spdk_thread_create() now takes an optional CPU affinity mask that is passed to 2593the scheduler. 2594 2595spdk_thread_lib_init() now takes an optional context size. For each thread 2596created, an additional region of memory of this size will be allocated. A 2597pointer to this region of memory can be obtained by calling 2598spdk_thread_get_ctx(). The inverse operation is also available via 2599spdk_thread_get_from_ctx(). 2600 2601spdk_thread_poll() now optionally accepts the current time, in ticks. This can 2602be used to avoid some calls to spdk_get_ticks() internally. 2603 2604spdk_app_start() now only accepts a single context argument. 2605 2606### bdev 2607 2608An new API `spdk_bdev_get_data_block_size` has been added to get size of data 2609block except for metadata. 2610 2611spdk_vbdev_register() has been deprecated. spdk_bdev_register() should be used 2612instead. 2613 2614A mechanism for acquiring and releasing data buffers from bdev modules, used 2615to perform zero copy operations, was added. 2616 2617New APIs spdk_bdev_get_md_size(), spdk_bdev_is_md_interleaved(), spdk_bdev_get_dif_type(), 2618spdk_bdev_is_dif_head_of_md(), and spdk_bdev_is_dif_check_enabled() have been 2619added to get metadata and DIF settings. 2620 2621Bdevs claimed by the `examine_config` callback will be now further examined in the 2622`examine_disk` callback. 2623 2624spdk_bdev_io_get_io_channel() was added as a convenient way to get an io_channel 2625from a bdev_io. 2626 2627### ocf 2628 2629Updated OCF submodule to OCF v19.3.2 2630 2631Added support for many-to-one configuration for OCF bdev. 2632Multiple core devices can now be cached on single cache device. 2633 2634Added persistent metadata support, allowing to restore cache state after shutdown. 2635During start of SPDK application, the devices are examined and if OCF metadata 2636is present - appropriate OCF bdevs will be recreated. 2637 2638Added Write-Back mode support. In this mode, data is first written to 2639caching device and periodically synchronized to the core devices. 2640Dirty data is saved as persistent metadata on cache device, 2641allowing for safe restore during application restart. 2642For more details please see OCF documentation: 2643[OpenCAS cache configuration](https://open-cas.github.io/cache_configuration.html) 2644 2645### NVMe-oF Target 2646 2647Support for per-device shared receive queues in the RDMA transport has been added. 2648It is enabled by default for any device that supports it. 2649 2650The size of a shared receive queue is defined by transport configuration file parameter 2651`MaxSRQDepth` and `nvmf_create_transport` RPC method parameter `max_srq_depth`. 2652Default size is 4096. 2653 2654Add model number as parameter to construct_nvmf_subsystem (-d option), 2655rather than using hardcoded define. 2656 2657DIF passthrough feature has been added. DIF setting of the allocated bdevs is 2658exposed to the NVMe-oF initiator and data with DIF from the NVMe-oF initiator is 2659passed through to the allocated bdevs. 2660 2661### env 2662 2663The `phys_addr` parameter in spdk_malloc() and spdk_zmalloc() has been deprecated. 2664For retrieving physical addresses, spdk_vtophys() should be used instead. 2665 2666spdk_realloc() has been added to reallocate DMA/shared memory. 2667 2668spdk_pci_device_is_removed() has been added to let the upper-layer SPDK drivers know 2669that device has a pending external hotremove request. 2670 2671spdk_env_fini() and spdk_env_dpdk_post_fini() were added to release any resources 2672allocated by spdk_env_init() or spdk_env_dpdk_post_init() respectively. It is expected 2673that common usage of those functions is to call them just before terminating the process. 2674 2675Added spdk_iommu_is_enabled() to report if SPDK application is using IOMMU for DMA. 2676 2677### DPDK 2678 2679Dropped support for DPDK 17.07 and earlier, which SPDK won't even compile with right now. 2680 2681Updated DPDK submodule to DPDK 19.02. 2682 2683### rpc 2684 2685New `get_spdk_version` RPC method is introduced to get version info of the running SPDK application. 2686 2687The `start_nbd_disk` RPC method now take nbd_device as an optional parameter. If nbd_device 2688is specified, use that specified nbd device. If it's not specified, pick available one. 2689 2690### iSCSI target 2691 2692DIF strip and insert is now supported. DIF settings are not exposed to the iSCSI initiator. 2693DIF is attached into data for write I/O and stripped from data for read I/O. 2694 2695### vhost 2696 2697Added experimental support for running with the external, upstream rte_vhost library. 2698This can be enabled by configuring SPDK with an `--without-internal-vhost-lib` flag. 2699The minimum supported rte_vhost version (DPDK version) is 19.05-rc1. 2700 2701As a result of fuzz testing, a lot of data races in vhost-scsi LUN hotplug path were identified and 2702fixed. Those data races could have potentially resulted in SPDK crashes, RPC hangs, or memory leaks 2703if Vhost-SCSI LUN hotplug RPCs were executed while connected VMs were in the middle of restarting. 2704 2705The SCSI target id in `add_vhost_scsi_lun` RPC is now optional. If `-1` is passed, the first 2706unoccupied target id will be used. 2707 2708### AIO 2709 2710AIO bdev module can now reap I/O completions directly from userspace, significantly improving 2711the overall performance. 2712 2713### blobfs 2714 2715Synchronous IO operations no longer use spdk_io_channel, but instead use 2716spdk_fs_thread_ctx. The behavior is otherwise identical. 2717 2718### OCF 2719 2720Added support for caching multiple bdevs using a single bdev as a cache. 2721 2722### notify 2723 2724Added the notify library that provides a high performance local event bus 2725between libraries. Example usage was added to bdev module, which reports 2726notifications for added and removed bdevs via RPC. 2727 2728### sock 2729 2730Added new API spdk_sock_readv() to the sock library for performing vectored 2731reads. 2732 2733### event 2734 2735The function spdk_subsystem_init() no longer requires spdk_event as an argument. 2736 2737Changed API of spdk_subsystem_config_json() to no longer be asynchronous. 2738 2739### io_uring 2740 2741A bdev module that issues I/O to kernel block devices using the new io_uring Linux kernel 2742API was added. This module requires liburing. 2743 2744### build 2745 2746Options to easily compile with profile guided optimization have been added to 2747`configure`. To use profile guided optimization with SPDK, run 2748`./configure --with-pgo-capture`, build SPDK, then run a workload of your 2749choosing. Then, simply run `./configure --with-pgo-enable` and recompile to 2750build using the generated profile data. Profile guided optimization can yield 2751very large performance improvements, especially on GCC 8 and clang 7. This may 2752be combined with link time optimization which has been available under the 2753`--enable-lto` configure option for several releases. 2754 2755### compression bdev/reduce library 2756 2757Added "reduce" block compression scheme based on using SSDs for storing 2758compressed blocks of storage and persistent memory for metadata. Please see 2759[compression](https://spdk.io/doc/bdev.html) for more details. 2760 2761## v19.01: NVMe-oF TCP/IP Transport, Open Channel SSD Flash Translation Layer, Caching bdev based on OCF, ISA-L Support, DIF/DIX library 2762 2763### ocf bdev 2764 2765New virtual bdev module based on [Open CAS Framework](https://open-cas.github.io/) has been added. 2766This module allows for the use of one bdev to act as a high performance cache in front of another bdev. 2767Please see [documentation](https://spdk.io/doc/bdev.html#bdev_config_cas) for more details. 2768Only write through mode is currently supported and this feature is considered experimental. 2769 2770### event framework 2771 2772For `spdk_app_parse_args`, add return value to the callback which parses application 2773specific command line parameters to protect SPDK applications from crashing by invalid 2774values from user input. 2775 2776By default, all SPDK applications will now reserve all hugepages at runtime. The pre-reserved 2777memory size can be still set with `-s` or `--mem-size` option, although the default value 2778was reduced down to 0. 2779 2780A custom hugetlbfs directory can now be specified via spdk_app_opts. 2781This can be used to configure hugepages with different sizes, a different size limit, 2782or different access permissions than the system's default hugepage pool. 2783SPDK applications can specify a custom hugetlbfs mount with the `--huge-dir` option. 2784 2785### environment 2786 2787spdk_vtophys() has been refactored to accept length of the translated region as a new 2788parameter. The function will now update that parameter with the largest possible value 2789for which the memory is contiguous in the physical memory address space. 2790 2791The following functions were removed: 2792 2793- spdk_pci_nvme_device_attach() 2794- spdk_pci_nvme_enumerate() 2795- spdk_pci_ioat_device_attach() 2796- spdk_pci_ioat_enumerate() 2797- spdk_pci_virtio_device_attach() 2798- spdk_pci_virtio_enumerate() 2799 2800They were replaced with generic spdk_pci_device_attach() and spdk_pci_enumerate() which 2801require a new spdk_pci_driver object to be provided. It can be one of the following: 2802 2803- spdk_pci_nvme_get_driver() 2804- spdk_pci_ioat_get_driver() 2805- spdk_pci_virtio_get_driver() 2806 2807spdk_pci_hook_device() and spdk_pci_unhook_device() were added. Those allow adding a virtual 2808spdk_pci_device into the SPDK PCI subsystem. A virtual device calls provided callbacks for 2809each BAR mapping request or PCI config access. It's attachable with spdk_pci_device_attach() 2810or spdk_pci_enumerate() like any other device. 2811 2812A new spdk_pause() function was added to pause CPU execution for an implementation specific 2813amount of time. Quoting from DPDK function this is based on: "This call is intended for 2814tight loops which poll a shared resource or wait for an event. A short pause within the loop 2815may reduce the power consumption." 2816 2817A new public header file env_dpdk.h has been introduced, and function spdk_env_dpdk_post_init 2818is added into it. If user is using DPDK, and already called rte_eal_init, then include 2819include/spdk/env_dpdk.h, and call spdk_env_dpdk_post_init() instead of spdk_env_init. 2820 2821ISA-L has been added as an SPDK submodule. ISA-L is enabled by default on x86 architecture 2822to accelerate algorithms such as CRC for iSCSI and NVMe-oF. Users may still disable ISA-L 2823by explicitly passing --without-isal to the configure script. 2824 2825### util 2826 2827A new uuid API `spdk_uuid_copy` was added to make a copy of the source uuid. 2828 2829An new parameter `init_crc` representing the initial CRC value was added to 2830`spdk_crc16_t10dif`. The parameter can be used to calculate a CRC value spanning 2831multiple separate buffers. 2832 2833New DIF APIs were added to generate and verify DIF by byte granularity for both DIF and DIX 2834formats. Among them, DIF with copy APIs will be usable to emulate DIF operations such as DIF 2835insert and strip. 2836 2837Added `spdk_strtol` and `spdk_strtoll` to provide additional error checking around `strtol` 2838and `strtoll`. 2839 2840Added `spdk_sprintf_append_realloc` and `spdk_vsprintf_append_realloc` for appending a string 2841with automatic buffer re-allocation. 2842 2843### nvme 2844 2845Wrapper functions spdk_nvme_ctrlr_security_send() and spdk_nvme_ctrlr_security_receive() are 2846introduced to support further security protocol development. 2847 2848admin_timeout_ms was added to NVMe controller initialization options, users 2849can change the default value when probing a controller. 2850 2851Add two new fields "header_digest" and "data_digest" in struct spdk_nvme_ctrlr_opts, 2852it will be used to enable the digest support for the NVMe/TCP transport. 2853 2854Add a new TCP/IP transport(located in lib/nvme/nvme_tcp.c) in nvme driver. With 2855this new transport, it can be used to connect the NVMe-oF target with the 2856same TCP/IP support. 2857 2858Added API, spdk_nvme_ctrlr_is_discovery(), to indicate whether the ctrlr 2859arg refers to a Discovery Controller or not. 2860 2861Added an API function `spdk_nvme_host_id_parse` and corresponding object `spdk_nvme_host_id` 2862for parsing host address and host service ID arguments on a per connection basis. 2863 2864The RPC `construct_nvme_bdev` now allows a user to specify a source address and service id for the host to 2865use when connecting to the controller backing the NVMe bdev. 2866 2867### NVMe-oF Target 2868 2869The `spdk_nvmf_tgt_opts` struct has been deprecated in favor of `spdk_nvmf_transport_opts`. 2870Users will no longer be able to specify target wide I/O parameters. `spdk_nvmf_tgt_listen` 2871will also no longer implicitly initialize a transport with the default target options (since 2872there are none). Instead, a user must manually instantiate the transport with `spdk_nvmf_transport_create` 2873prior to calling `spdk_nvmf_tgt_listen`. 2874 2875Related to the previous change, the rpc `set_nvmf_target_options` has been renamed to 2876`set_nvmf_target_max_subsystems` to indicate that this is the only target option available for the user to edit. 2877 2878Added fields `num_shared_buffers` and `buf_cache_size` in struct spdk_nvmf_transport_opts, 2879and also updated the related rpc function nvmf_create_transport, to make this 2880configurable parameter available to users. The `num_shared_buffers` is used to 2881configure the shared buffer numbers of the transport used by RDMA or TCP transport. 2882`buf_cache_size` configures number of shared buffers to cache per poll group. 2883 2884### nvmf 2885 2886Add a new TCP/IP transport (located in lib/nvmf/tcp.c). With this transport, 2887the SPDK NVMe-oF target can have a new transport, and can serve the NVMe-oF 2888protocol via TCP/IP from the host. 2889 2890Added optional mechanism to modify the RDMA transport's behavior when creating protection domains and registering memory. 2891By default, the RDMA transport will use the ibverbs library to create protection domains and register memory. 2892Using `spdk_nvme_rdma_init_hooks` will subvert that and use an existing registration. 2893 2894### bdev 2895 2896Added `enable_bdev_histogram` and `get_bdev_histogram` RPC commands to allow gathering latency data for specified bdev. 2897Please see [documentation](https://spdk.io/doc/bdev.html#rpc_bdev_histogram) for more details. 2898 2899Added `required_alignment` field to `spdk_bdev`, that specifies an alignment requirement for data buffers associated with an spdk_bdev_io. 2900Bdev layer will automatically double buffer any spdk_bdev_io that violates this alignment, before the spdk_bdev_io is submitted to the bdev module. 2901 2902On shutdown, bdev unregister now proceeds in top-down fashion, with 2903claimed bdevs skipped (these will be unregistered later, when virtual 2904bdev built on top of the respective base bdev unclaims it). This 2905allows virtual bdevs to be shut down cleanly as opposed to the 2906previous behavior that didn't differentiate between hotremove and 2907planned shutdown. 2908 2909The `delete_bdev` RPC is now deprecated. Users should instead use the specific deletion RPC 2910for the bdev type to be removed (i.e. delete_malloc_bdev). 2911 2912Added support for separate bandwidth rate limits for read and write to QoS in bdev layer. 2913 2914Bdev I/O statistics now track unmap operations. 2915 2916### logical volumes 2917 2918Logical volume bdev can now be marked as read only using `set_read_only_lvol_bdev` RPC. 2919This allows for basing clones on top of lvol_bdev without first creating a snapshot. 2920 2921Added option to change method for data erasure when deleting lvol or resizing down. 2922Default of unmapping clusters can now be changed to writing zeroes or no operation. 2923 2924Added option to change method for erasing data region on lvol store creation. 2925Default of unmapping can now be changed to writing zeroes or no operation. 2926 2927### log 2928 2929"trace flags" are now referred to as "log flags" in the SPDK log API. The 2930set_trace_flag, clear_trace_flag and get_trace_flags RPCs are now deprecated, 2931and set_log_flag, clear_log_flag and get_log_flags RPCs have been added. 2932 2933### trace 2934 2935New `trace_record` application was added. It can be used to poll spdk trace shm file and 2936append any new trace entries into another specified file. This can help retain those entries 2937that would otherwise be overwritten in the shm file. See 2938[Capturing sufficient trace events](https://spdk.io/doc/nvmf_tgt_tracepoints.html#capture_trace_events) 2939for more details. 2940 2941Number of trace entries in circular buffer per lcore can now be assigned by starting SPDK app 2942with argument "--num-trace-entries <NUM>" provided. 2943 2944New `get_tpoint_group_mask` RPC was added to get current tpoint_group_mask, and 2945each tpoint group status. 2946New `enable_tpoint_group` and `disable_tpoint_group` RPC were added to enable or 2947disable a specific tpoint group. 2948 2949### ftl 2950 2951EXPERIMENTAL: Added basic flash translation layer module allowing for using Open Channel SSDs as 2952block devices. The module is split into the library (located in lib/ftl) and bdev_ftl 2953(lib/bdev/ftl). See the [documentation](https://spdk.io/doc/ftl.html) for more details. 2954 2955### vhost 2956 2957A security vulnerability has been identified and fixed in the SPDK vhost target. A malicious 2958vhost client (i.e. virtual machine) could carefully construct a circular descriptor chain which 2959would result in a partial denial of service in the SPDK vhost target. These types of descriptor 2960chains are now properly detected by the vhost target. All SPDK vhost users serving untrusted 2961vhost clients are strongly recommended to upgrade. (Reported by Dima Stepanov and Evgeny 2962Yakovlev.) 2963 2964Vhost SCSI and Vhost Block devices can now accept multiple connections on the same socket file. 2965Each connection (internally called a vhost session) will have access to the same storage, but 2966will use different virtqueues, different features and possibly different memory. 2967 2968### vhost scsi 2969 2970SCSI target hotremove can now be performed even without the VIRTIO_SCSI_F_HOTPLUG feature negotiated. 2971Regardless of VIRTIO_SCSI_F_HOTPLUG support, the hotremoval will be still reported through SCSI sense codes. 2972 2973### DPDK 2974 2975DPDK submodule was updated to DPDK 18.11. Note that SPDK does not fully leverage the new 2976multi-process device hotplug yet and continues to work the same way it always did. 2977 2978Dropped support for DPDK 16.07 and earlier, which SPDK won't even compile with right now. 2979 2980### RPC 2981 2982The following RPC commands deprecated in the previous release are now removed: 2983 2984- construct_virtio_user_scsi_bdev 2985- construct_virtio_pci_scsi_bdev 2986- construct_virtio_user_blk_bdev 2987- construct_virtio_pci_blk_bdev 2988- remove_virtio_scsi_bdev 2989- construct_nvmf_subsystem 2990 2991### Miscellaneous 2992 2993The configure options `--with-raid` and `--without-raid` that were deprecated in the previous 2994release are now removed. 2995 2996### nbd 2997 2998Starting nbd using `spdk_nbd_start` is now performed asynchronously. 2999 3000### net framework 3001 3002Net framework initialization and finish is now done asynchronously. 3003 3004### rpc 3005 3006Added `spdk_rpc_is_method_allowed` function for checking whether method is permitted in a given state. 3007Added `spdk_rpc_get_state` to check current state of RPC server. 3008RPC `wait_subsystem_init` has been added to allow clients to block until all subsystems are initialized. 3009 3010### json rpc 3011 3012JSON RPC client is now running in non-blocking mode. Requests are sent and received during spdk_jsonrpc_client_poll. 3013JSON RPC server can now receive a callback on connection termination or server shutdown using `spdk_jsonrpc_conn_add_close_cb` 3014and `spdk_jsonrpc_conn_del_close_cb`. 3015 3016## v18.10: Dynamic memory allocation, Crypto Virtual Bdev, jsonrpc-client, SPDKCLI iSCSI and NVMe-oF support 3017 3018### nvme 3019 3020spdk_nvme_ctrlr_cmd_security_send() and spdk_nvme_ctrlr_cmd_security_receive() 3021were added to support sending or receiving security protocol data to or from 3022nvme controller. 3023 3024spdk_nvme_ns_get_extended_sector_size() was added. This function includes 3025the metadata size per sector (if any). spdk_nvme_ns_get_sector_size() still 3026returns only the data size per sector, not including metadata. 3027 3028New `send_nvme_cmd` RPC was added to allow sending NVMe commands directly to NVMe controller. 3029See the [send_nvme_cmd](http://spdk.io/doc/jsonrpc.html#rpc_send_nvme_cmd) documentation 3030for more details. 3031 3032### Build System 3033 3034New `configure` options, `--with-shared` and `--without-shared` 3035[default], provide the capability to build, or not, SPDK shared libraries. 3036This includes the single SPDK shared lib encompassing all of the SPDK 3037static libs as well as individual SPDK shared libs corresponding to 3038each of the SPDK static ones. Although the production of the shared 3039libs conforms with conventional version naming practices, such naming 3040does not at this time confer any SPDK ABI compatibility claims. 3041 3042### bdev 3043 3044spdk_bdev_alias_del_all() was added to delete all alias from block device. 3045 3046A new virtual bdev module has been added to perform at rest data encryption using the DPDK CryptoDev 3047Framework. The module initially uses a software AESNI CBC cipher with experimental support for the 3048Intel QAT hardware accelerator also currently implemented with support for CBC cipher. Future work 3049may include additional ciphers as well as consideration for authentication. 3050 3051The RAID virtual bdev module is now always enabled by default. The configure --with-raid and 3052--without-raid options are now ignored and deprecated and will be removed in the next release. 3053 3054Enforcement of bandwidth limits for quality of service (QoS) has been added to the bdev layer. 3055See the new [set_bdev_qos_limit](http://www.spdk.io/doc/jsonrpc.html#rpc_set_bdev_qos_limit) 3056documentation for more details. The previous set_bdev_qos_limit_iops RPC method introduced at 305718.04 release has been deprecated. The new set_bdev_qos_limit RPC method can support both 3058bandwidth and IOPS limits. 3059 3060spdk_bdev_config_json() and corresponding `get_bdevs_config` RPC was removed. 3061 3062### Environment Abstraction Layer and Event Framework 3063 3064The size parameter of spdk_mem_map_translate is now a pointer. This allows the 3065function to report back the actual size of the translation relative to the original 3066request made by the user. 3067 3068A new structure spdk_mem_map_ops has been introduced to hold memory map related 3069callbacks. This structure is now passed as the second argument of spdk_mem_map_alloc 3070in lieu of the notify callback. 3071 3072### DPDK 18.08 3073 3074The DPDK submodule has been updated to the DPDK 18.08 release. SPDK will now automatically 3075utilize DPDK's dynamic memory management with DPDK versions >= 18.05.1. 3076 3077Hugepages can be still reserved with `[-s|--mem-size <size>]` option at application startup, 3078but once we use them all up, instead of failing user allocations with -ENOMEM, we'll try 3079to dynamically reserve even more. This allows starting SPDK with `--mem-size 0` and using 3080only as many hugepages as it is really needed. 3081 3082Due to this change, the memory buffers returned by `spdk_*malloc()` are no longer guaranteed 3083to be physically contiguous. 3084 3085### I/OAT 3086 3087I/OAT driver can now reinitialize I/OAT channels after encountering DMA errors. 3088 3089### iscsi target 3090 3091Parameter names of `set_iscsi_options` and `get_iscsi_global_params` RPC 3092method for CHAP authentication in discovery sessions have been changed to 3093align with `construct_target_node` RPC method. Old names are still usable 3094but will be removed in future release. 3095 3096`set_iscsi_discovery_auth` and `set_iscsi_target_node_auth` RPC methods have 3097been added to set CHAP authentication for discovery sessions and existing 3098target nodes, respectively. 3099 3100The SPDK iSCSI target supports an AuthFile which can be used to load CHAP 3101shared secrets when the iSCSI target starts. SPDK previously provided a 3102default location for this file (`/usr/local/etc/spdk/auth.conf`) if none was 3103specified. This default has been removed. Users must now explicitly specify 3104the location of this file to load CHAP shared secrets from a file, or use 3105the related iSCSI RPC methods to add them at runtime. 3106 3107### iscsi initiator 3108 3109The SPDK iSCSI initiator is no longer considered experimental and becomes 3110a first-class citizen among bdev modules. The basic usage has been briefly 3111described in the bdev user guide: [iSCSI bdev](https://spdk.io/doc/bdev.html#bdev_config_iscsi) 3112 3113### Miscellaneous 3114 3115The SPDK application framework can now parse long name command line parameters. 3116Most single-character parameters have a long name equivalent now. See the 3117[Command Line Parameters](https://spdk.io/doc/app_overview.html) documentation 3118for details or use the `--help` command line parameter to list all available 3119params. 3120 3121bdevperf `-s` param (io size) was renamed to `-o` as `-s` had been already 3122used by existing apps for memory size. 3123 3124bdevio can now accept all SPDK command line parameters. The config now has to 3125be provided with `-c` or `--config` param. 3126 3127The following ioat/perf and nvme/perf parameters were renamed as well: 3128 `-s` (io size) to `-o` 3129 `-d` (mem size) to `-s` 3130 3131The ReactorMask config file parameter has been deprecated. Users should 3132use the -m or --cpumask command line option to specify the CPU core mask 3133for the application. 3134 3135Default config file pathnames have been removed from iscsi_tgt, nvmf_tgt 3136and vhost. Config file pathnames may now only be specified using the 3137-c command line option. 3138 3139Users may no longer set DPDK_DIR in their environment to specify the 3140location of the DPDK installation used to build SPDK. Using DPDK_DIR 3141has not been the documented nor recommended way to specify the DPDK 3142location for several releases, but removing it ensures no unexpected 3143surprises for users who may have DPDK_DIR defined for other reasons. 3144Users should just use the "configure" script to specify the DPDK 3145location before building SPDK. 3146 3147Although we know that many developers still use Python 2 we are officially 3148switching to Python3 with requirement that all new code must be valid also 3149for Python 2 up to the EOL which is year 2020. 3150 3151Invoking interpreter explicitly is forbidden for executable scripts. There 3152is no need to use syntax like "python ./scripts/rpc.py". All executable 3153scripts must contain proper shebang pointing to the right interpreter. 3154Scripts without shebang mustn't be executable. 3155 3156A Python script has been added to enable conversion of old INI config file 3157to new JSON-RPC config file format. This script can be found at 3158scripts/config_converter.py. Example how this script can be used: 3159~~~{.sh} 3160cat old_format.ini | scripts/config_converter.py > new_json_format.json 3161~~~ 3162 3163### Sock 3164 3165Two additional parameters were added to spdk_sock_get_addr() for the server 3166port and client port. These parameters are named "sport" and "cport" 3167respectively. 3168 3169### Virtio 3170 3171The following RPC commands have been deprecated: 3172 3173- construct_virtio_user_scsi_bdev 3174- construct_virtio_pci_scsi_bdev 3175- construct_virtio_user_blk_bdev 3176- construct_virtio_pci_blk_bdev 3177- remove_virtio_scsi_bdev 3178 3179The `construct_virtio_*` ones were replaced with a single `construct_virtio_dev` 3180command that can create any type of Virtio bdev(s). `remove_virtio_scsi_bdev` 3181was replaced with `remove_virtio_bdev` that can delete both Virtio Block and SCSI 3182devices. 3183 3184### Blobfs 3185 3186spdk_file_get_id() returning unique ID for the file was added. 3187 3188### JSON 3189 3190Added jsonrpc-client C library intended for issuing RPC commands from applications. 3191 3192Added API enabling iteration over JSON object: 3193 3194- spdk_json_find() 3195- spdk_json_find_string() 3196- spdk_json_find_array() 3197- spdk_json_object_first() 3198- spdk_json_array_first() 3199- spdk_json_next() 3200 3201### Blobstore 3202 3203Blobstore I/O operations are now based on io_units, instead of blobstore page size. 3204The io_unit size is now the same as the underlying block device's block size. 3205Logical volumes built on a block device with 512B block size can now be used as boot devices 3206in QEMU. 3207 3208### SPDKCLI 3209 3210The SPDKCLI interactive command tool for managing SPDK is no longer considered experimental. 3211Support for the iSCSI and NVMe-oF targets has been added. 3212 3213## v18.07: Raid, Infrastructure Improvements, Bug Fixes 3214 3215### bdev 3216 3217A new public header file bdev_module.h has been introduced to facilitate the 3218development of new bdev modules. This header includes an interface for the 3219spdk_bdev_part and spdk_bdev_part_base objects to enable the creation of 3220multiple virtual bdevs on top of a single base bdev and should act as the 3221primary API for module authors. 3222 3223spdk_bdev_get_opts() and spdk_bdev_set_opts() were added to set bdev-wide 3224options. 3225 3226A mechanism for handling out of memory condition errors (ENOMEM) returned from 3227I/O submission requests at the bdev layer has been added. See 3228spdk_bdev_queue_io_wait(). 3229 3230The spdk_bdev_get_io_stat() function now returns cumulative totals instead of 3231resetting on each call. This allows multiple callers to query I/O statistics 3232without conflicting with each other. Existing users will need to adjust their 3233code to record the previous I/O statistics to calculate the delta between calls. 3234 3235I/O queue depth tracking and samples options have been added. See 3236spdk_bdev_get_qd(), spdk_bdev_get_qd_sampling_period(), and 3237spdk_bdev_set_qd_sampling_period(). 3238 3239### RAID module 3240 3241A new bdev module called "raid" has been added as experimental module which 3242aggregates underlying NVMe bdevs and exposes a single raid bdev. Please note 3243that vhost will not work with this module because it does not yet have support 3244for multi-element io vectors. 3245 3246### Log 3247 3248The debug log component flag available on several SPDK applications has been 3249renamed from `-t` to `-L` to prevent confusion with tracepoints and to allow the 3250option to be added to tools that already use `-t` to mean something else. 3251 3252### Blobstore 3253 3254A new function, spdk_bs_dump(), has been added that dumps all of the contents of 3255a blobstore to a file pointer. This includes the metadata and is very useful for 3256debugging. 3257 3258Two new operations have been added for thin-provisioned blobs. 3259spdk_bs_inflate_blob() will allocate clusters for all thinly provisioned regions 3260of the blob and populate them with the correct data by reading from the backing 3261blob(s). spdk_bs_blob_decouple_parent() works similarly, but will only allocate 3262clusters that correspond to data in the blob's immediate parent. Clusters 3263allocated to grandparents or that aren't allocated at all will remain 3264thin-provisioned. 3265 3266### BlobFS 3267 3268Changed the return type of spdk_file_truncate() from void to int to allow the 3269propagation of `ENOMEM` errors. 3270 3271### NVMe Driver 3272 3273The new API functions spdk_nvme_qpair_add_cmd_error_injection() and 3274spdk_nvme_qpair_remove_cmd_error_injection() have been added for NVMe error 3275emulation. Users can set a specified command to fail with a particular error 3276status. 3277 3278Changed the name `timeout_sec` parameter to `timeout_us` in 3279spdk_nvme_ctrlr_register_timeout_callback(), and also changed the type from 3280uint32_t to uint64_t. This will give users more fine-grained control over the 3281timeout period. 3282 3283Basic support for Open Channel SSDs was added. See nvme_ocssd.h 3284 3285### NVMe Over Fabrics 3286 3287The spdk_nvmf_tgt_destroy() function is now asynchronous and takes a callback 3288as a parameter. 3289 3290spdk_nvmf_qpair_disconnect() was added to allow the user to disconnect qpairs. 3291 3292spdk_nvmf_subsystem_get_max_namespaces() was added to query the maximum allowed 3293number of namespaces for a given subsystem. 3294 3295### Build System 3296 3297The build system now generates a combined shared library (libspdk.so) that may 3298be used in place of the individual static libraries (libspdk_*.a). The combined 3299library includes all components of SPDK and is intended to make linking against 3300SPDK easier. The static libraries are also still provided for users that prefer 3301to link only the minimal set of components required. 3302 3303### git pre-commit and pre-push hooks 3304 3305The pre-commit hook will run `scripts/check_format.sh` and verify there are no 3306formatting errors before allowing `git commit` to run. The pre-push hook runs 3307`make CONFIG_WERROR=y` with and without `CONFIG_DEBUG=y` using both the gcc and 3308clang compiler before allowing `git push` to run. Following each DEBUG build 3309`test/unit/unittest.sh` is run and verified. Results are recorded in the 3310`make.log` file. 3311 3312To enable type: 'git config core.hooksPath .githooks'. To override after 3313configuration use the `git --no-verify` flag. 3314 3315### RPC 3316 3317The `start_nbd_disk` RPC method now returns the path to the kernel NBD device node 3318rather than always returning `true`. 3319 3320### DPDK 18.05 3321 3322The DPDK submodule has been rebased on the DPDK 18.05 release. DPDK 18.05 supports 3323dynamic memory allocation, but due to some issues found after the DPDK 18.05 release, 3324that support is not enabled for SPDK 18.07. Therefore, SPDK 18.07 will continue to use 3325the legacy memory allocation model. The plan is to enable dynamic memory allocation 3326after the DPDK 18.08 release which should fix these issues. 3327 3328### Environment Abstraction Layer and Event Framework 3329 3330The spdk_mem_map_translate() function now takes a size parameter to indicate the size of 3331the memory region. This can be used by environment implementations to validate the 3332requested translation. 3333 3334The I/O Channel implementation has been moved to its own library - lib/thread. The 3335public API that was previously in spdk/io_channel.h is now in spdk/thread.h The 3336file spdk/io_channel.h remains and includes spdk/thread.h. 3337 3338spdk_reactor_get_tsc_stats was added to return interesting statistics for each 3339reactor. 3340 3341### IOAT 3342 3343IOAT for copy engine is disabled by default. It can be enabled by specifying the Enable 3344option with "Yes" in `[Ioat]` section of the configuration file. The Disable option is 3345now deprecated and will be removed in a future release. 3346 3347## v18.04: Logical Volume Snapshot/Clone, iSCSI Initiator, Bdev QoS, VPP Userspace TCP/IP 3348 3349### vhost 3350 3351The SPDK vhost-scsi, vhost-blk and vhost-nvme applications have fixes to address the 3352DPDK rte_vhost vulnerability [CVE-2018-1059](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1059). 3353Please see this [security advisory](https://access.redhat.com/security/cve/cve-2018-1059) 3354for additional information on the DPDK vulnerability. 3355 3356Workarounds have been added to ensure vhost compatibility with QEMU 2.12. 3357 3358EXPERIMENTAL: Support for vhost-nvme has been added to the SPDK vhost target. See the 3359[vhost documentation](http://www.spdk.io/doc/vhost.html) for more details. 3360 3361### Unified Target Application 3362 3363A new unified SPDK target application, `spdk_tgt`, has been added. This application combines the 3364functionality of several existing SPDK applications, including the iSCSI target, NVMe-oF target, 3365and vhost target. The new application can be managed through the existing configuration file and 3366[JSON-RPC](http://www.spdk.io/doc/jsonrpc.html) methods. 3367 3368### Env 3369 3370spdk_mempool_get_bulk() has been added to wrap DPDK rte_mempool_get_bulk(). 3371 3372New memory management functions spdk_malloc(), spdk_zmalloc(), and spdk_free() have been added. 3373These new functions have a `flags` parameter that allows the user to specify whether the allocated 3374memory needs to be suitable for DMA and whether it should be shared across processes with the same 3375shm_id. The new functions are intended to replace spdk_dma_malloc() and related functions, which will 3376eventually be deprecated and removed. 3377 3378### Bdev 3379 3380A new optional bdev module interface function, `init_complete`, has been added to notify bdev modules 3381when the bdev subsystem initialization is complete. This may be useful for virtual bdevs that require 3382notification that the set of initialization examine() calls is complete. 3383 3384The bdev layer now allows modules to provide an optional per-bdev UUID, which can be retrieved with 3385the spdk_bdev_get_uuid() function. 3386 3387Enforcement of IOPS limits for quality of service (QoS) has been added to the bdev layer. See the 3388[set_bdev_qos_limit_iops](http://www.spdk.io/doc/jsonrpc.html#rpc_set_bdev_qos_limit_iops) documentation 3389for more details. 3390 3391### RPC 3392 3393The `[Rpc]` configuration file section, which was deprecated in v18.01, has been removed. 3394Users should switch to the `-r` command-line parameter instead. 3395 3396The JSON-RPC server implementation now allows up to 32 megabyte responses, growing as 3397needed; previously, the response was limited to 32 kilobytes. 3398 3399### SPDKCLI 3400 3401EXPERIMENTAL: New SPDKCLI interactive command tool for managing SPDK is available. 3402See the [SPDKCLI](http://www.spdk.io/doc/spdkcli.html) documentation for more details. 3403 3404### NVMe Driver 3405 3406EXPERIMENTAL: Support for WDS and RDS capable CMBs in NVMe controllers has been added. This support is 3407experimental pending a functional allocator to free and reallocate CMB buffers. 3408 3409spdk_nvme_ns_get_uuid() has been added to allow retrieval of per-namespace UUIDs when available. 3410 3411New API functions spdk_nvme_ctrlr_get_first_active_ns() and spdk_nvme_ctrlr_get_next_active_ns() 3412have been added to iterate active namespaces, as well as spdk_nvme_ctrlr_is_active_ns() to check if 3413a namespace ID is active. 3414 3415### NVMe-oF Target 3416 3417Namespaces may now be assigned unique identifiers via new optional `eui64` and `nguid` parameters 3418to the `nvmf_subsystem_add_ns` RPC method. Additionally, the NVMe-oF target automatically exposes 3419the backing bdev's UUID as the namespace UUID when available. 3420 3421spdk_nvmf_subsystem_remove_ns() is now asynchronous and requires a callback to indicate completion. 3422 3423### Blobstore 3424 3425A number of functions have been renamed: 3426 3427- spdk_bs_io_write_blob() => spdk_blob_io_write() 3428- spdk_bs_io_read_blob() => spdk_blob_io_read() 3429- spdk_bs_io_writev_blob() => spdk_blob_io_writev() 3430- spdk_bs_io_readv_blob() => spdk_blob_io_readv() 3431- spdk_bs_io_unmap_blob() => spdk_blob_io_unmap() 3432- spdk_bs_io_write_zeroes_blob() => spdk_blob_io_write_zeroes() 3433 3434The old names still exist but are deprecated. They will be removed in the v18.07 release. 3435 3436spdk_blob_resize() is now an asynchronous operation to enable resizing a blob while I/O 3437are in progress to that blob on other threads. An explicit spdk_blob_sync_md() is still 3438required to sync the updated metadata to disk. 3439 3440### Logical Volumes 3441 3442A new `destroy_lvol_bdev` RPC method to delete logical volumes has been added. 3443 3444Lvols now have their own UUIDs which replace previous LvolStoreUUID_BlobID combination. 3445 3446New Snapshot and Clone functionalities have been added. User may create Snapshots of existing Lvols 3447and Clones of existing Snapshots. 3448See the [lvol snapshots](http://www.spdk.io/doc/logical_volumes.html#lvol_snapshots) documentation 3449for more details. 3450 3451Resizing logical volumes is now supported via the `resize_lvol_bdev` RPC method. 3452 3453### Lib 3454 3455A set of changes were made in the SPDK's lib code altering 3456instances of calls to `exit()` and `abort()` to return a failure instead 3457wherever reasonably possible. 3458 3459spdk_app_start() no longer exit()'s on an internal failure, but 3460instead returns a non-zero error status. 3461 3462spdk_app_parse_args() no longer exit()'s on help, '-h', or an invalid 3463option, but instead returns SPDK_APP_PARSE_ARGS_HELP and 3464SPDK_APP_PARSE_ARGS_FAIL, respectively, and SPDK_APP_PARSE_ARGS_SUCCESS 3465on success. 3466 3467spdk_pci_get_device() has been deprecated and will be removed in SPDK v18.07. 3468 3469### I/O Channels 3470 3471The prototype for spdk_poller_fn() has been modified; it now returns a value indicating 3472whether or not the poller did any work. Existing pollers will need to be updated to 3473return a value. 3474 3475### iSCSI Target 3476 3477The SPDK iSCSI target now supports the fd.io Vector Packet Processing (VPP) framework userspace 3478TCP/IP stack. See the [iSCSI VPP documentation](http://www.spdk.io/doc/iscsi.html#vpp) for more 3479details. 3480 3481### iSCSI initiator 3482 3483An iSCSI initiator bdev module has been added to SPDK. This module should be considered 3484experimental pending additional features and tests. More details can be found in 3485lib/bdev/iscsi/README. 3486 3487### PMDK 3488 3489The persistent memory (PMDK) bdev module is now enabled using `--with-pmdk` instead of 3490`--with-nvml`. This reflects the renaming of the persistent memory library from NVML to 3491PMDK. 3492 3493### Virtio Block driver 3494 3495A userspace driver for Virtio Block devices has been added. It was built on top of the 3496[Virtio](http://www.spdk.io/doc/virtio.html) library and can be managed similarly to 3497the Virtio SCSI driver. See the 3498[Virtio Block](http://www.spdk.io/doc/bdev.html#bdev_config_virtio_blk) reference for 3499more information. 3500 3501### Virtio with 2MB hugepages 3502 3503The previous 1GB hugepage limitation has now been lifted. A new `-g` command-line option 3504enables SPDK Virtio to work with 2MB hugepages. 3505See [2MB hugepages](http://www.spdk.io/doc/virtio.html#virtio_2mb) for details. 3506 3507## v18.01: Blobstore Thin Provisioning 3508 3509### Build System 3510 3511The build system now includes a `make install` rule, including support for the common 3512`DESTDIR` and `prefix` variables as used in other build systems. Additionally, the prefix 3513may be set via the configure `--prefix` option. Example: `make install prefix=/usr`. 3514 3515### RPC 3516 3517A JSON RPC listener is now enabled by default using a UNIX domain socket at /var/tmp/spdk.sock. 3518A -r option command line option has been added to enable an alternative UNIX domain socket location, 3519or a TCP port in the format ip_addr:tcp_port (i.e. 127.0.0.1:5260). The Rpc configuration file 3520section is now deprecated and will be removed in the v18.04 release. 3521 3522### I/O Channels 3523 3524spdk_poller_register() and spdk_poller_unregister() were moved from the event 3525framework (include/spdk/event.h) to the I/O channel library 3526(include/spdk/io_channel.h). This allows code that doesn't depend on the event 3527framework to request registration and unregistration of pollers. 3528 3529spdk_for_each_channel() now allows asynchronous operations during iteration. 3530Instead of immediately continuing the interaction upon returning from the iteration 3531callback, the user must call spdk_for_each_channel_continue() to resume iteration. 3532 3533### Block Device Abstraction Layer (bdev) 3534 3535The poller abstraction was removed from the bdev layer. There is now a general purpose 3536abstraction for pollers available in include/spdk/io_channel.h 3537 3538### Lib 3539 3540A set of changes were made in the SPDK's lib code altering, 3541instances of calls to `exit()` and `abort()` to return a failure instead 3542wherever reasonably possible. This has resulted in return type changes of 3543the API for: 3544 3545- spdk_env_init() from type `void` to `int`. 3546- spdk_mem_map_init() from type `void` to `int`. 3547 3548Applications making use of these APIs should be modified to check for 3549a non-zero return value instead of relying on them to fail without return. 3550 3551### NVMe Driver 3552 3553SPDK now supports hotplug for vfio-attached devices. But there is one thing keep in mind: 3554Only physical removal events are supported; removing devices via the sysfs `remove` file will not work. 3555 3556### NVMe-oF Target 3557 3558Subsystems are no longer tied explicitly to CPU cores. Instead, connections are handed out to the available 3559cores round-robin. The "Core" option in the configuration file has been removed. 3560 3561### Blobstore 3562 3563A number of functions have been renamed: 3564 3565- spdk_bs_md_resize_blob() => spdk_blob_resize() 3566- spdk_bs_md_sync_blob() => spdk_blob_sync_md() 3567- spdk_bs_md_close_blob() => spdk_blob_close() 3568- spdk_bs_md_get_xattr_names() => spdk_blob_get_xattr_names() 3569- spdk_bs_md_get_xattr_value() => spdk_blob_get_xattr_value() 3570- spdk_blob_md_set_xattr() => spdk_blob_set_xattr() 3571- spdk_blob_md_remove_xattr() => spdk_blob_remove_xattr() 3572- spdk_bs_md_create_blob() => spdk_bs_create_blob() 3573- spdk_bs_md_open_blob() => spdk_bs_open_blob() 3574- spdk_bs_md_delete_blob() => spdk_bs_delete_blob() 3575- spdk_bs_md_iter_first() => spdk_bs_iter_first() 3576- spdk_bs_md_iter_next() => spdk_bs_iter_next() 3577 3578The function signature of spdk_blob_close() has changed. It now takes a struct spdk_blob * argument 3579rather than struct spdk_blob **. 3580 3581The function signature of spdk_bs_iter_next() has changed. It now takes a struct spdk_blob * argument 3582rather than struct spdk_blob **. 3583 3584Thin provisioning support has been added to the blobstore. It can be enabled by setting the 3585`thin_provision` flag in struct spdk_blob_opts when calling spdk_bs_create_blob_ext(). 3586 3587### NBD device 3588 3589The NBD application (test/lib/bdev/nbd) has been removed; Same functionality can now be 3590achieved by using the test/app/bdev_svc application and start_nbd_disk RPC method. 3591See the [GPT](http://www.spdk.io/doc/bdev.html#bdev_config_gpt) documentation for more details. 3592 3593### FIO plugin 3594 3595SPDK `fio_plugin` now supports FIO 3.3. The support for previous FIO 2.21 has been dropped, 3596although it still remains to work for now. The new FIO contains huge amount of bugfixes and 3597it's recommended to do an update. 3598 3599### Virtio library 3600 3601Previously a part of the bdev_virtio module, now a separate library. Virtio is now available 3602via `spdk_internal/virtio.h` file. This is an internal interface to be used when implementing 3603new Virtio backends, namely Virtio-BLK. 3604 3605### iSCSI 3606 3607The MinConnectionIdleInterval parameter has been removed, and connections are no longer migrated 3608to an epoll/kqueue descriptor on the master core when idle. 3609 3610## v17.10: Logical Volumes 3611 3612### New dependencies 3613 3614libuuid was added as new dependency for logical volumes. 3615 3616libnuma is now required unconditionally now that the DPDK submodule has been updated to DPDK 17.08. 3617 3618### Block Device Abstraction Layer (bdev) 3619 3620An [fio](http://github.com/axboe/fio) plugin was added that can route 3621I/O to the bdev layer. See the [plugin documentation](https://github.com/spdk/spdk/tree/master/examples/bdev/fio_plugin/) 3622for more information. 3623 3624spdk_bdev_unmap() was modified to take an offset and a length in bytes as 3625arguments instead of requiring the user to provide an array of SCSI 3626unmap descriptors. This limits unmaps to a single contiguous range. 3627 3628spdk_bdev_write_zeroes() was introduced. It ensures that all specified blocks will be zeroed out. 3629If a block device doesn't natively support a write zeroes command, the bdev layer emulates it using 3630write commands. 3631 3632New API functions that accept I/O parameters in units of blocks instead of bytes 3633have been added: 3634 3635- spdk_bdev_read_blocks(), spdk_bdev_readv_blocks() 3636- spdk_bdev_write_blocks(), spdk_bdev_writev_blocks() 3637- spdk_bdev_write_zeroes_blocks() 3638- spdk_bdev_unmap_blocks() 3639 3640The bdev layer now handles temporary out-of-memory I/O failures internally by queueing the I/O to be 3641retried later. 3642 3643### Linux AIO bdev 3644 3645The AIO bdev now allows the user to override the auto-detected block size. 3646 3647### NVMe driver 3648 3649The NVMe driver now recognizes the NVMe 1.3 Namespace Optimal I/O Boundary field. 3650NVMe 1.3 devices may report an optimal I/O boundary, which the driver will take 3651into account when splitting I/O requests. 3652 3653The HotplugEnable option in `[Nvme]` sections of the configuration file is now 3654"No" by default. It was previously "Yes". 3655 3656The NVMe library now includes a spdk_nvme_ns_get_ctrlr() function which returns the 3657NVMe Controller associated with a given namespace. 3658 3659The NVMe library now allows the user to specify a host identifier when attaching 3660to a controller. The host identifier is used as part of the Reservations feature, 3661as well as in the NVMe-oF Connect command. The default host ID is also now a 3662randomly-generated UUID, and the default host NQN uses the host ID to generate 3663a UUID-based NQN. 3664 3665spdk_nvme_connect() was added to allow the user to connect directly to a single 3666NVMe or NVMe-oF controller. 3667 3668### NVMe-oF Target (nvmf_tgt) 3669 3670The NVMe-oF target no longer requires any in-capsule data buffers to run, and 3671the feature is now entirely optional. Previously, at least 4 KiB in-capsule 3672data buffers were required. 3673 3674NVMe-oF subsystems have a new configuration option, AllowAnyHost, to control 3675whether the host NQN whitelist is enforced when accepting new connections. 3676If no Host options have been specified and AllowAnyHost is disabled, the 3677connection will be denied; this is a behavior change from previous releases, 3678which allowed any host NQN to connect if the Host list was empty. 3679AllowAnyHost is disabled by default. 3680 3681NVMe-oF namespaces may now be assigned arbitrary namespace IDs, and the number 3682of namespaces per subsystem is no longer limited. 3683 3684The NVMe-oF target now supports the Write Zeroes command. 3685 3686### Environment Abstraction Layer 3687 3688A new default value, SPDK_MEMPOOL_DEFAULT_CACHE_SIZE, was added to provide 3689additional clarity when constructing spdk_mempools. Previously, -1 could be 3690passed and the library would choose a reasonable default, but this new value 3691makes it explicit that the default is being used. 3692 3693### Blobstore 3694 3695The blobstore super block now contains a bstype field to identify the type of the blobstore. 3696Existing code should be updated to fill out bstype when calling spdk_bs_init() and spdk_bs_load(). 3697 3698spdk_bs_destroy() was added to allow destroying blobstore on device 3699with an initialized blobstore. 3700 3701spdk_bs_io_readv_blob() and spdk_bs_io_writev_blob() were added to enable 3702scattered payloads. 3703 3704A CLI tool for blobstore has been added, allowing basic operations through either command 3705line or shell interface. See the [blobcli](https://github.com/spdk/spdk/tree/master/examples/blob/cli) 3706documentation for more details. 3707 3708### Event Framework 3709 3710The ability to set a thread name, previously only used by the reactor code, is 3711now part of the spdk_thread_allocate() API. Users may specify a thread name 3712which will show up in tools like `gdb`. 3713 3714### Log 3715 3716The spdk_trace_dump() function now takes a new parameter to allow the caller to 3717specify an output file handle (stdout or stderr, for example). 3718 3719### Logical Volumes 3720 3721Logical volumes library built on top of SPDK blobstore has been added. 3722It is possible to create logical volumes on top of other devices using RPC. 3723 3724See the [logical volumes](http://www.spdk.io/doc/logical_volumes.html) documentation for more information. 3725 3726### Persistent Memory 3727 3728A new persistent memory bdev type has been added. 3729The persistent memory block device is built on top of [libpmemblk](http://pmem.io/nvml/libpmemblk/). 3730It is possible to create pmem devices on top of pmem pool files using RPC. 3731 3732See the [Pmem Block Device](http://www.spdk.io/doc/bdev.html#bdev_config_pmem) documentation for more information. 3733 3734### Virtio SCSI driver 3735 3736A userspace driver for Virtio SCSI devices has been added. 3737The driver is capable of creating block devices on top of LUNs exposed by another SPDK vhost-scsi application. 3738 3739See the [Virtio SCSI](http://www.spdk.io/doc/virtio.html) documentation and 3740[Getting Started](http://www.spdk.io/doc/bdev.html#bdev_config_virtio_scsi) guide for more information. 3741 3742### Vhost target 3743 3744The vhost target application now supports live migration between QEMU instances. 3745 3746## v17.07: Build system improvements, userspace vhost-blk target, and GPT bdev 3747 3748### Build System 3749 3750A `configure` script has been added to simplify the build configuration process. 3751The existing CONFIG file and `make CONFIG_...` options are also still supported. 3752Run `./configure --help` for information about available configuration options. 3753 3754A DPDK submodule has been added to make building SPDK easier. If no `--with-dpdk` 3755option is specified to configure, the SPDK build system will automatically build a 3756known-good configuration of DPDK with the minimal options enabled. See the Building 3757section of README.md for more information. 3758 3759A [Vagrant](https://www.vagrantup.com/) setup has been added to make it easier to 3760develop and use SPDK on systems without suitable NVMe hardware. See the Vagrant 3761section of README.md for more information. 3762 3763### Userspace vhost-blk target 3764 3765The vhost library and example app have been updated to support the vhost-blk 3766protocol in addition to the existing vhost-scsi protocol. 3767See the [vhost documentation](http://www.spdk.io/doc/vhost.html) for more details. 3768 3769### Block device abstraction layer (bdev) 3770 3771A GPT virtual block device has been added, which automatically exposes GPT partitions 3772with a special SPDK-specific partition type as bdevs. 3773See the [GPT bdev documentation](http://www.spdk.io/doc/bdev.md#bdev_config_gpt) for 3774more information. 3775 3776### NVMe driver 3777 3778The NVMe driver has been updated to support recent Intel SSDs, including the Intel® 3779Optane™ SSD DC P4800X series. 3780 3781A workaround has been added for devices that failed to recognize register writes 3782during controller reset. 3783 3784The NVMe driver now allocates request tracking objects on a per-queue basis. The 3785number of requests allowed on an I/O queue may be set during `spdk_nvme_probe()` by 3786modifying `io_queue_requests` in the opts structure. 3787 3788The SPDK NVMe `fio_plugin` has been updated to support multiple threads (`numjobs`). 3789 3790spdk_nvme_ctrlr_alloc_io_qpair() has been modified to allow the user to override 3791controller-level options for each individual I/O queue pair. 3792Existing callers with qprio == 0 can be updated to: 3793~~~ 3794... = spdk_nvme_ctrlr_alloc_io_qpair(ctrlr, NULL, 0); 3795~~~ 3796Callers that need to specify a non-default qprio should be updated to: 3797~~~ 3798struct spdk_nvme_io_qpair_opts opts; 3799spdk_nvme_ctrlr_get_default_io_qpair_opts(ctrlr, &opts, sizeof(opts)); 3800opts.qprio = SPDK_NVME_QPRIO_...; 3801... = spdk_nvme_ctrlr_alloc_io_qpair(ctrlr, &opts, sizeof(opts)); 3802~~~ 3803 3804### Environment Abstraction Layer 3805 3806The environment abstraction layer has been updated to include several new functions 3807in order to wrap additional DPDK functionality. See `include/spdk/env.h` for the 3808current set of functions. 3809 3810### SPDK Performance Analysis with Intel® VTune™ Amplifier 3811 3812Support for SPDK performance analysis has been added to Intel® VTune™ Amplifier 2018. 3813 3814This analysis provides: 3815 3816- I/O performance monitoring (calculating standard I/O metrics like IOPS, throughput, etc.) 3817- Tuning insights on the interplay of I/O and compute devices by estimating how many cores 3818 would be reasonable to provide for SPDK to keep up with a current storage workload. 3819 3820See the VTune Amplifier documentation for more information. 3821 3822## v17.03: Blobstore and userspace vhost-scsi target 3823 3824### Blobstore and BlobFS 3825 3826The blobstore is a persistent, power-fail safe block allocator designed to be 3827used as the local storage system backing a higher-level storage service. 3828See the [blobstore documentation](http://www.spdk.io/doc/blob.html) for more details. 3829 3830BlobFS adds basic filesystem functionality like filenames on top of the blobstore. 3831This release also includes a RocksDB Env implementation using BlobFS in place of the 3832kernel filesystem. 3833See the [BlobFS documentation](http://www.spdk.io/doc/blobfs.html) for more details. 3834 3835### Userspace vhost-scsi target 3836 3837A userspace implementation of the QEMU vhost-scsi protocol has been added. 3838The vhost target is capable of exporting SPDK bdevs to QEMU-based VMs as virtio devices. 3839See the [vhost documentation](http://www.spdk.io/doc/vhost.html) for more details. 3840 3841### Event framework 3842 3843The overhead of the main reactor event loop was reduced by optimizing the number of 3844calls to spdk_get_ticks() per iteration. 3845 3846### NVMe library 3847 3848The NVMe library will now automatically split readv/writev requests with scatter-gather 3849lists that do not map to valid PRP lists when the NVMe controller does not natively 3850support SGLs. 3851 3852The `identify` and `perf` NVMe examples were modified to add a consistent format for 3853specifying remote NVMe over Fabrics devices via the `-r` option. 3854This is implemented using the new `spdk_nvme_transport_id_parse()` function. 3855 3856### iSCSI Target 3857 3858The [Nvme] section of the configuration file was modified to remove the `BDF` directive 3859and replace it with a `TransportID` directive. Both local (PCIe) and remote (NVMe-oF) 3860devices can now be specified as the backing block device. A script to generate an 3861entire [Nvme] section based on the local NVMe devices attached was added at 3862`scripts/gen_nvme.sh`. 3863 3864### NVMe-oF Target 3865 3866The [Nvme] section of the configuration file was modified to remove the `BDF` directive 3867and replace it with a `TransportID` directive. Both local (PCIe) and remote (NVMe-oF) 3868devices can now be specified as the backing block device. A script to generate an 3869entire [Nvme] section based on the local NVMe devices attached was added at 3870`scripts/gen_nvme.sh`. 3871 3872## v16.12: NVMe over Fabrics host, hotplug, and multi-process 3873 3874### NVMe library 3875 3876The NVMe library has been changed to create its own request memory pool rather than 3877requiring the user to initialize the global `request_mempool` variable. Apps can be 3878updated by simply removing the initialization of `request_mempool`. Since the NVMe 3879library user no longer needs to know the size of the internal NVMe request 3880structure to create the pool, the `spdk_nvme_request_size()` function was also removed. 3881 3882The `spdk_nvme_ns_cmd_deallocate()` function was renamed and extended to become 3883`spdk_nvme_ns_cmd_dataset_management()`, which allows access to all of the NVMe 3884Dataset Management command's parameters. Existing callers can be updated to use 3885`spdk_nvme_ns_cmd_dataset_management()` with `SPDK_NVME_DSM_ATTR_DEALLOCATE` as the 3886`type` parameter. 3887 3888The NVMe library SGL callback prototype has been changed to return virtual addresses 3889rather than physical addresses. Callers of `spdk_nvme_ns_cmd_readv()` and 3890`spdk_nvme_ns_cmd_writev()` must update their `next_sge_fn` callbacks to match. 3891 3892The NVMe library now supports NVMe over Fabrics devices in addition to the existing 3893support for local PCIe-attached NVMe devices. For an example of how to enable 3894NVMe over Fabrics support in an application, see `examples/nvme/identify` and 3895`examples/nvme/perf`. 3896 3897Hot insert/remove support for NVMe devices has been added. To enable NVMe hotplug 3898support, an application should call the `spdk_nvme_probe()` function on a regular 3899basis to probe for new devices (reported via the existing `probe_cb` callback) and 3900removed devices (reported via a new `remove_cb` callback). Hotplug is currently 3901only supported on Linux with the `uio_pci_generic` driver, and newly-added NVMe 3902devices must be bound to `uio_pci_generic` by an external script or tool. 3903 3904Multiple processes may now coordinate and use a single NVMe device simultaneously 3905using [DPDK Multi-process Support](http://dpdk.org/doc/guides/prog_guide/multi_proc_support.html). 3906 3907### NVMe over Fabrics target (`nvmf_tgt`) 3908 3909The `nvmf_tgt` configuration file format has been updated significantly to enable 3910new features. See the example configuration file `etc/spdk/nvmf.conf.in` for 3911more details on the new and changed options. 3912 3913The NVMe over Fabrics target now supports virtual mode subsystems, which allow the 3914user to export devices from the SPDK block device abstraction layer as NVMe over 3915Fabrics subsystems. Direct mode (raw NVMe device access) is also still supported, 3916and a single `nvmf_tgt` may export both types of subsystems simultaneously. 3917 3918### Block device abstraction layer (bdev) 3919 3920The bdev layer now supports scatter/gather read and write I/O APIs, and the NVMe 3921blockdev driver has been updated to support scatter/gather. Apps can use the 3922new scatter/gather support via the `spdk_bdev_readv()` and `spdk_bdev_writev()` 3923functions. 3924 3925The bdev status returned from each I/O has been extended to pass through NVMe 3926or SCSI status codes directly in cases where the underlying device can provide 3927a more specific status code. 3928 3929A Ceph RBD (RADOS Block Device) blockdev driver has been added. This allows the 3930`iscsi_tgt` and `nvmf_tgt` apps to export Ceph RBD volumes as iSCSI LUNs or 3931NVMe namespaces. 3932 3933### General changes 3934 3935`libpciaccess` has been removed as a dependency and DPDK PCI enumeration is 3936used instead. Prior to DPDK 16.07 enumeration by class code was not supported, 3937so for earlier DPDK versions, only Intel SSD DC P3x00 devices will be discovered 3938by the NVMe library. 3939 3940The `env` environment abstraction library has been introduced, and a default 3941DPDK-based implementation is provided as part of SPDK. The goal of the `env` 3942layer is to enable use of alternate user-mode memory allocation and PCI access 3943libraries. See `doc/porting.md` for more details. 3944 3945The build process has been modified to produce all of the library files in the 3946`build/lib` directory. This is intended to simplify the use of SPDK from external 3947projects, which can now link to SPDK libraries by adding the `build/lib` directory 3948to the library path via `-L` and linking the SPDK libraries by name (for example, 3949`-lspdk_nvme -lspdk_log -lspdk_util`). 3950 3951`nvmf_tgt` and `iscsi_tgt` now have a JSON-RPC interface, which allows the user 3952to query and modify the configuration at runtime. The RPC service is disabled by 3953default, since it currently does not provide any authentication or security 3954mechanisms; it should only be enabled on systems with controlled user access 3955behind a firewall. An example RPC client implemented in Python is provided in 3956`scripts/rpc.py`. 3957 3958## v16.08: iSCSI target, NVMe over Fabrics maturity 3959 3960This release adds a userspace iSCSI target. The iSCSI target is capable of exporting 3961NVMe devices over a network using the iSCSI protocol. The application is located 3962in app/iscsi_tgt and a documented configuration file can be found at etc/spdk/spdk.conf.in. 3963 3964This release also significantly improves the existing NVMe over Fabrics target. 3965 3966- The configuration file format was changed, which will require updates to 3967 any existing nvmf.conf files (see `etc/spdk/nvmf.conf.in`): 3968 - `SubsystemGroup` was renamed to `Subsystem`. 3969 - `AuthFile` was removed (it was unimplemented). 3970 - `nvmf_tgt` was updated to correctly recognize NQN (NVMe Qualified Names) 3971 when naming subsystems. The default node name was changed to reflect this; 3972 it is now "nqn.2016-06.io.spdk". 3973 - `Port` and `Host` sections were merged into the `Subsystem` section 3974 - Global options to control max queue depth, number of queues, max I/O 3975 size, and max in-capsule data size were added. 3976 - The Nvme section was removed. Now a list of devices is specified by 3977 bus/device/function directly in the Subsystem section. 3978 - Subsystems now have a Mode, which can be Direct or Virtual. This is an attempt 3979 to future-proof the interface, so the only mode supported by this release 3980 is "Direct". 3981- Many bug fixes and cleanups were applied to the `nvmf_tgt` app and library. 3982- The target now supports discovery. 3983 3984This release also adds one new feature and provides some better examples and tools 3985for the NVMe driver. 3986 3987- The Weighted Round Robin arbitration method is now supported. This allows 3988 the user to specify different priorities on a per-I/O-queue basis. To 3989 enable WRR, set the `arb_mechanism` field during `spdk_nvme_probe()`. 3990- A simplified "Hello World" example was added to show the proper way to use 3991 the NVMe library API; see `examples/nvme/hello_world/hello_world.c`. 3992- A test for measuring software overhead was added. See `test/lib/nvme/overhead`. 3993 3994## v16.06: NVMf userspace target 3995 3996This release adds a userspace NVMf (NVMe over Fabrics) target, conforming to the 3997newly-released NVMf 1.0/NVMe 1.2.1 specification. The NVMf target exports NVMe 3998devices from a host machine over the network via RDMA. Currently, the target is 3999limited to directly exporting physical NVMe devices, and the discovery subsystem 4000is not supported. 4001 4002This release includes a general API cleanup, including renaming all declarations 4003in public headers to include a `spdk` prefix to prevent namespace clashes with 4004user code. 4005 4006- NVMe 4007 - The `nvme_attach()` API was reworked into a new probe/attach model, which 4008 moves device detection into the NVMe library. The new API also allows 4009 parallel initialization of NVMe controllers, providing a major reduction in 4010 startup time when using multiple controllers. 4011 - I/O queue allocation was changed to be explicit in the API. Each function 4012 that generates I/O requests now takes a queue pair (`spdk_nvme_qpair *`) 4013 argument, and I/O queues may be allocated using 4014 `spdk_nvme_ctrlr_alloc_io_qpair()`. This allows more flexible assignment of 4015 queue pairs than the previous model, which only allowed a single queue 4016 per thread and limited the total number of I/O queues to the lowest number 4017 supported on any attached controller. 4018 - Added support for the Write Zeroes command. 4019 - `examples/nvme/perf` can now report I/O command latency from the 4020 the controller's viewpoint using the Intel vendor-specific read/write latency 4021 log page. 4022 - Added namespace reservation command support, which can be used to coordinate 4023 sharing of a namespace between multiple hosts. 4024 - Added hardware SGL support, which enables use of scattered buffers that 4025 don't conform to the PRP list alignment and length requirements on supported 4026 NVMe controllers. 4027 - Added end-to-end data protection support, including the ability to write and 4028 read metadata in extended LBA (metadata appended to each block of data in the 4029 buffer) and separate metadata buffer modes. 4030 See `spdk_nvme_ns_cmd_write_with_md()` and `spdk_nvme_ns_cmd_read_with_md()` 4031 for details. 4032- IOAT 4033 - The DMA block fill feature is now exposed via the `ioat_submit_fill()` 4034 function. This is functionally similar to `memset()`, except the memory is 4035 filled with an 8-byte repeating pattern instead of a single byte like memset. 4036- PCI 4037 - Added support for using DPDK for PCI device mapping in addition to the 4038 existing libpciaccess option. Using the DPDK PCI support also allows use of 4039 the Linux VFIO driver model, which means that SPDK userspace drivers will work 4040 with the IOMMU enabled. Additionally, SPDK applications may be run as an 4041 unprivileged user with access restricted to a specific set of PCIe devices. 4042 - The PCI library API was made more generic to abstract away differences 4043 between the underlying PCI access implementations. 4044 4045## v1.2.0: IOAT user-space driver 4046 4047This release adds a user-space driver with support for the Intel I/O Acceleration Technology 4048(I/OAT, also known as "Crystal Beach") DMA offload engine. 4049 4050- IOAT 4051 - New user-space driver supporting DMA memory copy offload 4052 - Example programs `ioat/perf` and `ioat/verify` 4053 - Kernel-mode DMA engine test driver `kperf` for performance comparison 4054- NVMe 4055 - Per-I/O flags for Force Unit Access (FUA) and Limited Retry 4056 - Public API for retrieving log pages 4057 - Reservation register/acquire/release/report command support 4058 - Scattered payload support - an alternate API to provide I/O buffers via a sequence of callbacks 4059 - Declarations and `nvme/identify` support for Intel SSD DC P3700 series vendor-specific log pages and features 4060- Updated to support DPDK 2.2.0 4061 4062## v1.0.0: NVMe user-space driver 4063 4064This is the initial open source release of the Storage Performance Development Kit (SPDK). 4065 4066Features: 4067 4068- NVMe user-space driver 4069- NVMe example programs 4070 - `examples/nvme/perf` tests performance (IOPS) using the NVMe user-space driver 4071 - `examples/nvme/identify` displays NVMe controller information in a human-readable format 4072- Linux and FreeBSD support 4073