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