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