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