| 1 |
.. _ioctl.h: |
| 2 |
|
| 3 |
**ioctl.h** |
| 4 |
|
| 5 |
|
| 6 |
Linux NVMe ioctl interface functions |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
.. c:type:: struct nvme_passthru_cmd |
| 11 |
|
| 12 |
nvme passthrough command structure |
| 13 |
|
| 14 |
**Definition** |
| 15 |
|
| 16 |
:: |
| 17 |
|
| 18 |
struct nvme_passthru_cmd { |
| 19 |
__u8 opcode; |
| 20 |
__u8 flags; |
| 21 |
__u16 rsvd1; |
| 22 |
__u32 nsid; |
| 23 |
__u32 cdw2; |
| 24 |
__u32 cdw3; |
| 25 |
__u64 metadata; |
| 26 |
__u64 addr; |
| 27 |
__u32 metadata_len; |
| 28 |
__u32 data_len; |
| 29 |
__u32 cdw10; |
| 30 |
__u32 cdw11; |
| 31 |
__u32 cdw12; |
| 32 |
__u32 cdw13; |
| 33 |
__u32 cdw14; |
| 34 |
__u32 cdw15; |
| 35 |
__u32 timeout_ms; |
| 36 |
__u32 result; |
| 37 |
}; |
| 38 |
|
| 39 |
**Members** |
| 40 |
|
| 41 |
``opcode`` |
| 42 |
Operation code, see :c:type:`enum nvme_io_opcodes <nvme_io_opcodes>` and :c:type:`enum nvme_admin_opcodes <nvme_admin_opcodes>` |
| 43 |
|
| 44 |
``flags`` |
| 45 |
Not supported: intended for command flags (eg: SGL, FUSE) |
| 46 |
|
| 47 |
``rsvd1`` |
| 48 |
Reserved for future use |
| 49 |
|
| 50 |
``nsid`` |
| 51 |
Namespace Identifier, or Fabrics type |
| 52 |
|
| 53 |
``cdw2`` |
| 54 |
Command Dword 2 (no spec defined use) |
| 55 |
|
| 56 |
``cdw3`` |
| 57 |
Command Dword 3 (no spec defined use) |
| 58 |
|
| 59 |
``metadata`` |
| 60 |
User space address to metadata buffer (NULL if not used) |
| 61 |
|
| 62 |
``addr`` |
| 63 |
User space address to data buffer (NULL if not used) |
| 64 |
|
| 65 |
``metadata_len`` |
| 66 |
Metadata buffer transfer length |
| 67 |
|
| 68 |
``data_len`` |
| 69 |
Data buffer transfer length |
| 70 |
|
| 71 |
``cdw10`` |
| 72 |
Command Dword 10 (command specific) |
| 73 |
|
| 74 |
``cdw11`` |
| 75 |
Command Dword 11 (command specific) |
| 76 |
|
| 77 |
``cdw12`` |
| 78 |
Command Dword 12 (command specific) |
| 79 |
|
| 80 |
``cdw13`` |
| 81 |
Command Dword 13 (command specific) |
| 82 |
|
| 83 |
``cdw14`` |
| 84 |
Command Dword 14 (command specific) |
| 85 |
|
| 86 |
``cdw15`` |
| 87 |
Command Dword 15 (command specific) |
| 88 |
|
| 89 |
``timeout_ms`` |
| 90 |
If non-zero, overrides system default timeout in milliseconds |
| 91 |
|
| 92 |
``result`` |
| 93 |
Set on completion to the command's CQE DWORD 0 controller response |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
.. c:type:: struct nvme_passthru_cmd64 |
| 100 |
|
| 101 |
64-bit nvme passthrough command structure |
| 102 |
|
| 103 |
**Definition** |
| 104 |
|
| 105 |
:: |
| 106 |
|
| 107 |
struct nvme_passthru_cmd64 { |
| 108 |
__u8 opcode; |
| 109 |
__u8 flags; |
| 110 |
__u16 rsvd1; |
| 111 |
__u32 nsid; |
| 112 |
__u32 cdw2; |
| 113 |
__u32 cdw3; |
| 114 |
__u64 metadata; |
| 115 |
__u64 addr; |
| 116 |
__u32 metadata_len; |
| 117 |
__u32 data_len; |
| 118 |
__u32 cdw10; |
| 119 |
__u32 cdw11; |
| 120 |
__u32 cdw12; |
| 121 |
__u32 cdw13; |
| 122 |
__u32 cdw14; |
| 123 |
__u32 cdw15; |
| 124 |
__u32 timeout_ms; |
| 125 |
__u32 rsvd2; |
| 126 |
__u64 result; |
| 127 |
}; |
| 128 |
|
| 129 |
**Members** |
| 130 |
|
| 131 |
``opcode`` |
| 132 |
Operation code, see :c:type:`enum nvme_io_opcodes <nvme_io_opcodes>` and :c:type:`enum nvme_admin_opcodes <nvme_admin_opcodes>` |
| 133 |
|
| 134 |
``flags`` |
| 135 |
Not supported: intended for command flags (eg: SGL, FUSE) |
| 136 |
|
| 137 |
``rsvd1`` |
| 138 |
Reserved for future use |
| 139 |
|
| 140 |
``nsid`` |
| 141 |
Namespace Identifier, or Fabrics type |
| 142 |
|
| 143 |
``cdw2`` |
| 144 |
Command Dword 2 (no spec defined use) |
| 145 |
|
| 146 |
``cdw3`` |
| 147 |
Command Dword 3 (no spec defined use) |
| 148 |
|
| 149 |
``metadata`` |
| 150 |
User space address to metadata buffer (NULL if not used) |
| 151 |
|
| 152 |
``addr`` |
| 153 |
User space address to data buffer (NULL if not used) |
| 154 |
|
| 155 |
``metadata_len`` |
| 156 |
Metadata buffer transfer length |
| 157 |
|
| 158 |
``data_len`` |
| 159 |
Data buffer transfer length |
| 160 |
|
| 161 |
``cdw10`` |
| 162 |
Command Dword 10 (command specific) |
| 163 |
|
| 164 |
``cdw11`` |
| 165 |
Command Dword 11 (command specific) |
| 166 |
|
| 167 |
``cdw12`` |
| 168 |
Command Dword 12 (command specific) |
| 169 |
|
| 170 |
``cdw13`` |
| 171 |
Command Dword 13 (command specific) |
| 172 |
|
| 173 |
``cdw14`` |
| 174 |
Command Dword 14 (command specific) |
| 175 |
|
| 176 |
``cdw15`` |
| 177 |
Command Dword 15 (command specific) |
| 178 |
|
| 179 |
``timeout_ms`` |
| 180 |
If non-zero, overrides system default timeout in milliseconds |
| 181 |
|
| 182 |
``rsvd2`` |
| 183 |
Reserved for future use (and fills an implicit struct pad |
| 184 |
|
| 185 |
``result`` |
| 186 |
Set on completion to the command's CQE DWORD 0-1 controller response |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
.. c:type:: struct nvme_uring_cmd |
| 193 |
|
| 194 |
nvme uring command structure |
| 195 |
|
| 196 |
**Definition** |
| 197 |
|
| 198 |
:: |
| 199 |
|
| 200 |
struct nvme_uring_cmd { |
| 201 |
__u8 opcode; |
| 202 |
__u8 flags; |
| 203 |
__u16 rsvd1; |
| 204 |
__u32 nsid; |
| 205 |
__u32 cdw2; |
| 206 |
__u32 cdw3; |
| 207 |
__u64 metadata; |
| 208 |
__u64 addr; |
| 209 |
__u32 metadata_len; |
| 210 |
__u32 data_len; |
| 211 |
__u32 cdw10; |
| 212 |
__u32 cdw11; |
| 213 |
__u32 cdw12; |
| 214 |
__u32 cdw13; |
| 215 |
__u32 cdw14; |
| 216 |
__u32 cdw15; |
| 217 |
__u32 timeout_ms; |
| 218 |
__u32 rsvd2; |
| 219 |
}; |
| 220 |
|
| 221 |
**Members** |
| 222 |
|
| 223 |
``opcode`` |
| 224 |
Operation code, see :c:type:`enum nvme_io_opcodes <nvme_io_opcodes>` and :c:type:`enum nvme_admin_opcodes <nvme_admin_opcodes>` |
| 225 |
|
| 226 |
``flags`` |
| 227 |
Not supported: intended for command flags (eg: SGL, FUSE) |
| 228 |
|
| 229 |
``rsvd1`` |
| 230 |
Reserved for future use |
| 231 |
|
| 232 |
``nsid`` |
| 233 |
Namespace Identifier, or Fabrics type |
| 234 |
|
| 235 |
``cdw2`` |
| 236 |
Command Dword 2 (no spec defined use) |
| 237 |
|
| 238 |
``cdw3`` |
| 239 |
Command Dword 3 (no spec defined use) |
| 240 |
|
| 241 |
``metadata`` |
| 242 |
User space address to metadata buffer (NULL if not used) |
| 243 |
|
| 244 |
``addr`` |
| 245 |
User space address to data buffer (NULL if not used) |
| 246 |
|
| 247 |
``metadata_len`` |
| 248 |
Metadata buffer transfer length |
| 249 |
|
| 250 |
``data_len`` |
| 251 |
Data buffer transfer length |
| 252 |
|
| 253 |
``cdw10`` |
| 254 |
Command Dword 10 (command specific) |
| 255 |
|
| 256 |
``cdw11`` |
| 257 |
Command Dword 11 (command specific) |
| 258 |
|
| 259 |
``cdw12`` |
| 260 |
Command Dword 12 (command specific) |
| 261 |
|
| 262 |
``cdw13`` |
| 263 |
Command Dword 13 (command specific) |
| 264 |
|
| 265 |
``cdw14`` |
| 266 |
Command Dword 14 (command specific) |
| 267 |
|
| 268 |
``cdw15`` |
| 269 |
Command Dword 15 (command specific) |
| 270 |
|
| 271 |
``timeout_ms`` |
| 272 |
If non-zero, overrides system default timeout in milliseconds |
| 273 |
|
| 274 |
``rsvd2`` |
| 275 |
Reserved for future use (and fills an implicit struct pad |
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
.. c:function:: sizeof_args (type, member, align) |
| 280 |
|
| 281 |
Helper function used to determine structure sizes |
| 282 |
|
| 283 |
**Parameters** |
| 284 |
|
| 285 |
``type`` |
| 286 |
Argument structure type |
| 287 |
|
| 288 |
``member`` |
| 289 |
Member inside the type |
| 290 |
|
| 291 |
``align`` |
| 292 |
Alignment information |
| 293 |
|
| 294 |
|
| 295 |
.. c:function:: int nvme_submit_admin_passthru64 (int fd, struct nvme_passthru_cmd64 *cmd, __u64 *result) |
| 296 |
|
| 297 |
Submit a 64-bit nvme passthrough admin command |
| 298 |
|
| 299 |
**Parameters** |
| 300 |
|
| 301 |
``int fd`` |
| 302 |
File descriptor of nvme device |
| 303 |
|
| 304 |
``struct nvme_passthru_cmd64 *cmd`` |
| 305 |
The nvme admin command to send |
| 306 |
|
| 307 |
``__u64 *result`` |
| 308 |
Optional field to return the result from the CQE DW0-1 |
| 309 |
|
| 310 |
**Description** |
| 311 |
|
| 312 |
Uses NVME_IOCTL_ADMIN64_CMD for the ioctl request. |
| 313 |
|
| 314 |
**Return** |
| 315 |
|
| 316 |
The nvme command status if a response was received (see |
| 317 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 318 |
|
| 319 |
|
| 320 |
.. c:function:: int nvme_admin_passthru64 (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void *data, __u32 metadata_len, void *metadata, __u32 timeout_ms, __u64 *result) |
| 321 |
|
| 322 |
Submit a 64-bit nvme passthrough command |
| 323 |
|
| 324 |
**Parameters** |
| 325 |
|
| 326 |
``int fd`` |
| 327 |
File descriptor of nvme device |
| 328 |
|
| 329 |
``__u8 opcode`` |
| 330 |
The nvme io command to send |
| 331 |
|
| 332 |
``__u8 flags`` |
| 333 |
NVMe command flags (not used) |
| 334 |
|
| 335 |
``__u16 rsvd`` |
| 336 |
Reserved for future use |
| 337 |
|
| 338 |
``__u32 nsid`` |
| 339 |
Namespace identifier |
| 340 |
|
| 341 |
``__u32 cdw2`` |
| 342 |
Command dword 2 |
| 343 |
|
| 344 |
``__u32 cdw3`` |
| 345 |
Command dword 3 |
| 346 |
|
| 347 |
``__u32 cdw10`` |
| 348 |
Command dword 10 |
| 349 |
|
| 350 |
``__u32 cdw11`` |
| 351 |
Command dword 11 |
| 352 |
|
| 353 |
``__u32 cdw12`` |
| 354 |
Command dword 12 |
| 355 |
|
| 356 |
``__u32 cdw13`` |
| 357 |
Command dword 13 |
| 358 |
|
| 359 |
``__u32 cdw14`` |
| 360 |
Command dword 14 |
| 361 |
|
| 362 |
``__u32 cdw15`` |
| 363 |
Command dword 15 |
| 364 |
|
| 365 |
``__u32 data_len`` |
| 366 |
Length of the data transferred in this command in bytes |
| 367 |
|
| 368 |
``void *data`` |
| 369 |
Pointer to user address of the data buffer |
| 370 |
|
| 371 |
``__u32 metadata_len`` |
| 372 |
Length of metadata transferred in this command |
| 373 |
|
| 374 |
``void *metadata`` |
| 375 |
Pointer to user address of the metadata buffer |
| 376 |
|
| 377 |
``__u32 timeout_ms`` |
| 378 |
How long the kernel waits for the command to complete |
| 379 |
|
| 380 |
``__u64 *result`` |
| 381 |
Optional field to return the result from the CQE dword 0 |
| 382 |
|
| 383 |
**Description** |
| 384 |
|
| 385 |
Parameterized form of nvme_submit_admin_passthru64(). This sets up and |
| 386 |
submits a :c:type:`struct nvme_passthru_cmd64 <nvme_passthru_cmd64>`. |
| 387 |
|
| 388 |
Known values for **opcode** are defined in :c:type:`enum nvme_admin_opcode <nvme_admin_opcode>`. |
| 389 |
|
| 390 |
**Return** |
| 391 |
|
| 392 |
The nvme command status if a response was received (see |
| 393 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 394 |
|
| 395 |
|
| 396 |
.. c:function:: int nvme_submit_admin_passthru (int fd, struct nvme_passthru_cmd *cmd, __u32 *result) |
| 397 |
|
| 398 |
Submit an nvme passthrough admin command |
| 399 |
|
| 400 |
**Parameters** |
| 401 |
|
| 402 |
``int fd`` |
| 403 |
File descriptor of nvme device |
| 404 |
|
| 405 |
``struct nvme_passthru_cmd *cmd`` |
| 406 |
The nvme admin command to send |
| 407 |
|
| 408 |
``__u32 *result`` |
| 409 |
Optional field to return the result from the CQE DW0 |
| 410 |
|
| 411 |
**Description** |
| 412 |
|
| 413 |
Uses NVME_IOCTL_ADMIN_CMD for the ioctl request. |
| 414 |
|
| 415 |
**Return** |
| 416 |
|
| 417 |
The nvme command status if a response was received (see |
| 418 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 419 |
|
| 420 |
|
| 421 |
.. c:function:: int nvme_admin_passthru (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void *data, __u32 metadata_len, void *metadata, __u32 timeout_ms, __u32 *result) |
| 422 |
|
| 423 |
Submit an nvme passthrough command |
| 424 |
|
| 425 |
**Parameters** |
| 426 |
|
| 427 |
``int fd`` |
| 428 |
File descriptor of nvme device |
| 429 |
|
| 430 |
``__u8 opcode`` |
| 431 |
The nvme io command to send |
| 432 |
|
| 433 |
``__u8 flags`` |
| 434 |
NVMe command flags (not used) |
| 435 |
|
| 436 |
``__u16 rsvd`` |
| 437 |
Reserved for future use |
| 438 |
|
| 439 |
``__u32 nsid`` |
| 440 |
Namespace identifier |
| 441 |
|
| 442 |
``__u32 cdw2`` |
| 443 |
Command dword 2 |
| 444 |
|
| 445 |
``__u32 cdw3`` |
| 446 |
Command dword 3 |
| 447 |
|
| 448 |
``__u32 cdw10`` |
| 449 |
Command dword 10 |
| 450 |
|
| 451 |
``__u32 cdw11`` |
| 452 |
Command dword 11 |
| 453 |
|
| 454 |
``__u32 cdw12`` |
| 455 |
Command dword 12 |
| 456 |
|
| 457 |
``__u32 cdw13`` |
| 458 |
Command dword 13 |
| 459 |
|
| 460 |
``__u32 cdw14`` |
| 461 |
Command dword 14 |
| 462 |
|
| 463 |
``__u32 cdw15`` |
| 464 |
Command dword 15 |
| 465 |
|
| 466 |
``__u32 data_len`` |
| 467 |
Length of the data transferred in this command in bytes |
| 468 |
|
| 469 |
``void *data`` |
| 470 |
Pointer to user address of the data buffer |
| 471 |
|
| 472 |
``__u32 metadata_len`` |
| 473 |
Length of metadata transferred in this command |
| 474 |
|
| 475 |
``void *metadata`` |
| 476 |
Pointer to user address of the metadata buffer |
| 477 |
|
| 478 |
``__u32 timeout_ms`` |
| 479 |
How long the kernel waits for the command to complete |
| 480 |
|
| 481 |
``__u32 *result`` |
| 482 |
Optional field to return the result from the CQE dword 0 |
| 483 |
|
| 484 |
**Description** |
| 485 |
|
| 486 |
Parameterized form of nvme_submit_admin_passthru(). This sets up and |
| 487 |
submits a :c:type:`struct nvme_passthru_cmd <nvme_passthru_cmd>`. |
| 488 |
|
| 489 |
Known values for **opcode** are defined in :c:type:`enum nvme_admin_opcode <nvme_admin_opcode>`. |
| 490 |
|
| 491 |
**Return** |
| 492 |
|
| 493 |
The nvme command status if a response was received (see |
| 494 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 495 |
|
| 496 |
|
| 497 |
.. c:function:: int nvme_submit_io_passthru64 (int fd, struct nvme_passthru_cmd64 *cmd, __u64 *result) |
| 498 |
|
| 499 |
Submit a 64-bit nvme passthrough command |
| 500 |
|
| 501 |
**Parameters** |
| 502 |
|
| 503 |
``int fd`` |
| 504 |
File descriptor of nvme device |
| 505 |
|
| 506 |
``struct nvme_passthru_cmd64 *cmd`` |
| 507 |
The nvme io command to send |
| 508 |
|
| 509 |
``__u64 *result`` |
| 510 |
Optional field to return the result from the CQE DW0-1 |
| 511 |
|
| 512 |
**Description** |
| 513 |
|
| 514 |
Uses NVME_IOCTL_IO64_CMD for the ioctl request. |
| 515 |
|
| 516 |
**Return** |
| 517 |
|
| 518 |
The nvme command status if a response was received (see |
| 519 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 520 |
|
| 521 |
|
| 522 |
.. c:function:: int nvme_io_passthru64 (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void *data, __u32 metadata_len, void *metadata, __u32 timeout_ms, __u64 *result) |
| 523 |
|
| 524 |
Submit an nvme io passthrough command |
| 525 |
|
| 526 |
**Parameters** |
| 527 |
|
| 528 |
``int fd`` |
| 529 |
File descriptor of nvme device |
| 530 |
|
| 531 |
``__u8 opcode`` |
| 532 |
The nvme io command to send |
| 533 |
|
| 534 |
``__u8 flags`` |
| 535 |
NVMe command flags (not used) |
| 536 |
|
| 537 |
``__u16 rsvd`` |
| 538 |
Reserved for future use |
| 539 |
|
| 540 |
``__u32 nsid`` |
| 541 |
Namespace identifier |
| 542 |
|
| 543 |
``__u32 cdw2`` |
| 544 |
Command dword 2 |
| 545 |
|
| 546 |
``__u32 cdw3`` |
| 547 |
Command dword 3 |
| 548 |
|
| 549 |
``__u32 cdw10`` |
| 550 |
Command dword 10 |
| 551 |
|
| 552 |
``__u32 cdw11`` |
| 553 |
Command dword 11 |
| 554 |
|
| 555 |
``__u32 cdw12`` |
| 556 |
Command dword 12 |
| 557 |
|
| 558 |
``__u32 cdw13`` |
| 559 |
Command dword 13 |
| 560 |
|
| 561 |
``__u32 cdw14`` |
| 562 |
Command dword 14 |
| 563 |
|
| 564 |
``__u32 cdw15`` |
| 565 |
Command dword 15 |
| 566 |
|
| 567 |
``__u32 data_len`` |
| 568 |
Length of the data transferred in this command in bytes |
| 569 |
|
| 570 |
``void *data`` |
| 571 |
Pointer to user address of the data buffer |
| 572 |
|
| 573 |
``__u32 metadata_len`` |
| 574 |
Length of metadata transferred in this command |
| 575 |
|
| 576 |
``void *metadata`` |
| 577 |
Pointer to user address of the metadata buffer |
| 578 |
|
| 579 |
``__u32 timeout_ms`` |
| 580 |
How long the kernel waits for the command to complete |
| 581 |
|
| 582 |
``__u64 *result`` |
| 583 |
Optional field to return the result from the CQE dword 0 |
| 584 |
|
| 585 |
**Description** |
| 586 |
|
| 587 |
Parameterized form of nvme_submit_io_passthru64(). This sets up and submits |
| 588 |
a :c:type:`struct nvme_passthru_cmd64 <nvme_passthru_cmd64>`. |
| 589 |
|
| 590 |
Known values for **opcode** are defined in :c:type:`enum nvme_io_opcode <nvme_io_opcode>`. |
| 591 |
|
| 592 |
**Return** |
| 593 |
|
| 594 |
The nvme command status if a response was received (see |
| 595 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 596 |
|
| 597 |
|
| 598 |
.. c:function:: int nvme_submit_io_passthru (int fd, struct nvme_passthru_cmd *cmd, __u32 *result) |
| 599 |
|
| 600 |
Submit an nvme passthrough command |
| 601 |
|
| 602 |
**Parameters** |
| 603 |
|
| 604 |
``int fd`` |
| 605 |
File descriptor of nvme device |
| 606 |
|
| 607 |
``struct nvme_passthru_cmd *cmd`` |
| 608 |
The nvme io command to send |
| 609 |
|
| 610 |
``__u32 *result`` |
| 611 |
Optional field to return the result from the CQE DW0 |
| 612 |
|
| 613 |
**Description** |
| 614 |
|
| 615 |
Uses NVME_IOCTL_IO_CMD for the ioctl request. |
| 616 |
|
| 617 |
**Return** |
| 618 |
|
| 619 |
The nvme command status if a response was received (see |
| 620 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 621 |
|
| 622 |
|
| 623 |
.. c:function:: int nvme_io_passthru (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void *data, __u32 metadata_len, void *metadata, __u32 timeout_ms, __u32 *result) |
| 624 |
|
| 625 |
Submit an nvme io passthrough command |
| 626 |
|
| 627 |
**Parameters** |
| 628 |
|
| 629 |
``int fd`` |
| 630 |
File descriptor of nvme device |
| 631 |
|
| 632 |
``__u8 opcode`` |
| 633 |
The nvme io command to send |
| 634 |
|
| 635 |
``__u8 flags`` |
| 636 |
NVMe command flags (not used) |
| 637 |
|
| 638 |
``__u16 rsvd`` |
| 639 |
Reserved for future use |
| 640 |
|
| 641 |
``__u32 nsid`` |
| 642 |
Namespace identifier |
| 643 |
|
| 644 |
``__u32 cdw2`` |
| 645 |
Command dword 2 |
| 646 |
|
| 647 |
``__u32 cdw3`` |
| 648 |
Command dword 3 |
| 649 |
|
| 650 |
``__u32 cdw10`` |
| 651 |
Command dword 10 |
| 652 |
|
| 653 |
``__u32 cdw11`` |
| 654 |
Command dword 11 |
| 655 |
|
| 656 |
``__u32 cdw12`` |
| 657 |
Command dword 12 |
| 658 |
|
| 659 |
``__u32 cdw13`` |
| 660 |
Command dword 13 |
| 661 |
|
| 662 |
``__u32 cdw14`` |
| 663 |
Command dword 14 |
| 664 |
|
| 665 |
``__u32 cdw15`` |
| 666 |
Command dword 15 |
| 667 |
|
| 668 |
``__u32 data_len`` |
| 669 |
Length of the data transferred in this command in bytes |
| 670 |
|
| 671 |
``void *data`` |
| 672 |
Pointer to user address of the data buffer |
| 673 |
|
| 674 |
``__u32 metadata_len`` |
| 675 |
Length of metadata transferred in this command |
| 676 |
|
| 677 |
``void *metadata`` |
| 678 |
Pointer to user address of the metadata buffer |
| 679 |
|
| 680 |
``__u32 timeout_ms`` |
| 681 |
How long the kernel waits for the command to complete |
| 682 |
|
| 683 |
``__u32 *result`` |
| 684 |
Optional field to return the result from the CQE dword 0 |
| 685 |
|
| 686 |
**Description** |
| 687 |
|
| 688 |
Parameterized form of nvme_submit_io_passthru(). This sets up and submits |
| 689 |
a :c:type:`struct nvme_passthru_cmd <nvme_passthru_cmd>`. |
| 690 |
|
| 691 |
Known values for **opcode** are defined in :c:type:`enum nvme_io_opcode <nvme_io_opcode>`. |
| 692 |
|
| 693 |
**Return** |
| 694 |
|
| 695 |
The nvme command status if a response was received (see |
| 696 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 697 |
|
| 698 |
|
| 699 |
.. c:function:: int nvme_subsystem_reset (int fd) |
| 700 |
|
| 701 |
Initiate a subsystem reset |
| 702 |
|
| 703 |
**Parameters** |
| 704 |
|
| 705 |
``int fd`` |
| 706 |
File descriptor of nvme device |
| 707 |
|
| 708 |
**Description** |
| 709 |
|
| 710 |
This should only be sent to controller handles, not to namespaces. |
| 711 |
|
| 712 |
**Return** |
| 713 |
|
| 714 |
Zero if a subsystem reset was initiated or -1 with errno set |
| 715 |
otherwise. |
| 716 |
|
| 717 |
|
| 718 |
.. c:function:: int nvme_ctrl_reset (int fd) |
| 719 |
|
| 720 |
Initiate a controller reset |
| 721 |
|
| 722 |
**Parameters** |
| 723 |
|
| 724 |
``int fd`` |
| 725 |
File descriptor of nvme device |
| 726 |
|
| 727 |
**Description** |
| 728 |
|
| 729 |
This should only be sent to controller handles, not to namespaces. |
| 730 |
|
| 731 |
**Return** |
| 732 |
|
| 733 |
0 if a reset was initiated or -1 with errno set otherwise. |
| 734 |
|
| 735 |
|
| 736 |
.. c:function:: int nvme_ns_rescan (int fd) |
| 737 |
|
| 738 |
Initiate a controller rescan |
| 739 |
|
| 740 |
**Parameters** |
| 741 |
|
| 742 |
``int fd`` |
| 743 |
File descriptor of nvme device |
| 744 |
|
| 745 |
**Description** |
| 746 |
|
| 747 |
This should only be sent to controller handles, not to namespaces. |
| 748 |
|
| 749 |
**Return** |
| 750 |
|
| 751 |
0 if a rescan was initiated or -1 with errno set otherwise. |
| 752 |
|
| 753 |
|
| 754 |
.. c:function:: int nvme_get_nsid (int fd, __u32 *nsid) |
| 755 |
|
| 756 |
Retrieve the NSID from a namespace file descriptor |
| 757 |
|
| 758 |
**Parameters** |
| 759 |
|
| 760 |
``int fd`` |
| 761 |
File descriptor of nvme namespace |
| 762 |
|
| 763 |
``__u32 *nsid`` |
| 764 |
User pointer to namespace id |
| 765 |
|
| 766 |
**Description** |
| 767 |
|
| 768 |
This should only be sent to namespace handles, not to controllers. The |
| 769 |
kernel's interface returns the nsid as the return value. This is unfortunate |
| 770 |
for many architectures that are incapable of allowing distinguishing a |
| 771 |
namespace id > 0x80000000 from a negative error number. |
| 772 |
|
| 773 |
**Return** |
| 774 |
|
| 775 |
0 if **nsid** was set successfully or -1 with errno set otherwise. |
| 776 |
|
| 777 |
|
| 778 |
.. c:function:: int nvme_identify (struct nvme_identify_args *args) |
| 779 |
|
| 780 |
Send the NVMe Identify command |
| 781 |
|
| 782 |
**Parameters** |
| 783 |
|
| 784 |
``struct nvme_identify_args *args`` |
| 785 |
:c:type:`struct nvme_identify_args <nvme_identify_args>` argument structure |
| 786 |
|
| 787 |
**Description** |
| 788 |
|
| 789 |
The Identify command returns a data buffer that describes information about |
| 790 |
the NVM subsystem, the controller or the namespace(s). |
| 791 |
|
| 792 |
**Return** |
| 793 |
|
| 794 |
The nvme command status if a response was received (see |
| 795 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 796 |
|
| 797 |
|
| 798 |
.. c:function:: int nvme_identify_ctrl (int fd, struct nvme_id_ctrl *id) |
| 799 |
|
| 800 |
Retrieves nvme identify controller |
| 801 |
|
| 802 |
**Parameters** |
| 803 |
|
| 804 |
``int fd`` |
| 805 |
File descriptor of nvme device |
| 806 |
|
| 807 |
``struct nvme_id_ctrl *id`` |
| 808 |
User space destination address to transfer the data, |
| 809 |
|
| 810 |
**Description** |
| 811 |
|
| 812 |
Sends nvme identify with CNS value ``NVME_IDENTIFY_CNS_CTRL``. |
| 813 |
|
| 814 |
See :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>` for details on the data returned. |
| 815 |
|
| 816 |
**Return** |
| 817 |
|
| 818 |
The nvme command status if a response was received (see |
| 819 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 820 |
|
| 821 |
|
| 822 |
.. c:function:: int nvme_identify_ns (int fd, __u32 nsid, struct nvme_id_ns *ns) |
| 823 |
|
| 824 |
Retrieves nvme identify namespace |
| 825 |
|
| 826 |
**Parameters** |
| 827 |
|
| 828 |
``int fd`` |
| 829 |
File descriptor of nvme device |
| 830 |
|
| 831 |
``__u32 nsid`` |
| 832 |
Namespace to identify |
| 833 |
|
| 834 |
``struct nvme_id_ns *ns`` |
| 835 |
User space destination address to transfer the data |
| 836 |
|
| 837 |
**Description** |
| 838 |
|
| 839 |
If the Namespace Identifier (NSID) field specifies an active NSID, then the |
| 840 |
Identify Namespace data structure is returned to the host for that specified |
| 841 |
namespace. |
| 842 |
|
| 843 |
If the controller supports the Namespace Management capability and the NSID |
| 844 |
field is set to ``NVME_NSID_ALL``, then the controller returns an Identify Namespace |
| 845 |
data structure that specifies capabilities that are common across namespaces |
| 846 |
for this controller. |
| 847 |
|
| 848 |
See :c:type:`struct nvme_id_ns <nvme_id_ns>` for details on the structure returned. |
| 849 |
|
| 850 |
**Return** |
| 851 |
|
| 852 |
The nvme command status if a response was received (see |
| 853 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 854 |
|
| 855 |
|
| 856 |
.. c:function:: int nvme_identify_allocated_ns (int fd, __u32 nsid, struct nvme_id_ns *ns) |
| 857 |
|
| 858 |
Same as nvme_identify_ns, but only for allocated namespaces |
| 859 |
|
| 860 |
**Parameters** |
| 861 |
|
| 862 |
``int fd`` |
| 863 |
File descriptor of nvme device |
| 864 |
|
| 865 |
``__u32 nsid`` |
| 866 |
Namespace to identify |
| 867 |
|
| 868 |
``struct nvme_id_ns *ns`` |
| 869 |
User space destination address to transfer the data |
| 870 |
|
| 871 |
**Return** |
| 872 |
|
| 873 |
The nvme command status if a response was received (see |
| 874 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 875 |
|
| 876 |
|
| 877 |
.. c:function:: int nvme_identify_active_ns_list (int fd, __u32 nsid, struct nvme_ns_list *list) |
| 878 |
|
| 879 |
Retrieves active namespaces id list |
| 880 |
|
| 881 |
**Parameters** |
| 882 |
|
| 883 |
``int fd`` |
| 884 |
File descriptor of nvme device |
| 885 |
|
| 886 |
``__u32 nsid`` |
| 887 |
Return namespaces greater than this identifier |
| 888 |
|
| 889 |
``struct nvme_ns_list *list`` |
| 890 |
User space destination address to transfer the data |
| 891 |
|
| 892 |
**Description** |
| 893 |
|
| 894 |
A list of 1024 namespace IDs is returned to the host containing NSIDs in |
| 895 |
increasing order that are greater than the value specified in the Namespace |
| 896 |
Identifier (nsid) field of the command. |
| 897 |
|
| 898 |
See :c:type:`struct nvme_ns_list <nvme_ns_list>` for the definition of the returned structure. |
| 899 |
|
| 900 |
**Return** |
| 901 |
|
| 902 |
The nvme command status if a response was received (see |
| 903 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 904 |
|
| 905 |
|
| 906 |
.. c:function:: int nvme_identify_allocated_ns_list (int fd, __u32 nsid, struct nvme_ns_list *list) |
| 907 |
|
| 908 |
Retrieves allocated namespace id list |
| 909 |
|
| 910 |
**Parameters** |
| 911 |
|
| 912 |
``int fd`` |
| 913 |
File descriptor of nvme device |
| 914 |
|
| 915 |
``__u32 nsid`` |
| 916 |
Return namespaces greater than this identifier |
| 917 |
|
| 918 |
``struct nvme_ns_list *list`` |
| 919 |
User space destination address to transfer the data |
| 920 |
|
| 921 |
**Description** |
| 922 |
|
| 923 |
A list of 1024 namespace IDs is returned to the host containing NSIDs in |
| 924 |
increasing order that are greater than the value specified in the Namespace |
| 925 |
Identifier (nsid) field of the command. |
| 926 |
|
| 927 |
See :c:type:`struct nvme_ns_list <nvme_ns_list>` for the definition of the returned structure. |
| 928 |
|
| 929 |
**Return** |
| 930 |
|
| 931 |
The nvme command status if a response was received (see |
| 932 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 933 |
|
| 934 |
|
| 935 |
.. c:function:: int nvme_identify_ctrl_list (int fd, __u16 cntid, struct nvme_ctrl_list *cntlist) |
| 936 |
|
| 937 |
Retrieves identify controller list |
| 938 |
|
| 939 |
**Parameters** |
| 940 |
|
| 941 |
``int fd`` |
| 942 |
File descriptor of nvme device |
| 943 |
|
| 944 |
``__u16 cntid`` |
| 945 |
Starting CNTLID to return in the list |
| 946 |
|
| 947 |
``struct nvme_ctrl_list *cntlist`` |
| 948 |
User space destination address to transfer the data |
| 949 |
|
| 950 |
**Description** |
| 951 |
|
| 952 |
Up to 2047 controller identifiers is returned containing a controller |
| 953 |
identifier greater than or equal to the controller identifier specified in |
| 954 |
**cntid**. |
| 955 |
|
| 956 |
See :c:type:`struct nvme_ctrl_list <nvme_ctrl_list>` for a definition of the structure returned. |
| 957 |
|
| 958 |
**Return** |
| 959 |
|
| 960 |
The nvme command status if a response was received (see |
| 961 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 962 |
|
| 963 |
|
| 964 |
.. c:function:: int nvme_identify_nsid_ctrl_list (int fd, __u32 nsid, __u16 cntid, struct nvme_ctrl_list *cntlist) |
| 965 |
|
| 966 |
Retrieves controller list attached to an nsid |
| 967 |
|
| 968 |
**Parameters** |
| 969 |
|
| 970 |
``int fd`` |
| 971 |
File descriptor of nvme device |
| 972 |
|
| 973 |
``__u32 nsid`` |
| 974 |
Return controllers that are attached to this nsid |
| 975 |
|
| 976 |
``__u16 cntid`` |
| 977 |
Starting CNTLID to return in the list |
| 978 |
|
| 979 |
``struct nvme_ctrl_list *cntlist`` |
| 980 |
User space destination address to transfer the data |
| 981 |
|
| 982 |
**Description** |
| 983 |
|
| 984 |
Up to 2047 controller identifiers are returned containing a controller |
| 985 |
identifier greater than or equal to the controller identifier specified in |
| 986 |
**cntid** attached to **nsid**. |
| 987 |
|
| 988 |
See :c:type:`struct nvme_ctrl_list <nvme_ctrl_list>` for a definition of the structure returned. |
| 989 |
|
| 990 |
**Return** |
| 991 |
|
| 992 |
The nvme command status if a response was received (see |
| 993 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 |
| 994 |
|
| 995 |
|
| 996 |
.. c:function:: int nvme_identify_ns_descs (int fd, __u32 nsid, struct nvme_ns_id_desc *descs) |
| 997 |
|
| 998 |
Retrieves namespace descriptor list |
| 999 |
|
| 1000 |
**Parameters** |
| 1001 |
|
| 1002 |
``int fd`` |
| 1003 |
File descriptor of nvme device |
| 1004 |
|
| 1005 |
``__u32 nsid`` |
| 1006 |
The namespace id to retrieve descriptors |
| 1007 |
|
| 1008 |
``struct nvme_ns_id_desc *descs`` |
| 1009 |
User space destination address to transfer the data |
| 1010 |
|
| 1011 |
**Description** |
| 1012 |
|
| 1013 |
A list of Namespace Identification Descriptor structures is returned to the |
| 1014 |
host for the namespace specified in the Namespace Identifier (NSID) field if |
| 1015 |
it is an active NSID. |
| 1016 |
|
| 1017 |
The data returned is in the form of an array of 'struct nvme_ns_id_desc'. |
| 1018 |
|
| 1019 |
See :c:type:`struct nvme_ns_id_desc <nvme_ns_id_desc>` for the definition of the returned structure. |
| 1020 |
|
| 1021 |
**Return** |
| 1022 |
|
| 1023 |
The nvme command status if a response was received (see |
| 1024 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1025 |
|
| 1026 |
|
| 1027 |
.. c:function:: int nvme_identify_nvmset_list (int fd, __u16 nvmsetid, struct nvme_id_nvmset_list *nvmset) |
| 1028 |
|
| 1029 |
Retrieves NVM Set List |
| 1030 |
|
| 1031 |
**Parameters** |
| 1032 |
|
| 1033 |
``int fd`` |
| 1034 |
File descriptor of nvme device |
| 1035 |
|
| 1036 |
``__u16 nvmsetid`` |
| 1037 |
NVM Set Identifier |
| 1038 |
|
| 1039 |
``struct nvme_id_nvmset_list *nvmset`` |
| 1040 |
User space destination address to transfer the data |
| 1041 |
|
| 1042 |
**Description** |
| 1043 |
|
| 1044 |
Retrieves an NVM Set List, :c:type:`struct nvme_id_nvmset_list <nvme_id_nvmset_list>`. The data structure |
| 1045 |
is an ordered list by NVM Set Identifier, starting with the first NVM Set |
| 1046 |
Identifier supported by the NVM subsystem that is equal to or greater than |
| 1047 |
the NVM Set Identifier. |
| 1048 |
|
| 1049 |
See :c:type:`struct nvme_id_nvmset_list <nvme_id_nvmset_list>` for the definition of the returned structure. |
| 1050 |
|
| 1051 |
**Return** |
| 1052 |
|
| 1053 |
The nvme command status if a response was received (see |
| 1054 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1055 |
|
| 1056 |
|
| 1057 |
.. c:function:: int nvme_identify_primary_ctrl (int fd, __u16 cntid, struct nvme_primary_ctrl_cap *cap) |
| 1058 |
|
| 1059 |
Retrieve NVMe Primary Controller identification |
| 1060 |
|
| 1061 |
**Parameters** |
| 1062 |
|
| 1063 |
``int fd`` |
| 1064 |
File descriptor of nvme device |
| 1065 |
|
| 1066 |
``__u16 cntid`` |
| 1067 |
Return controllers starting at this identifier |
| 1068 |
|
| 1069 |
``struct nvme_primary_ctrl_cap *cap`` |
| 1070 |
User space destination buffer address to transfer the data |
| 1071 |
|
| 1072 |
**Description** |
| 1073 |
|
| 1074 |
See :c:type:`struct nvme_primary_ctrl_cap <nvme_primary_ctrl_cap>` for the definition of the returned structure, **cap**. |
| 1075 |
|
| 1076 |
**Return** |
| 1077 |
|
| 1078 |
The nvme command status if a response was received (see |
| 1079 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1080 |
|
| 1081 |
|
| 1082 |
.. c:function:: int nvme_identify_secondary_ctrl_list (int fd, __u16 cntid, struct nvme_secondary_ctrl_list *sc_list) |
| 1083 |
|
| 1084 |
Retrieves secondary controller list |
| 1085 |
|
| 1086 |
**Parameters** |
| 1087 |
|
| 1088 |
``int fd`` |
| 1089 |
File descriptor of nvme device |
| 1090 |
|
| 1091 |
``__u16 cntid`` |
| 1092 |
Return controllers starting at this identifier |
| 1093 |
|
| 1094 |
``struct nvme_secondary_ctrl_list *sc_list`` |
| 1095 |
User space destination address to transfer the data |
| 1096 |
|
| 1097 |
**Description** |
| 1098 |
|
| 1099 |
A Secondary Controller List is returned to the host for up to 127 secondary |
| 1100 |
controllers associated with the primary controller processing this command. |
| 1101 |
The list contains entries for controller identifiers greater than or equal |
| 1102 |
to the value specified in the Controller Identifier (cntid). |
| 1103 |
|
| 1104 |
See :c:type:`struct nvme_secondary_ctrls_list <nvme_secondary_ctrls_list>` for a definition of the returned |
| 1105 |
structure. |
| 1106 |
|
| 1107 |
**Return** |
| 1108 |
|
| 1109 |
The nvme command status if a response was received (see |
| 1110 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1111 |
|
| 1112 |
|
| 1113 |
.. c:function:: int nvme_identify_ns_granularity (int fd, struct nvme_id_ns_granularity_list *gr_list) |
| 1114 |
|
| 1115 |
Retrieves namespace granularity identification |
| 1116 |
|
| 1117 |
**Parameters** |
| 1118 |
|
| 1119 |
``int fd`` |
| 1120 |
File descriptor of nvme device |
| 1121 |
|
| 1122 |
``struct nvme_id_ns_granularity_list *gr_list`` |
| 1123 |
User space destination address to transfer the data |
| 1124 |
|
| 1125 |
**Description** |
| 1126 |
|
| 1127 |
If the controller supports reporting of Namespace Granularity, then a |
| 1128 |
Namespace Granularity List is returned to the host for up to sixteen |
| 1129 |
namespace granularity descriptors |
| 1130 |
|
| 1131 |
See :c:type:`struct nvme_id_ns_granularity_list <nvme_id_ns_granularity_list>` for the definition of the returned |
| 1132 |
structure. |
| 1133 |
|
| 1134 |
**Return** |
| 1135 |
|
| 1136 |
The nvme command status if a response was received (see |
| 1137 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1138 |
|
| 1139 |
|
| 1140 |
.. c:function:: int nvme_identify_uuid (int fd, struct nvme_id_uuid_list *uuid_list) |
| 1141 |
|
| 1142 |
Retrieves device's UUIDs |
| 1143 |
|
| 1144 |
**Parameters** |
| 1145 |
|
| 1146 |
``int fd`` |
| 1147 |
File descriptor of nvme device |
| 1148 |
|
| 1149 |
``struct nvme_id_uuid_list *uuid_list`` |
| 1150 |
User space destination address to transfer the data |
| 1151 |
|
| 1152 |
**Description** |
| 1153 |
|
| 1154 |
Each UUID List entry is either 0h, the NVMe Invalid UUID, or a valid UUID. |
| 1155 |
Valid UUIDs are those which are non-zero and are not the NVMe Invalid UUID. |
| 1156 |
|
| 1157 |
See :c:type:`struct nvme_id_uuid_list <nvme_id_uuid_list>` for the definition of the returned structure. |
| 1158 |
|
| 1159 |
**Return** |
| 1160 |
|
| 1161 |
The nvme command status if a response was received (see |
| 1162 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1163 |
|
| 1164 |
|
| 1165 |
.. c:function:: int nvme_identify_ns_csi (int fd, __u32 nsid, __u8 uuidx, enum nvme_csi csi, void *data) |
| 1166 |
|
| 1167 |
I/O command set specific identify namespace data |
| 1168 |
|
| 1169 |
**Parameters** |
| 1170 |
|
| 1171 |
``int fd`` |
| 1172 |
File descriptor of nvme device |
| 1173 |
|
| 1174 |
``__u32 nsid`` |
| 1175 |
Namespace to identify |
| 1176 |
|
| 1177 |
``__u8 uuidx`` |
| 1178 |
UUID Index for differentiating vendor specific encoding |
| 1179 |
|
| 1180 |
``enum nvme_csi csi`` |
| 1181 |
Command Set Identifier |
| 1182 |
|
| 1183 |
``void *data`` |
| 1184 |
User space destination address to transfer the data |
| 1185 |
|
| 1186 |
**Description** |
| 1187 |
|
| 1188 |
An I/O Command Set specific Identify Namespace data structure is returned |
| 1189 |
for the namespace specified in **nsid**. |
| 1190 |
|
| 1191 |
**Return** |
| 1192 |
|
| 1193 |
The nvme command status if a response was received (see |
| 1194 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1195 |
|
| 1196 |
|
| 1197 |
.. c:function:: int nvme_identify_ctrl_csi (int fd, enum nvme_csi csi, void *data) |
| 1198 |
|
| 1199 |
I/O command set specific Identify Controller data |
| 1200 |
|
| 1201 |
**Parameters** |
| 1202 |
|
| 1203 |
``int fd`` |
| 1204 |
File descriptor of nvme device |
| 1205 |
|
| 1206 |
``enum nvme_csi csi`` |
| 1207 |
Command Set Identifier |
| 1208 |
|
| 1209 |
``void *data`` |
| 1210 |
User space destination address to transfer the data |
| 1211 |
|
| 1212 |
**Description** |
| 1213 |
|
| 1214 |
An I/O Command Set specific Identify Controller data structure is returned |
| 1215 |
to the host for the controller processing the command. The specific Identify |
| 1216 |
Controller data structure to be returned is specified by **csi**. |
| 1217 |
|
| 1218 |
**Return** |
| 1219 |
|
| 1220 |
The nvme command status if a response was received (see |
| 1221 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1222 |
|
| 1223 |
|
| 1224 |
.. c:function:: int nvme_identify_active_ns_list_csi (int fd, __u32 nsid, enum nvme_csi csi, struct nvme_ns_list *ns_list) |
| 1225 |
|
| 1226 |
Active namespace ID list associated with a specified I/O command set |
| 1227 |
|
| 1228 |
**Parameters** |
| 1229 |
|
| 1230 |
``int fd`` |
| 1231 |
File descriptor of nvme device |
| 1232 |
|
| 1233 |
``__u32 nsid`` |
| 1234 |
Return namespaces greater than this identifier |
| 1235 |
|
| 1236 |
``enum nvme_csi csi`` |
| 1237 |
Command Set Identifier |
| 1238 |
|
| 1239 |
``struct nvme_ns_list *ns_list`` |
| 1240 |
User space destination address to transfer the data |
| 1241 |
|
| 1242 |
**Description** |
| 1243 |
|
| 1244 |
A list of 1024 namespace IDs is returned to the host containing active |
| 1245 |
NSIDs in increasing order that are greater than the value specified in |
| 1246 |
the Namespace Identifier (nsid) field of the command and matching the |
| 1247 |
I/O Command Set specified in the **csi** argument. |
| 1248 |
|
| 1249 |
See :c:type:`struct nvme_ns_list <nvme_ns_list>` for the definition of the returned structure. |
| 1250 |
|
| 1251 |
**Return** |
| 1252 |
|
| 1253 |
The nvme command status if a response was received (see |
| 1254 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1255 |
|
| 1256 |
|
| 1257 |
.. c:function:: int nvme_identify_allocated_ns_list_csi (int fd, __u32 nsid, enum nvme_csi csi, struct nvme_ns_list *ns_list) |
| 1258 |
|
| 1259 |
Allocated namespace ID list associated with a specified I/O command set |
| 1260 |
|
| 1261 |
**Parameters** |
| 1262 |
|
| 1263 |
``int fd`` |
| 1264 |
File descriptor of nvme device |
| 1265 |
|
| 1266 |
``__u32 nsid`` |
| 1267 |
Return namespaces greater than this identifier |
| 1268 |
|
| 1269 |
``enum nvme_csi csi`` |
| 1270 |
Command Set Identifier |
| 1271 |
|
| 1272 |
``struct nvme_ns_list *ns_list`` |
| 1273 |
User space destination address to transfer the data |
| 1274 |
|
| 1275 |
**Description** |
| 1276 |
|
| 1277 |
A list of 1024 namespace IDs is returned to the host containing allocated |
| 1278 |
NSIDs in increasing order that are greater than the value specified in |
| 1279 |
the **nsid** field of the command and matching the I/O Command Set |
| 1280 |
specified in the **csi** argument. |
| 1281 |
|
| 1282 |
See :c:type:`struct nvme_ns_list <nvme_ns_list>` for the definition of the returned structure. |
| 1283 |
|
| 1284 |
**Return** |
| 1285 |
|
| 1286 |
The nvme command status if a response was received (see |
| 1287 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1288 |
|
| 1289 |
|
| 1290 |
.. c:function:: int nvme_identify_independent_identify_ns (int fd, __u32 nsid, struct nvme_id_independent_id_ns *ns) |
| 1291 |
|
| 1292 |
I/O command set independent Identify namespace data |
| 1293 |
|
| 1294 |
**Parameters** |
| 1295 |
|
| 1296 |
``int fd`` |
| 1297 |
File descriptor of nvme device |
| 1298 |
|
| 1299 |
``__u32 nsid`` |
| 1300 |
Return namespaces greater than this identifier |
| 1301 |
|
| 1302 |
``struct nvme_id_independent_id_ns *ns`` |
| 1303 |
I/O Command Set Independent Identify Namespace data |
| 1304 |
structure |
| 1305 |
|
| 1306 |
**Description** |
| 1307 |
|
| 1308 |
The I/O command set independent Identify namespace data structure for |
| 1309 |
the namespace identified with **ns** is returned to the host. |
| 1310 |
|
| 1311 |
**Return** |
| 1312 |
|
| 1313 |
The nvme command status if a response was received (see |
| 1314 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1315 |
|
| 1316 |
|
| 1317 |
.. c:function:: int nvme_identify_ns_csi_user_data_format (int fd, __u16 user_data_format, __u8 uuidx, enum nvme_csi csi, void *data) |
| 1318 |
|
| 1319 |
Identify namespace user data format |
| 1320 |
|
| 1321 |
**Parameters** |
| 1322 |
|
| 1323 |
``int fd`` |
| 1324 |
File descriptor of nvme device |
| 1325 |
|
| 1326 |
``__u16 user_data_format`` |
| 1327 |
Return namespaces capability of identifier |
| 1328 |
|
| 1329 |
``__u8 uuidx`` |
| 1330 |
UUID selection, if supported |
| 1331 |
|
| 1332 |
``enum nvme_csi csi`` |
| 1333 |
Command Set Identifier |
| 1334 |
|
| 1335 |
``void *data`` |
| 1336 |
User space destination address to transfer the data |
| 1337 |
|
| 1338 |
**Description** |
| 1339 |
|
| 1340 |
Identify Namespace data structure for the specified User Data Format |
| 1341 |
index containing the namespace capabilities for the NVM Command Set. |
| 1342 |
|
| 1343 |
**Return** |
| 1344 |
|
| 1345 |
The nvme command status if a response was received (see |
| 1346 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1347 |
|
| 1348 |
|
| 1349 |
.. c:function:: int nvme_identify_iocs_ns_csi_user_data_format (int fd, __u16 user_data_format, __u8 uuidx, enum nvme_csi csi, void *data) |
| 1350 |
|
| 1351 |
Identify I/O command set namespace data structure |
| 1352 |
|
| 1353 |
**Parameters** |
| 1354 |
|
| 1355 |
``int fd`` |
| 1356 |
File descriptor of nvme device |
| 1357 |
|
| 1358 |
``__u16 user_data_format`` |
| 1359 |
Return namespaces capability of identifier |
| 1360 |
|
| 1361 |
``__u8 uuidx`` |
| 1362 |
UUID selection, if supported |
| 1363 |
|
| 1364 |
``enum nvme_csi csi`` |
| 1365 |
Command Set Identifier |
| 1366 |
|
| 1367 |
``void *data`` |
| 1368 |
User space destination address to transfer the data |
| 1369 |
|
| 1370 |
**Description** |
| 1371 |
|
| 1372 |
I/O Command Set specific Identify Namespace data structure for |
| 1373 |
the specified User Data Format index containing the namespace |
| 1374 |
capabilities for the I/O Command Set specified in the CSI field. |
| 1375 |
|
| 1376 |
**Return** |
| 1377 |
|
| 1378 |
The nvme command status if a response was received (see |
| 1379 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1380 |
|
| 1381 |
|
| 1382 |
.. c:function:: int nvme_nvm_identify_ctrl (int fd, struct nvme_id_ctrl_nvm *id) |
| 1383 |
|
| 1384 |
Identify controller data |
| 1385 |
|
| 1386 |
**Parameters** |
| 1387 |
|
| 1388 |
``int fd`` |
| 1389 |
File descriptor of nvme device |
| 1390 |
|
| 1391 |
``struct nvme_id_ctrl_nvm *id`` |
| 1392 |
User space destination address to transfer the data |
| 1393 |
|
| 1394 |
**Description** |
| 1395 |
|
| 1396 |
Return an identify controller data structure to the host of |
| 1397 |
processing controller. |
| 1398 |
|
| 1399 |
**Return** |
| 1400 |
|
| 1401 |
The nvme command status if a response was received (see |
| 1402 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1403 |
|
| 1404 |
|
| 1405 |
.. c:function:: int nvme_identify_domain_list (int fd, __u16 domid, struct nvme_id_domain_list *list) |
| 1406 |
|
| 1407 |
Domain list data |
| 1408 |
|
| 1409 |
**Parameters** |
| 1410 |
|
| 1411 |
``int fd`` |
| 1412 |
File descriptor of nvme device |
| 1413 |
|
| 1414 |
``__u16 domid`` |
| 1415 |
Domain ID |
| 1416 |
|
| 1417 |
``struct nvme_id_domain_list *list`` |
| 1418 |
User space destination address to transfer data |
| 1419 |
|
| 1420 |
**Description** |
| 1421 |
|
| 1422 |
A list of 31 domain IDs is returned to the host containing domain |
| 1423 |
attributes in increasing order that are greater than the value |
| 1424 |
specified in the **domid** field. |
| 1425 |
|
| 1426 |
See :c:type:`struct nvme_identify_domain_attr <nvme_identify_domain_attr>` for the definition of the |
| 1427 |
returned structure. |
| 1428 |
|
| 1429 |
**Return** |
| 1430 |
|
| 1431 |
The nvme command status if a response was received (see |
| 1432 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1433 |
|
| 1434 |
|
| 1435 |
.. c:function:: int nvme_identify_endurance_group_list (int fd, __u16 endgrp_id, struct nvme_id_endurance_group_list *list) |
| 1436 |
|
| 1437 |
Endurance group list data |
| 1438 |
|
| 1439 |
**Parameters** |
| 1440 |
|
| 1441 |
``int fd`` |
| 1442 |
File descriptor of nvme device |
| 1443 |
|
| 1444 |
``__u16 endgrp_id`` |
| 1445 |
Endurance group identifier |
| 1446 |
|
| 1447 |
``struct nvme_id_endurance_group_list *list`` |
| 1448 |
Array of endurance group identifiers |
| 1449 |
|
| 1450 |
**Return** |
| 1451 |
|
| 1452 |
The nvme command status if a response was received (see |
| 1453 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1454 |
|
| 1455 |
|
| 1456 |
.. c:function:: int nvme_identify_iocs (int fd, __u16 cntlid, struct nvme_id_iocs *iocs) |
| 1457 |
|
| 1458 |
I/O command set data structure |
| 1459 |
|
| 1460 |
**Parameters** |
| 1461 |
|
| 1462 |
``int fd`` |
| 1463 |
File descriptor of nvme device |
| 1464 |
|
| 1465 |
``__u16 cntlid`` |
| 1466 |
Controller ID |
| 1467 |
|
| 1468 |
``struct nvme_id_iocs *iocs`` |
| 1469 |
User space destination address to transfer the data |
| 1470 |
|
| 1471 |
**Description** |
| 1472 |
|
| 1473 |
Retrieves list of the controller's supported io command set vectors. See |
| 1474 |
:c:type:`struct nvme_id_iocs <nvme_id_iocs>`. |
| 1475 |
|
| 1476 |
**Return** |
| 1477 |
|
| 1478 |
The nvme command status if a response was received (see |
| 1479 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1480 |
|
| 1481 |
|
| 1482 |
.. c:function:: int nvme_zns_identify_ns (int fd, __u32 nsid, struct nvme_zns_id_ns *data) |
| 1483 |
|
| 1484 |
ZNS identify namespace data |
| 1485 |
|
| 1486 |
**Parameters** |
| 1487 |
|
| 1488 |
``int fd`` |
| 1489 |
File descriptor of nvme device |
| 1490 |
|
| 1491 |
``__u32 nsid`` |
| 1492 |
Namespace to identify |
| 1493 |
|
| 1494 |
``struct nvme_zns_id_ns *data`` |
| 1495 |
User space destination address to transfer the data |
| 1496 |
|
| 1497 |
**Return** |
| 1498 |
|
| 1499 |
The nvme command status if a response was received (see |
| 1500 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1501 |
|
| 1502 |
|
| 1503 |
.. c:function:: int nvme_zns_identify_ctrl (int fd, struct nvme_zns_id_ctrl *id) |
| 1504 |
|
| 1505 |
ZNS identify controller data |
| 1506 |
|
| 1507 |
**Parameters** |
| 1508 |
|
| 1509 |
``int fd`` |
| 1510 |
File descriptor of nvme device |
| 1511 |
|
| 1512 |
``struct nvme_zns_id_ctrl *id`` |
| 1513 |
User space destination address to transfer the data |
| 1514 |
|
| 1515 |
**Return** |
| 1516 |
|
| 1517 |
The nvme command status if a response was received (see |
| 1518 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1519 |
|
| 1520 |
|
| 1521 |
.. c:function:: int nvme_get_log (struct nvme_get_log_args *args) |
| 1522 |
|
| 1523 |
NVMe Admin Get Log command |
| 1524 |
|
| 1525 |
**Parameters** |
| 1526 |
|
| 1527 |
``struct nvme_get_log_args *args`` |
| 1528 |
:c:type:`struct nvme_get_log_args <nvme_get_log_args>` argument structure |
| 1529 |
|
| 1530 |
**Return** |
| 1531 |
|
| 1532 |
The nvme command status if a response was received (see |
| 1533 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1534 |
|
| 1535 |
|
| 1536 |
.. c:function:: int nvme_get_log_page (int fd, __u32 xfer_len, struct nvme_get_log_args *args) |
| 1537 |
|
| 1538 |
Get log page data |
| 1539 |
|
| 1540 |
**Parameters** |
| 1541 |
|
| 1542 |
``int fd`` |
| 1543 |
File descriptor of nvme device |
| 1544 |
|
| 1545 |
``__u32 xfer_len`` |
| 1546 |
Max log transfer size per request to split the total. |
| 1547 |
|
| 1548 |
``struct nvme_get_log_args *args`` |
| 1549 |
:c:type:`struct nvme_get_log_args <nvme_get_log_args>` argument structure |
| 1550 |
|
| 1551 |
**Return** |
| 1552 |
|
| 1553 |
The nvme command status if a response was received (see |
| 1554 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1555 |
|
| 1556 |
|
| 1557 |
.. c:function:: int nvme_get_log_supported_log_pages (int fd, bool rae, struct nvme_supported_log_pages *log) |
| 1558 |
|
| 1559 |
Retrieve nmve supported log pages |
| 1560 |
|
| 1561 |
**Parameters** |
| 1562 |
|
| 1563 |
``int fd`` |
| 1564 |
File descriptor of nvme device |
| 1565 |
|
| 1566 |
``bool rae`` |
| 1567 |
Retain asynchronous events |
| 1568 |
|
| 1569 |
``struct nvme_supported_log_pages *log`` |
| 1570 |
Array of LID supported and Effects data structures |
| 1571 |
|
| 1572 |
**Return** |
| 1573 |
|
| 1574 |
The nvme command status if a response was received (see |
| 1575 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1576 |
|
| 1577 |
|
| 1578 |
.. c:function:: int nvme_get_log_error (int fd, unsigned int nr_entries, bool rae, struct nvme_error_log_page *err_log) |
| 1579 |
|
| 1580 |
Retrieve nvme error log |
| 1581 |
|
| 1582 |
**Parameters** |
| 1583 |
|
| 1584 |
``int fd`` |
| 1585 |
File descriptor of nvme device |
| 1586 |
|
| 1587 |
``unsigned int nr_entries`` |
| 1588 |
Number of error log entries allocated |
| 1589 |
|
| 1590 |
``bool rae`` |
| 1591 |
Retain asynchronous events |
| 1592 |
|
| 1593 |
``struct nvme_error_log_page *err_log`` |
| 1594 |
Array of error logs of size 'entries' |
| 1595 |
|
| 1596 |
**Description** |
| 1597 |
|
| 1598 |
This log page describes extended error information for a command that |
| 1599 |
completed with error, or may report an error that is not specific to a |
| 1600 |
particular command. |
| 1601 |
|
| 1602 |
**Return** |
| 1603 |
|
| 1604 |
The nvme command status if a response was received (see |
| 1605 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1606 |
|
| 1607 |
|
| 1608 |
.. c:function:: int nvme_get_log_smart (int fd, __u32 nsid, bool rae, struct nvme_smart_log *smart_log) |
| 1609 |
|
| 1610 |
Retrieve nvme smart log |
| 1611 |
|
| 1612 |
**Parameters** |
| 1613 |
|
| 1614 |
``int fd`` |
| 1615 |
File descriptor of nvme device |
| 1616 |
|
| 1617 |
``__u32 nsid`` |
| 1618 |
Optional namespace identifier |
| 1619 |
|
| 1620 |
``bool rae`` |
| 1621 |
Retain asynchronous events |
| 1622 |
|
| 1623 |
``struct nvme_smart_log *smart_log`` |
| 1624 |
User address to store the smart log |
| 1625 |
|
| 1626 |
**Description** |
| 1627 |
|
| 1628 |
This log page provides SMART and general health information. The information |
| 1629 |
provided is over the life of the controller and is retained across power |
| 1630 |
cycles. To request the controller log page, the namespace identifier |
| 1631 |
specified is FFFFFFFFh. The controller may also support requesting the log |
| 1632 |
page on a per namespace basis, as indicated by bit 0 of the LPA field in the |
| 1633 |
Identify Controller data structure. |
| 1634 |
|
| 1635 |
**Return** |
| 1636 |
|
| 1637 |
The nvme command status if a response was received (see |
| 1638 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1639 |
|
| 1640 |
|
| 1641 |
.. c:function:: int nvme_get_log_fw_slot (int fd, bool rae, struct nvme_firmware_slot *fw_log) |
| 1642 |
|
| 1643 |
Retrieves the controller firmware log |
| 1644 |
|
| 1645 |
**Parameters** |
| 1646 |
|
| 1647 |
``int fd`` |
| 1648 |
File descriptor of nvme device |
| 1649 |
|
| 1650 |
``bool rae`` |
| 1651 |
Retain asynchronous events |
| 1652 |
|
| 1653 |
``struct nvme_firmware_slot *fw_log`` |
| 1654 |
User address to store the log page |
| 1655 |
|
| 1656 |
**Description** |
| 1657 |
|
| 1658 |
This log page describes the firmware revision stored in each firmware slot |
| 1659 |
supported. The firmware revision is indicated as an ASCII string. The log |
| 1660 |
page also indicates the active slot number. |
| 1661 |
|
| 1662 |
**Return** |
| 1663 |
|
| 1664 |
The nvme command status if a response was received (see |
| 1665 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1666 |
|
| 1667 |
|
| 1668 |
.. c:function:: int nvme_get_log_changed_ns_list (int fd, bool rae, struct nvme_ns_list *ns_log) |
| 1669 |
|
| 1670 |
Retrieve namespace changed list |
| 1671 |
|
| 1672 |
**Parameters** |
| 1673 |
|
| 1674 |
``int fd`` |
| 1675 |
File descriptor of nvme device |
| 1676 |
|
| 1677 |
``bool rae`` |
| 1678 |
Retain asynchronous events |
| 1679 |
|
| 1680 |
``struct nvme_ns_list *ns_log`` |
| 1681 |
User address to store the log page |
| 1682 |
|
| 1683 |
**Description** |
| 1684 |
|
| 1685 |
This log page describes namespaces attached to this controller that have |
| 1686 |
changed since the last time the namespace was identified, been added, or |
| 1687 |
deleted. |
| 1688 |
|
| 1689 |
**Return** |
| 1690 |
|
| 1691 |
The nvme command status if a response was received (see |
| 1692 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1693 |
|
| 1694 |
|
| 1695 |
.. c:function:: int nvme_get_log_cmd_effects (int fd, enum nvme_csi csi, struct nvme_cmd_effects_log *effects_log) |
| 1696 |
|
| 1697 |
Retrieve nvme command effects log |
| 1698 |
|
| 1699 |
**Parameters** |
| 1700 |
|
| 1701 |
``int fd`` |
| 1702 |
File descriptor of nvme device |
| 1703 |
|
| 1704 |
``enum nvme_csi csi`` |
| 1705 |
Command Set Identifier |
| 1706 |
|
| 1707 |
``struct nvme_cmd_effects_log *effects_log`` |
| 1708 |
User address to store the effects log |
| 1709 |
|
| 1710 |
**Description** |
| 1711 |
|
| 1712 |
This log page describes the commands that the controller supports and the |
| 1713 |
effects of those commands on the state of the NVM subsystem. |
| 1714 |
|
| 1715 |
**Return** |
| 1716 |
|
| 1717 |
The nvme command status if a response was received (see |
| 1718 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1719 |
|
| 1720 |
|
| 1721 |
.. c:function:: int nvme_get_log_device_self_test (int fd, struct nvme_self_test_log *log) |
| 1722 |
|
| 1723 |
Retrieve the device self test log |
| 1724 |
|
| 1725 |
**Parameters** |
| 1726 |
|
| 1727 |
``int fd`` |
| 1728 |
File descriptor of nvme device |
| 1729 |
|
| 1730 |
``struct nvme_self_test_log *log`` |
| 1731 |
Userspace address of the log payload |
| 1732 |
|
| 1733 |
**Description** |
| 1734 |
|
| 1735 |
The log page indicates the status of an in progress self test and the |
| 1736 |
percent complete of that operation, and the results of the previous 20 |
| 1737 |
self-test operations. |
| 1738 |
|
| 1739 |
**Return** |
| 1740 |
|
| 1741 |
The nvme command status if a response was received (see |
| 1742 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1743 |
|
| 1744 |
|
| 1745 |
.. c:function:: int nvme_get_log_create_telemetry_host_mcda (int fd, enum nvme_telemetry_da mcda, struct nvme_telemetry_log *log) |
| 1746 |
|
| 1747 |
Create host telemetry log |
| 1748 |
|
| 1749 |
**Parameters** |
| 1750 |
|
| 1751 |
``int fd`` |
| 1752 |
File descriptor of nvme device |
| 1753 |
|
| 1754 |
``enum nvme_telemetry_da mcda`` |
| 1755 |
Maximum Created Data Area |
| 1756 |
|
| 1757 |
``struct nvme_telemetry_log *log`` |
| 1758 |
Userspace address of the log payload |
| 1759 |
|
| 1760 |
**Return** |
| 1761 |
|
| 1762 |
The nvme command status if a response was received (see |
| 1763 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1764 |
|
| 1765 |
|
| 1766 |
.. c:function:: int nvme_get_log_create_telemetry_host (int fd, struct nvme_telemetry_log *log) |
| 1767 |
|
| 1768 |
Create host telemetry log |
| 1769 |
|
| 1770 |
**Parameters** |
| 1771 |
|
| 1772 |
``int fd`` |
| 1773 |
File descriptor of nvme device |
| 1774 |
|
| 1775 |
``struct nvme_telemetry_log *log`` |
| 1776 |
Userspace address of the log payload |
| 1777 |
|
| 1778 |
**Return** |
| 1779 |
|
| 1780 |
The nvme command status if a response was received (see |
| 1781 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1782 |
|
| 1783 |
|
| 1784 |
.. c:function:: int nvme_get_log_telemetry_host (int fd, __u64 offset, __u32 len, void *log) |
| 1785 |
|
| 1786 |
Get Telemetry Host-Initiated log page |
| 1787 |
|
| 1788 |
**Parameters** |
| 1789 |
|
| 1790 |
``int fd`` |
| 1791 |
File descriptor of nvme device |
| 1792 |
|
| 1793 |
``__u64 offset`` |
| 1794 |
Offset into the telemetry data |
| 1795 |
|
| 1796 |
``__u32 len`` |
| 1797 |
Length of provided user buffer to hold the log data in bytes |
| 1798 |
|
| 1799 |
``void *log`` |
| 1800 |
User address for log page data |
| 1801 |
|
| 1802 |
**Description** |
| 1803 |
|
| 1804 |
Retrieves the Telemetry Host-Initiated log page at the requested offset |
| 1805 |
using the previously existing capture. |
| 1806 |
|
| 1807 |
**Return** |
| 1808 |
|
| 1809 |
The nvme command status if a response was received (see |
| 1810 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1811 |
|
| 1812 |
|
| 1813 |
.. c:function:: int nvme_get_log_telemetry_ctrl (int fd, bool rae, __u64 offset, __u32 len, void *log) |
| 1814 |
|
| 1815 |
Get Telemetry Controller-Initiated log page |
| 1816 |
|
| 1817 |
**Parameters** |
| 1818 |
|
| 1819 |
``int fd`` |
| 1820 |
File descriptor of nvme device |
| 1821 |
|
| 1822 |
``bool rae`` |
| 1823 |
Retain asynchronous events |
| 1824 |
|
| 1825 |
``__u64 offset`` |
| 1826 |
Offset into the telemetry data |
| 1827 |
|
| 1828 |
``__u32 len`` |
| 1829 |
Length of provided user buffer to hold the log data in bytes |
| 1830 |
|
| 1831 |
``void *log`` |
| 1832 |
User address for log page data |
| 1833 |
|
| 1834 |
**Description** |
| 1835 |
|
| 1836 |
Retrieves the Telemetry Controller-Initiated log page at the requested offset |
| 1837 |
using the previously existing capture. |
| 1838 |
|
| 1839 |
**Return** |
| 1840 |
|
| 1841 |
The nvme command status if a response was received (see |
| 1842 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1843 |
|
| 1844 |
|
| 1845 |
.. c:function:: int nvme_get_log_endurance_group (int fd, __u16 endgid, struct nvme_endurance_group_log *log) |
| 1846 |
|
| 1847 |
Get Endurance Group log |
| 1848 |
|
| 1849 |
**Parameters** |
| 1850 |
|
| 1851 |
``int fd`` |
| 1852 |
File descriptor of nvme device |
| 1853 |
|
| 1854 |
``__u16 endgid`` |
| 1855 |
Starting group identifier to return in the list |
| 1856 |
|
| 1857 |
``struct nvme_endurance_group_log *log`` |
| 1858 |
User address to store the endurance log |
| 1859 |
|
| 1860 |
**Description** |
| 1861 |
|
| 1862 |
This log page indicates if an Endurance Group Event has occurred for a |
| 1863 |
particular Endurance Group. If an Endurance Group Event has occurred, the |
| 1864 |
details of the particular event are included in the Endurance Group |
| 1865 |
Information log page for that Endurance Group. An asynchronous event is |
| 1866 |
generated when an entry for an Endurance Group is newly added to this log |
| 1867 |
page. |
| 1868 |
|
| 1869 |
**Return** |
| 1870 |
|
| 1871 |
The nvme command status if a response was received (see |
| 1872 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1873 |
|
| 1874 |
|
| 1875 |
.. c:function:: int nvme_get_log_predictable_lat_nvmset (int fd, __u16 nvmsetid, struct nvme_nvmset_predictable_lat_log *log) |
| 1876 |
|
| 1877 |
Predictable Latency Per NVM Set |
| 1878 |
|
| 1879 |
**Parameters** |
| 1880 |
|
| 1881 |
``int fd`` |
| 1882 |
File descriptor of nvme device |
| 1883 |
|
| 1884 |
``__u16 nvmsetid`` |
| 1885 |
NVM set id |
| 1886 |
|
| 1887 |
``struct nvme_nvmset_predictable_lat_log *log`` |
| 1888 |
User address to store the predictable latency log |
| 1889 |
|
| 1890 |
**Return** |
| 1891 |
|
| 1892 |
The nvme command status if a response was received (see |
| 1893 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1894 |
|
| 1895 |
|
| 1896 |
.. c:function:: int nvme_get_log_predictable_lat_event (int fd, bool rae, __u32 offset, __u32 len, void *log) |
| 1897 |
|
| 1898 |
Retrieve Predictable Latency Event Aggregate Log Page |
| 1899 |
|
| 1900 |
**Parameters** |
| 1901 |
|
| 1902 |
``int fd`` |
| 1903 |
File descriptor of nvme device |
| 1904 |
|
| 1905 |
``bool rae`` |
| 1906 |
Retain asynchronous events |
| 1907 |
|
| 1908 |
``__u32 offset`` |
| 1909 |
Offset into the predictable latency event |
| 1910 |
|
| 1911 |
``__u32 len`` |
| 1912 |
Length of provided user buffer to hold the log data in bytes |
| 1913 |
|
| 1914 |
``void *log`` |
| 1915 |
User address for log page data |
| 1916 |
|
| 1917 |
**Return** |
| 1918 |
|
| 1919 |
The nvme command status if a response was received (see |
| 1920 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 1921 |
|
| 1922 |
|
| 1923 |
.. c:function:: int nvme_get_log_fdp_configurations (int fd, __u16 egid, __u32 offset, __u32 len, void *log) |
| 1924 |
|
| 1925 |
Get list of Flexible Data Placement configurations |
| 1926 |
|
| 1927 |
**Parameters** |
| 1928 |
|
| 1929 |
``int fd`` |
| 1930 |
File descriptor of nvme device |
| 1931 |
|
| 1932 |
``__u16 egid`` |
| 1933 |
Endurance group identifier |
| 1934 |
|
| 1935 |
``__u32 offset`` |
| 1936 |
Offset into log page |
| 1937 |
|
| 1938 |
``__u32 len`` |
| 1939 |
Length (in bytes) of provided user buffer to hold the log data |
| 1940 |
|
| 1941 |
``void *log`` |
| 1942 |
Log page data buffer |
| 1943 |
|
| 1944 |
|
| 1945 |
.. c:function:: int nvme_get_log_reclaim_unit_handle_usage (int fd, __u16 egid, __u32 offset, __u32 len, void *log) |
| 1946 |
|
| 1947 |
Get reclaim unit handle usage |
| 1948 |
|
| 1949 |
**Parameters** |
| 1950 |
|
| 1951 |
``int fd`` |
| 1952 |
File descriptor of nvme device |
| 1953 |
|
| 1954 |
``__u16 egid`` |
| 1955 |
Endurance group identifier |
| 1956 |
|
| 1957 |
``__u32 offset`` |
| 1958 |
Offset into log page |
| 1959 |
|
| 1960 |
``__u32 len`` |
| 1961 |
Length (in bytes) of provided user buffer to hold the log data |
| 1962 |
|
| 1963 |
``void *log`` |
| 1964 |
Log page data buffer |
| 1965 |
|
| 1966 |
|
| 1967 |
.. c:function:: int nvme_get_log_fdp_stats (int fd, __u16 egid, __u32 offset, __u32 len, void *log) |
| 1968 |
|
| 1969 |
Get Flexible Data Placement statistics |
| 1970 |
|
| 1971 |
**Parameters** |
| 1972 |
|
| 1973 |
``int fd`` |
| 1974 |
File descriptor of nvme device |
| 1975 |
|
| 1976 |
``__u16 egid`` |
| 1977 |
Endurance group identifier |
| 1978 |
|
| 1979 |
``__u32 offset`` |
| 1980 |
Offset into log page |
| 1981 |
|
| 1982 |
``__u32 len`` |
| 1983 |
Length (in bytes) of provided user buffer to hold the log data |
| 1984 |
|
| 1985 |
``void *log`` |
| 1986 |
Log page data buffer |
| 1987 |
|
| 1988 |
|
| 1989 |
.. c:function:: int nvme_get_log_fdp_events (int fd, __u16 egid, bool host_events, __u32 offset, __u32 len, void *log) |
| 1990 |
|
| 1991 |
Get Flexible Data Placement events |
| 1992 |
|
| 1993 |
**Parameters** |
| 1994 |
|
| 1995 |
``int fd`` |
| 1996 |
File descriptor of nvme device |
| 1997 |
|
| 1998 |
``__u16 egid`` |
| 1999 |
Endurance group identifier |
| 2000 |
|
| 2001 |
``bool host_events`` |
| 2002 |
Whether to report host or controller events |
| 2003 |
|
| 2004 |
``__u32 offset`` |
| 2005 |
Offset into log page |
| 2006 |
|
| 2007 |
``__u32 len`` |
| 2008 |
Length (in bytes) of provided user buffer to hold the log data |
| 2009 |
|
| 2010 |
``void *log`` |
| 2011 |
Log page data buffer |
| 2012 |
|
| 2013 |
|
| 2014 |
.. c:function:: int nvme_get_log_ana (int fd, enum nvme_log_ana_lsp lsp, bool rae, __u64 offset, __u32 len, void *log) |
| 2015 |
|
| 2016 |
Retrieve Asymmetric Namespace Access log page |
| 2017 |
|
| 2018 |
**Parameters** |
| 2019 |
|
| 2020 |
``int fd`` |
| 2021 |
File descriptor of nvme device |
| 2022 |
|
| 2023 |
``enum nvme_log_ana_lsp lsp`` |
| 2024 |
Log specific, see :c:type:`enum nvme_get_log_ana_lsp <nvme_get_log_ana_lsp>` |
| 2025 |
|
| 2026 |
``bool rae`` |
| 2027 |
Retain asynchronous events |
| 2028 |
|
| 2029 |
``__u64 offset`` |
| 2030 |
Offset to the start of the log page |
| 2031 |
|
| 2032 |
``__u32 len`` |
| 2033 |
The allocated length of the log page |
| 2034 |
|
| 2035 |
``void *log`` |
| 2036 |
User address to store the ana log |
| 2037 |
|
| 2038 |
**Description** |
| 2039 |
|
| 2040 |
This log consists of a header describing the log and descriptors containing |
| 2041 |
the asymmetric namespace access information for ANA Groups that contain |
| 2042 |
namespaces that are attached to the controller processing the command. |
| 2043 |
|
| 2044 |
See :c:type:`struct nvme_ana_log <nvme_ana_log>` for the definition of the returned structure. |
| 2045 |
|
| 2046 |
**Return** |
| 2047 |
|
| 2048 |
The nvme command status if a response was received (see |
| 2049 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2050 |
|
| 2051 |
|
| 2052 |
.. c:function:: int nvme_get_log_ana_groups (int fd, bool rae, __u32 len, struct nvme_ana_log *log) |
| 2053 |
|
| 2054 |
Retrieve Asymmetric Namespace Access groups only log page |
| 2055 |
|
| 2056 |
**Parameters** |
| 2057 |
|
| 2058 |
``int fd`` |
| 2059 |
File descriptor of nvme device |
| 2060 |
|
| 2061 |
``bool rae`` |
| 2062 |
Retain asynchronous events |
| 2063 |
|
| 2064 |
``__u32 len`` |
| 2065 |
The allocated length of the log page |
| 2066 |
|
| 2067 |
``struct nvme_ana_log *log`` |
| 2068 |
User address to store the ana group log |
| 2069 |
|
| 2070 |
**Description** |
| 2071 |
|
| 2072 |
See :c:type:`struct nvme_ana_log <nvme_ana_log>` for the definition of the returned structure. |
| 2073 |
|
| 2074 |
**Return** |
| 2075 |
|
| 2076 |
The nvme command status if a response was received (see |
| 2077 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2078 |
|
| 2079 |
|
| 2080 |
.. c:function:: int nvme_get_ana_log_atomic (int fd, bool rgo, bool rae, unsigned int retries, struct nvme_ana_log *log, __u32 *len) |
| 2081 |
|
| 2082 |
Retrieve Asymmetric Namespace Access log page atomically |
| 2083 |
|
| 2084 |
**Parameters** |
| 2085 |
|
| 2086 |
``int fd`` |
| 2087 |
File descriptor of nvme device |
| 2088 |
|
| 2089 |
``bool rgo`` |
| 2090 |
Whether to retrieve ANA groups only (no NSIDs) |
| 2091 |
|
| 2092 |
``bool rae`` |
| 2093 |
Whether to retain asynchronous events |
| 2094 |
|
| 2095 |
``unsigned int retries`` |
| 2096 |
The maximum number of times to retry on log page changes |
| 2097 |
|
| 2098 |
``struct nvme_ana_log *log`` |
| 2099 |
Pointer to a buffer to receive the ANA log page |
| 2100 |
|
| 2101 |
``__u32 *len`` |
| 2102 |
Input: the length of the log page buffer. |
| 2103 |
Output: the actual length of the ANA log page. |
| 2104 |
|
| 2105 |
**Description** |
| 2106 |
|
| 2107 |
See :c:type:`struct nvme_ana_log <nvme_ana_log>` for the definition of the returned structure. |
| 2108 |
|
| 2109 |
**Return** |
| 2110 |
|
| 2111 |
If successful, returns 0 and sets *len to the actual log page length. |
| 2112 |
If unsuccessful, returns the nvme command status if a response was received |
| 2113 |
(see :c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2114 |
Sets errno = EINVAL if retries == 0. |
| 2115 |
Sets errno = EAGAIN if unable to read the log page atomically |
| 2116 |
because chgcnt changed during each of the retries attempts. |
| 2117 |
Sets errno = ENOSPC if the full log page does not fit in the provided buffer. |
| 2118 |
|
| 2119 |
|
| 2120 |
.. c:function:: int nvme_get_log_lba_status (int fd, bool rae, __u64 offset, __u32 len, void *log) |
| 2121 |
|
| 2122 |
Retrieve LBA Status |
| 2123 |
|
| 2124 |
**Parameters** |
| 2125 |
|
| 2126 |
``int fd`` |
| 2127 |
File descriptor of nvme device |
| 2128 |
|
| 2129 |
``bool rae`` |
| 2130 |
Retain asynchronous events |
| 2131 |
|
| 2132 |
``__u64 offset`` |
| 2133 |
Offset to the start of the log page |
| 2134 |
|
| 2135 |
``__u32 len`` |
| 2136 |
The allocated length of the log page |
| 2137 |
|
| 2138 |
``void *log`` |
| 2139 |
User address to store the log page |
| 2140 |
|
| 2141 |
**Return** |
| 2142 |
|
| 2143 |
The nvme command status if a response was received (see |
| 2144 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2145 |
|
| 2146 |
|
| 2147 |
.. c:function:: int nvme_get_log_endurance_grp_evt (int fd, bool rae, __u32 offset, __u32 len, void *log) |
| 2148 |
|
| 2149 |
Retrieve Endurance Group Event Aggregate |
| 2150 |
|
| 2151 |
**Parameters** |
| 2152 |
|
| 2153 |
``int fd`` |
| 2154 |
File descriptor of nvme device |
| 2155 |
|
| 2156 |
``bool rae`` |
| 2157 |
Retain asynchronous events |
| 2158 |
|
| 2159 |
``__u32 offset`` |
| 2160 |
Offset to the start of the log page |
| 2161 |
|
| 2162 |
``__u32 len`` |
| 2163 |
The allocated length of the log page |
| 2164 |
|
| 2165 |
``void *log`` |
| 2166 |
User address to store the log page |
| 2167 |
|
| 2168 |
**Return** |
| 2169 |
|
| 2170 |
The nvme command status if a response was received (see |
| 2171 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2172 |
|
| 2173 |
|
| 2174 |
.. c:function:: int nvme_get_log_fid_supported_effects (int fd, bool rae, struct nvme_fid_supported_effects_log *log) |
| 2175 |
|
| 2176 |
Retrieve Feature Identifiers Supported and Effects |
| 2177 |
|
| 2178 |
**Parameters** |
| 2179 |
|
| 2180 |
``int fd`` |
| 2181 |
File descriptor of nvme device |
| 2182 |
|
| 2183 |
``bool rae`` |
| 2184 |
Retain asynchronous events |
| 2185 |
|
| 2186 |
``struct nvme_fid_supported_effects_log *log`` |
| 2187 |
FID Supported and Effects data structure |
| 2188 |
|
| 2189 |
**Return** |
| 2190 |
|
| 2191 |
The nvme command status if a response was received (see |
| 2192 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2193 |
|
| 2194 |
|
| 2195 |
.. c:function:: int nvme_get_log_mi_cmd_supported_effects (int fd, bool rae, struct nvme_mi_cmd_supported_effects_log *log) |
| 2196 |
|
| 2197 |
displays the MI Commands Supported by the controller |
| 2198 |
|
| 2199 |
**Parameters** |
| 2200 |
|
| 2201 |
``int fd`` |
| 2202 |
File descriptor of nvme device |
| 2203 |
|
| 2204 |
``bool rae`` |
| 2205 |
Retain asynchronous events |
| 2206 |
|
| 2207 |
``struct nvme_mi_cmd_supported_effects_log *log`` |
| 2208 |
MI Command Supported and Effects data structure |
| 2209 |
|
| 2210 |
**Return** |
| 2211 |
|
| 2212 |
The nvme command status if a response was received (see |
| 2213 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2214 |
|
| 2215 |
|
| 2216 |
.. c:function:: int nvme_get_log_boot_partition (int fd, bool rae, __u8 lsp, __u32 len, struct nvme_boot_partition *part) |
| 2217 |
|
| 2218 |
Retrieve Boot Partition |
| 2219 |
|
| 2220 |
**Parameters** |
| 2221 |
|
| 2222 |
``int fd`` |
| 2223 |
File descriptor of nvme device |
| 2224 |
|
| 2225 |
``bool rae`` |
| 2226 |
Retain asynchronous events |
| 2227 |
|
| 2228 |
``__u8 lsp`` |
| 2229 |
The log specified field of LID |
| 2230 |
|
| 2231 |
``__u32 len`` |
| 2232 |
The allocated size, minimum |
| 2233 |
struct nvme_boot_partition |
| 2234 |
|
| 2235 |
``struct nvme_boot_partition *part`` |
| 2236 |
User address to store the log page |
| 2237 |
|
| 2238 |
**Return** |
| 2239 |
|
| 2240 |
The nvme command status if a response was received (see |
| 2241 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2242 |
|
| 2243 |
|
| 2244 |
.. c:function:: int nvme_get_log_rotational_media_info (int fd, __u16 endgid, __u32 len, struct nvme_rotational_media_info_log *log) |
| 2245 |
|
| 2246 |
Retrieve Rotational Media Information Log |
| 2247 |
|
| 2248 |
**Parameters** |
| 2249 |
|
| 2250 |
``int fd`` |
| 2251 |
File descriptor of nvme device |
| 2252 |
|
| 2253 |
``__u16 endgid`` |
| 2254 |
Endurance Group Identifier |
| 2255 |
|
| 2256 |
``__u32 len`` |
| 2257 |
The allocated length of the log page |
| 2258 |
|
| 2259 |
``struct nvme_rotational_media_info_log *log`` |
| 2260 |
User address to store the log page |
| 2261 |
|
| 2262 |
**Return** |
| 2263 |
|
| 2264 |
The nvme command status if a response was received (see |
| 2265 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2266 |
|
| 2267 |
|
| 2268 |
.. c:function:: int nvme_get_log_dispersed_ns_participating_nss (int fd, __u32 nsid, __u32 len, struct nvme_dispersed_ns_participating_nss_log *log) |
| 2269 |
|
| 2270 |
Retrieve Dispersed Namespace Participating NVM Subsystems Log |
| 2271 |
|
| 2272 |
**Parameters** |
| 2273 |
|
| 2274 |
``int fd`` |
| 2275 |
File descriptor of nvme device |
| 2276 |
|
| 2277 |
``__u32 nsid`` |
| 2278 |
Namespace Identifier |
| 2279 |
|
| 2280 |
``__u32 len`` |
| 2281 |
The allocated length of the log page |
| 2282 |
|
| 2283 |
``struct nvme_dispersed_ns_participating_nss_log *log`` |
| 2284 |
User address to store the log page |
| 2285 |
|
| 2286 |
**Return** |
| 2287 |
|
| 2288 |
The nvme command status if a response was received (see |
| 2289 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2290 |
|
| 2291 |
|
| 2292 |
.. c:function:: int nvme_get_log_mgmt_addr_list (int fd, __u32 len, struct nvme_mgmt_addr_list_log *log) |
| 2293 |
|
| 2294 |
Retrieve Management Address List Log |
| 2295 |
|
| 2296 |
**Parameters** |
| 2297 |
|
| 2298 |
``int fd`` |
| 2299 |
File descriptor of nvme device |
| 2300 |
|
| 2301 |
``__u32 len`` |
| 2302 |
The allocated length of the log page |
| 2303 |
|
| 2304 |
``struct nvme_mgmt_addr_list_log *log`` |
| 2305 |
User address to store the log page |
| 2306 |
|
| 2307 |
**Return** |
| 2308 |
|
| 2309 |
The nvme command status if a response was received (see |
| 2310 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2311 |
|
| 2312 |
|
| 2313 |
.. c:function:: int nvme_get_log_phy_rx_eom (int fd, __u8 lsp, __u16 controller, __u32 len, struct nvme_phy_rx_eom_log *log) |
| 2314 |
|
| 2315 |
Retrieve Physical Interface Receiver Eye Opening Measurement Log |
| 2316 |
|
| 2317 |
**Parameters** |
| 2318 |
|
| 2319 |
``int fd`` |
| 2320 |
File descriptor of nvme device |
| 2321 |
|
| 2322 |
``__u8 lsp`` |
| 2323 |
Log specific, controls action and measurement quality |
| 2324 |
|
| 2325 |
``__u16 controller`` |
| 2326 |
Target controller ID |
| 2327 |
|
| 2328 |
``__u32 len`` |
| 2329 |
The allocated size, minimum |
| 2330 |
struct nvme_phy_rx_eom_log |
| 2331 |
|
| 2332 |
``struct nvme_phy_rx_eom_log *log`` |
| 2333 |
User address to store the log page |
| 2334 |
|
| 2335 |
**Return** |
| 2336 |
|
| 2337 |
The nvme command status if a response was received (see |
| 2338 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2339 |
|
| 2340 |
|
| 2341 |
.. c:function:: int nvme_get_log_reachability_groups (int fd, bool rgo, bool rae, __u32 len, struct nvme_reachability_groups_log *log) |
| 2342 |
|
| 2343 |
Retrieve Reachability Groups Log |
| 2344 |
|
| 2345 |
**Parameters** |
| 2346 |
|
| 2347 |
``int fd`` |
| 2348 |
File descriptor of nvme device |
| 2349 |
|
| 2350 |
``bool rgo`` |
| 2351 |
Return groups only |
| 2352 |
|
| 2353 |
``bool rae`` |
| 2354 |
Retain asynchronous events |
| 2355 |
|
| 2356 |
``__u32 len`` |
| 2357 |
The allocated length of the log page |
| 2358 |
|
| 2359 |
``struct nvme_reachability_groups_log *log`` |
| 2360 |
User address to store the log page |
| 2361 |
|
| 2362 |
**Return** |
| 2363 |
|
| 2364 |
The nvme command status if a response was received (see |
| 2365 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2366 |
|
| 2367 |
|
| 2368 |
.. c:function:: int nvme_get_log_reachability_associations (int fd, bool rao, bool rae, __u32 len, struct nvme_reachability_associations_log *log) |
| 2369 |
|
| 2370 |
Retrieve Reachability Associations Log |
| 2371 |
|
| 2372 |
**Parameters** |
| 2373 |
|
| 2374 |
``int fd`` |
| 2375 |
File descriptor of nvme device |
| 2376 |
|
| 2377 |
``bool rao`` |
| 2378 |
Return associations only |
| 2379 |
|
| 2380 |
``bool rae`` |
| 2381 |
Retain asynchronous events |
| 2382 |
|
| 2383 |
``__u32 len`` |
| 2384 |
The allocated length of the log page |
| 2385 |
|
| 2386 |
``struct nvme_reachability_associations_log *log`` |
| 2387 |
User address to store the log page |
| 2388 |
|
| 2389 |
**Return** |
| 2390 |
|
| 2391 |
The nvme command status if a response was received (see |
| 2392 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2393 |
|
| 2394 |
|
| 2395 |
.. c:function:: int nvme_get_log_changed_alloc_ns_list (int fd, bool rae, __u32 len, struct nvme_ns_list *log) |
| 2396 |
|
| 2397 |
Retrieve Changed Allocated Namespace List Log |
| 2398 |
|
| 2399 |
**Parameters** |
| 2400 |
|
| 2401 |
``int fd`` |
| 2402 |
File descriptor of nvme device |
| 2403 |
|
| 2404 |
``bool rae`` |
| 2405 |
Retain asynchronous events |
| 2406 |
|
| 2407 |
``__u32 len`` |
| 2408 |
The allocated length of the log page |
| 2409 |
|
| 2410 |
``struct nvme_ns_list *log`` |
| 2411 |
User address to store the log page |
| 2412 |
|
| 2413 |
**Return** |
| 2414 |
|
| 2415 |
The nvme command status if a response was received (see |
| 2416 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2417 |
|
| 2418 |
|
| 2419 |
.. c:function:: int nvme_get_log_discovery (int fd, bool rae, __u32 offset, __u32 len, void *log) |
| 2420 |
|
| 2421 |
Retrieve Discovery log page |
| 2422 |
|
| 2423 |
**Parameters** |
| 2424 |
|
| 2425 |
``int fd`` |
| 2426 |
File descriptor of nvme device |
| 2427 |
|
| 2428 |
``bool rae`` |
| 2429 |
Retain asynchronous events |
| 2430 |
|
| 2431 |
``__u32 offset`` |
| 2432 |
Offset of this log to retrieve |
| 2433 |
|
| 2434 |
``__u32 len`` |
| 2435 |
The allocated size for this portion of the log |
| 2436 |
|
| 2437 |
``void *log`` |
| 2438 |
User address to store the discovery log |
| 2439 |
|
| 2440 |
**Description** |
| 2441 |
|
| 2442 |
Supported only by fabrics discovery controllers, returning discovery |
| 2443 |
records. |
| 2444 |
|
| 2445 |
**Return** |
| 2446 |
|
| 2447 |
The nvme command status if a response was received (see |
| 2448 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2449 |
|
| 2450 |
|
| 2451 |
.. c:function:: int nvme_get_log_host_discover (int fd, bool allhoste, bool rae, __u32 len, struct nvme_host_discover_log *log) |
| 2452 |
|
| 2453 |
Retrieve Host Discovery Log |
| 2454 |
|
| 2455 |
**Parameters** |
| 2456 |
|
| 2457 |
``int fd`` |
| 2458 |
File descriptor of nvme device |
| 2459 |
|
| 2460 |
``bool allhoste`` |
| 2461 |
All host entries |
| 2462 |
|
| 2463 |
``bool rae`` |
| 2464 |
Retain asynchronous events |
| 2465 |
|
| 2466 |
``__u32 len`` |
| 2467 |
The allocated length of the log page |
| 2468 |
|
| 2469 |
``struct nvme_host_discover_log *log`` |
| 2470 |
User address to store the log page |
| 2471 |
|
| 2472 |
**Return** |
| 2473 |
|
| 2474 |
The nvme command status if a response was received (see |
| 2475 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2476 |
|
| 2477 |
|
| 2478 |
.. c:function:: int nvme_get_log_ave_discover (int fd, bool rae, __u32 len, struct nvme_ave_discover_log *log) |
| 2479 |
|
| 2480 |
Retrieve AVE Discovery Log |
| 2481 |
|
| 2482 |
**Parameters** |
| 2483 |
|
| 2484 |
``int fd`` |
| 2485 |
File descriptor of nvme device |
| 2486 |
|
| 2487 |
``bool rae`` |
| 2488 |
Retain asynchronous events |
| 2489 |
|
| 2490 |
``__u32 len`` |
| 2491 |
The allocated length of the log page |
| 2492 |
|
| 2493 |
``struct nvme_ave_discover_log *log`` |
| 2494 |
User address to store the log page |
| 2495 |
|
| 2496 |
**Return** |
| 2497 |
|
| 2498 |
The nvme command status if a response was received (see |
| 2499 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2500 |
|
| 2501 |
|
| 2502 |
.. c:function:: int nvme_get_log_pull_model_ddc_req (int fd, bool rae, __u32 len, struct nvme_pull_model_ddc_req_log *log) |
| 2503 |
|
| 2504 |
Retrieve Pull Model DDC Request Log |
| 2505 |
|
| 2506 |
**Parameters** |
| 2507 |
|
| 2508 |
``int fd`` |
| 2509 |
File descriptor of nvme device |
| 2510 |
|
| 2511 |
``bool rae`` |
| 2512 |
Retain asynchronous events |
| 2513 |
|
| 2514 |
``__u32 len`` |
| 2515 |
The allocated length of the log page |
| 2516 |
|
| 2517 |
``struct nvme_pull_model_ddc_req_log *log`` |
| 2518 |
User address to store the log page |
| 2519 |
|
| 2520 |
**Return** |
| 2521 |
|
| 2522 |
The nvme command status if a response was received (see |
| 2523 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2524 |
|
| 2525 |
|
| 2526 |
.. c:function:: int nvme_get_log_media_unit_stat (int fd, __u16 domid, struct nvme_media_unit_stat_log *mus) |
| 2527 |
|
| 2528 |
Retrieve Media Unit Status |
| 2529 |
|
| 2530 |
**Parameters** |
| 2531 |
|
| 2532 |
``int fd`` |
| 2533 |
File descriptor of nvme device |
| 2534 |
|
| 2535 |
``__u16 domid`` |
| 2536 |
Domain Identifier selection, if supported |
| 2537 |
|
| 2538 |
``struct nvme_media_unit_stat_log *mus`` |
| 2539 |
User address to store the Media Unit statistics log |
| 2540 |
|
| 2541 |
**Return** |
| 2542 |
|
| 2543 |
The nvme command status if a response was received (see |
| 2544 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2545 |
|
| 2546 |
|
| 2547 |
.. c:function:: int nvme_get_log_support_cap_config_list (int fd, __u16 domid, struct nvme_supported_cap_config_list_log *cap) |
| 2548 |
|
| 2549 |
Retrieve Supported Capacity Configuration List |
| 2550 |
|
| 2551 |
**Parameters** |
| 2552 |
|
| 2553 |
``int fd`` |
| 2554 |
File descriptor of nvme device |
| 2555 |
|
| 2556 |
``__u16 domid`` |
| 2557 |
Domain Identifier selection, if supported |
| 2558 |
|
| 2559 |
``struct nvme_supported_cap_config_list_log *cap`` |
| 2560 |
User address to store supported capabilities config list |
| 2561 |
|
| 2562 |
**Return** |
| 2563 |
|
| 2564 |
The nvme command status if a response was received (see |
| 2565 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2566 |
|
| 2567 |
|
| 2568 |
.. c:function:: int nvme_get_log_reservation (int fd, bool rae, struct nvme_resv_notification_log *log) |
| 2569 |
|
| 2570 |
Retrieve Reservation Notification |
| 2571 |
|
| 2572 |
**Parameters** |
| 2573 |
|
| 2574 |
``int fd`` |
| 2575 |
File descriptor of nvme device |
| 2576 |
|
| 2577 |
``bool rae`` |
| 2578 |
Retain asynchronous events |
| 2579 |
|
| 2580 |
``struct nvme_resv_notification_log *log`` |
| 2581 |
User address to store the reservation log |
| 2582 |
|
| 2583 |
**Return** |
| 2584 |
|
| 2585 |
The nvme command status if a response was received (see |
| 2586 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise |
| 2587 |
|
| 2588 |
|
| 2589 |
.. c:function:: int nvme_get_log_sanitize (int fd, bool rae, struct nvme_sanitize_log_page *log) |
| 2590 |
|
| 2591 |
Retrieve Sanitize Status |
| 2592 |
|
| 2593 |
**Parameters** |
| 2594 |
|
| 2595 |
``int fd`` |
| 2596 |
File descriptor of nvme device |
| 2597 |
|
| 2598 |
``bool rae`` |
| 2599 |
Retain asynchronous events |
| 2600 |
|
| 2601 |
``struct nvme_sanitize_log_page *log`` |
| 2602 |
User address to store the sanitize log |
| 2603 |
|
| 2604 |
**Description** |
| 2605 |
|
| 2606 |
The Sanitize Status log page reports sanitize operation time estimates and |
| 2607 |
information about the most recent sanitize operation. |
| 2608 |
|
| 2609 |
**Return** |
| 2610 |
|
| 2611 |
The nvme command status if a response was received (see |
| 2612 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2613 |
|
| 2614 |
|
| 2615 |
.. c:function:: int nvme_get_log_zns_changed_zones (int fd, __u32 nsid, bool rae, struct nvme_zns_changed_zone_log *log) |
| 2616 |
|
| 2617 |
Retrieve list of zones that have changed |
| 2618 |
|
| 2619 |
**Parameters** |
| 2620 |
|
| 2621 |
``int fd`` |
| 2622 |
File descriptor of nvme device |
| 2623 |
|
| 2624 |
``__u32 nsid`` |
| 2625 |
Namespace ID |
| 2626 |
|
| 2627 |
``bool rae`` |
| 2628 |
Retain asynchronous events |
| 2629 |
|
| 2630 |
``struct nvme_zns_changed_zone_log *log`` |
| 2631 |
User address to store the changed zone log |
| 2632 |
|
| 2633 |
**Description** |
| 2634 |
|
| 2635 |
The list of zones that have changed state due to an exceptional event. |
| 2636 |
|
| 2637 |
**Return** |
| 2638 |
|
| 2639 |
The nvme command status if a response was received (see |
| 2640 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2641 |
|
| 2642 |
|
| 2643 |
.. c:function:: int nvme_get_log_persistent_event (int fd, enum nvme_pevent_log_action action, __u32 size, void *pevent_log) |
| 2644 |
|
| 2645 |
Retrieve Persistent Event Log |
| 2646 |
|
| 2647 |
**Parameters** |
| 2648 |
|
| 2649 |
``int fd`` |
| 2650 |
File descriptor of nvme device |
| 2651 |
|
| 2652 |
``enum nvme_pevent_log_action action`` |
| 2653 |
Action the controller should take during processing this command |
| 2654 |
|
| 2655 |
``__u32 size`` |
| 2656 |
Size of **pevent_log** |
| 2657 |
|
| 2658 |
``void *pevent_log`` |
| 2659 |
User address to store the persistent event log |
| 2660 |
|
| 2661 |
**Return** |
| 2662 |
|
| 2663 |
The nvme command status if a response was received (see |
| 2664 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2665 |
|
| 2666 |
|
| 2667 |
.. c:function:: int nvme_get_log_lockdown (int fd, __u8 cnscp, struct nvme_lockdown_log *lockdown_log) |
| 2668 |
|
| 2669 |
Retrieve lockdown Log |
| 2670 |
|
| 2671 |
**Parameters** |
| 2672 |
|
| 2673 |
``int fd`` |
| 2674 |
File descriptor of nvme device |
| 2675 |
|
| 2676 |
``__u8 cnscp`` |
| 2677 |
Contents and Scope of Command and Feature Identifier Lists |
| 2678 |
|
| 2679 |
``struct nvme_lockdown_log *lockdown_log`` |
| 2680 |
Buffer to store the lockdown log |
| 2681 |
|
| 2682 |
**Return** |
| 2683 |
|
| 2684 |
The nvme command status if a response was received (see |
| 2685 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2686 |
|
| 2687 |
|
| 2688 |
.. c:function:: int nvme_set_features (struct nvme_set_features_args *args) |
| 2689 |
|
| 2690 |
Set a feature attribute |
| 2691 |
|
| 2692 |
**Parameters** |
| 2693 |
|
| 2694 |
``struct nvme_set_features_args *args`` |
| 2695 |
:c:type:`struct nvme_set_features_args <nvme_set_features_args>` argument structure |
| 2696 |
|
| 2697 |
**Return** |
| 2698 |
|
| 2699 |
The nvme command status if a response was received (see |
| 2700 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2701 |
|
| 2702 |
|
| 2703 |
.. c:function:: int nvme_set_features_data (int fd, __u8 fid, __u32 nsid, __u32 cdw11, bool save, __u32 data_len, void *data, __u32 *result) |
| 2704 |
|
| 2705 |
Helper function for **nvme_set_features\(\)** |
| 2706 |
|
| 2707 |
**Parameters** |
| 2708 |
|
| 2709 |
``int fd`` |
| 2710 |
File descriptor of nvme device |
| 2711 |
|
| 2712 |
``__u8 fid`` |
| 2713 |
Feature identifier |
| 2714 |
|
| 2715 |
``__u32 nsid`` |
| 2716 |
Namespace ID, if applicable |
| 2717 |
|
| 2718 |
``__u32 cdw11`` |
| 2719 |
Value to set the feature to |
| 2720 |
|
| 2721 |
``bool save`` |
| 2722 |
Save value across power states |
| 2723 |
|
| 2724 |
``__u32 data_len`` |
| 2725 |
Length of feature data, if applicable, in bytes |
| 2726 |
|
| 2727 |
``void *data`` |
| 2728 |
User address of feature data, if applicable |
| 2729 |
|
| 2730 |
``__u32 *result`` |
| 2731 |
The command completion result from CQE dword0 |
| 2732 |
|
| 2733 |
**Return** |
| 2734 |
|
| 2735 |
The nvme command status if a response was received (see |
| 2736 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2737 |
|
| 2738 |
|
| 2739 |
.. c:function:: int nvme_set_features_simple (int fd, __u8 fid, __u32 nsid, __u32 cdw11, bool save, __u32 *result) |
| 2740 |
|
| 2741 |
Helper function for **nvme_set_features\(\)** |
| 2742 |
|
| 2743 |
**Parameters** |
| 2744 |
|
| 2745 |
``int fd`` |
| 2746 |
File descriptor of nvme device |
| 2747 |
|
| 2748 |
``__u8 fid`` |
| 2749 |
Feature identifier |
| 2750 |
|
| 2751 |
``__u32 nsid`` |
| 2752 |
Namespace ID, if applicable |
| 2753 |
|
| 2754 |
``__u32 cdw11`` |
| 2755 |
Value to set the feature to |
| 2756 |
|
| 2757 |
``bool save`` |
| 2758 |
Save value across power states |
| 2759 |
|
| 2760 |
``__u32 *result`` |
| 2761 |
The command completion result from CQE dword0 |
| 2762 |
|
| 2763 |
**Return** |
| 2764 |
|
| 2765 |
The nvme command status if a response was received (see |
| 2766 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2767 |
|
| 2768 |
|
| 2769 |
.. c:function:: int nvme_set_features_arbitration (int fd, __u8 ab, __u8 lpw, __u8 mpw, __u8 hpw, bool save, __u32 *result) |
| 2770 |
|
| 2771 |
Set arbitration features |
| 2772 |
|
| 2773 |
**Parameters** |
| 2774 |
|
| 2775 |
``int fd`` |
| 2776 |
File descriptor of nvme device |
| 2777 |
|
| 2778 |
``__u8 ab`` |
| 2779 |
Arbitration Burst |
| 2780 |
|
| 2781 |
``__u8 lpw`` |
| 2782 |
Low Priority Weight |
| 2783 |
|
| 2784 |
``__u8 mpw`` |
| 2785 |
Medium Priority Weight |
| 2786 |
|
| 2787 |
``__u8 hpw`` |
| 2788 |
High Priority Weight |
| 2789 |
|
| 2790 |
``bool save`` |
| 2791 |
Save value across power states |
| 2792 |
|
| 2793 |
``__u32 *result`` |
| 2794 |
The command completion result from CQE dword0 |
| 2795 |
|
| 2796 |
**Return** |
| 2797 |
|
| 2798 |
The nvme command status if a response was received (see |
| 2799 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2800 |
|
| 2801 |
|
| 2802 |
.. c:function:: int nvme_set_features_power_mgmt (int fd, __u8 ps, __u8 wh, bool save, __u32 *result) |
| 2803 |
|
| 2804 |
Set power management feature |
| 2805 |
|
| 2806 |
**Parameters** |
| 2807 |
|
| 2808 |
``int fd`` |
| 2809 |
File descriptor of nvme device |
| 2810 |
|
| 2811 |
``__u8 ps`` |
| 2812 |
Power State |
| 2813 |
|
| 2814 |
``__u8 wh`` |
| 2815 |
Workload Hint |
| 2816 |
|
| 2817 |
``bool save`` |
| 2818 |
Save value across power states |
| 2819 |
|
| 2820 |
``__u32 *result`` |
| 2821 |
The command completion result from CQE dword0 |
| 2822 |
|
| 2823 |
**Return** |
| 2824 |
|
| 2825 |
The nvme command status if a response was received (see |
| 2826 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2827 |
|
| 2828 |
|
| 2829 |
.. c:function:: int nvme_set_features_lba_range (int fd, __u32 nsid, __u8 nr_ranges, bool save, struct nvme_lba_range_type *data, __u32 *result) |
| 2830 |
|
| 2831 |
Set LBA range feature |
| 2832 |
|
| 2833 |
**Parameters** |
| 2834 |
|
| 2835 |
``int fd`` |
| 2836 |
File descriptor of nvme device |
| 2837 |
|
| 2838 |
``__u32 nsid`` |
| 2839 |
Namespace ID |
| 2840 |
|
| 2841 |
``__u8 nr_ranges`` |
| 2842 |
Number of ranges in **data** |
| 2843 |
|
| 2844 |
``bool save`` |
| 2845 |
Save value across power states |
| 2846 |
|
| 2847 |
``struct nvme_lba_range_type *data`` |
| 2848 |
User address of feature data |
| 2849 |
|
| 2850 |
``__u32 *result`` |
| 2851 |
The command completion result from CQE dword0 |
| 2852 |
|
| 2853 |
**Return** |
| 2854 |
|
| 2855 |
The nvme command status if a response was received (see |
| 2856 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2857 |
|
| 2858 |
|
| 2859 |
.. c:function:: int nvme_set_features_temp_thresh (int fd, __u16 tmpth, __u8 tmpsel, enum nvme_feat_tmpthresh_thsel thsel, bool save, __u32 *result) |
| 2860 |
|
| 2861 |
Set temperature threshold feature |
| 2862 |
|
| 2863 |
**Parameters** |
| 2864 |
|
| 2865 |
``int fd`` |
| 2866 |
File descriptor of nvme device |
| 2867 |
|
| 2868 |
``__u16 tmpth`` |
| 2869 |
Temperature Threshold |
| 2870 |
|
| 2871 |
``__u8 tmpsel`` |
| 2872 |
Threshold Temperature Select |
| 2873 |
|
| 2874 |
``enum nvme_feat_tmpthresh_thsel thsel`` |
| 2875 |
Threshold Type Select |
| 2876 |
|
| 2877 |
``bool save`` |
| 2878 |
Save value across power states |
| 2879 |
|
| 2880 |
``__u32 *result`` |
| 2881 |
The command completion result from CQE dword0 |
| 2882 |
|
| 2883 |
**Return** |
| 2884 |
|
| 2885 |
The nvme command status if a response was received (see |
| 2886 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2887 |
|
| 2888 |
|
| 2889 |
.. c:function:: int nvme_set_features_temp_thresh2 (int fd, __u16 tmpth, __u8 tmpsel, enum nvme_feat_tmpthresh_thsel thsel, __u8 tmpthh, bool save, __u32 *result) |
| 2890 |
|
| 2891 |
Set temperature threshold feature |
| 2892 |
|
| 2893 |
**Parameters** |
| 2894 |
|
| 2895 |
``int fd`` |
| 2896 |
File descriptor of nvme device |
| 2897 |
|
| 2898 |
``__u16 tmpth`` |
| 2899 |
Temperature Threshold |
| 2900 |
|
| 2901 |
``__u8 tmpsel`` |
| 2902 |
Threshold Temperature Select |
| 2903 |
|
| 2904 |
``enum nvme_feat_tmpthresh_thsel thsel`` |
| 2905 |
Threshold Type Select |
| 2906 |
|
| 2907 |
``__u8 tmpthh`` |
| 2908 |
Temperature Threshold Hysteresis |
| 2909 |
|
| 2910 |
``bool save`` |
| 2911 |
Save value across power states |
| 2912 |
|
| 2913 |
``__u32 *result`` |
| 2914 |
The command completion result from CQE dword0 |
| 2915 |
|
| 2916 |
**Return** |
| 2917 |
|
| 2918 |
The nvme command status if a response was received (see |
| 2919 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2920 |
|
| 2921 |
|
| 2922 |
.. c:function:: int nvme_set_features_err_recovery (int fd, __u32 nsid, __u16 tler, bool dulbe, bool save, __u32 *result) |
| 2923 |
|
| 2924 |
Set error recovery feature |
| 2925 |
|
| 2926 |
**Parameters** |
| 2927 |
|
| 2928 |
``int fd`` |
| 2929 |
File descriptor of nvme device |
| 2930 |
|
| 2931 |
``__u32 nsid`` |
| 2932 |
Namespace ID |
| 2933 |
|
| 2934 |
``__u16 tler`` |
| 2935 |
Time-limited error recovery value |
| 2936 |
|
| 2937 |
``bool dulbe`` |
| 2938 |
Deallocated or Unwritten Logical Block Error Enable |
| 2939 |
|
| 2940 |
``bool save`` |
| 2941 |
Save value across power states |
| 2942 |
|
| 2943 |
``__u32 *result`` |
| 2944 |
The command completion result from CQE dword0 |
| 2945 |
|
| 2946 |
**Return** |
| 2947 |
|
| 2948 |
The nvme command status if a response was received (see |
| 2949 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2950 |
|
| 2951 |
|
| 2952 |
.. c:function:: int nvme_set_features_volatile_wc (int fd, bool wce, bool save, __u32 *result) |
| 2953 |
|
| 2954 |
Set volatile write cache feature |
| 2955 |
|
| 2956 |
**Parameters** |
| 2957 |
|
| 2958 |
``int fd`` |
| 2959 |
File descriptor of nvme device |
| 2960 |
|
| 2961 |
``bool wce`` |
| 2962 |
Write cache enable |
| 2963 |
|
| 2964 |
``bool save`` |
| 2965 |
Save value across power states |
| 2966 |
|
| 2967 |
``__u32 *result`` |
| 2968 |
The command completion result from CQE dword0 |
| 2969 |
|
| 2970 |
**Return** |
| 2971 |
|
| 2972 |
The nvme command status if a response was received (see |
| 2973 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 2974 |
|
| 2975 |
|
| 2976 |
.. c:function:: int nvme_set_features_irq_coalesce (int fd, __u8 thr, __u8 time, bool save, __u32 *result) |
| 2977 |
|
| 2978 |
Set IRQ coalesce feature |
| 2979 |
|
| 2980 |
**Parameters** |
| 2981 |
|
| 2982 |
``int fd`` |
| 2983 |
File descriptor of nvme device |
| 2984 |
|
| 2985 |
``__u8 thr`` |
| 2986 |
Aggregation Threshold |
| 2987 |
|
| 2988 |
``__u8 time`` |
| 2989 |
Aggregation Time |
| 2990 |
|
| 2991 |
``bool save`` |
| 2992 |
Save value across power states |
| 2993 |
|
| 2994 |
``__u32 *result`` |
| 2995 |
The command completion result from CQE dword0 |
| 2996 |
|
| 2997 |
**Return** |
| 2998 |
|
| 2999 |
The nvme command status if a response was received (see |
| 3000 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3001 |
|
| 3002 |
|
| 3003 |
.. c:function:: int nvme_set_features_irq_config (int fd, __u16 iv, bool cd, bool save, __u32 *result) |
| 3004 |
|
| 3005 |
Set IRQ config feature |
| 3006 |
|
| 3007 |
**Parameters** |
| 3008 |
|
| 3009 |
``int fd`` |
| 3010 |
File descriptor of nvme device |
| 3011 |
|
| 3012 |
``__u16 iv`` |
| 3013 |
Interrupt Vector |
| 3014 |
|
| 3015 |
``bool cd`` |
| 3016 |
Coalescing Disable |
| 3017 |
|
| 3018 |
``bool save`` |
| 3019 |
Save value across power states |
| 3020 |
|
| 3021 |
``__u32 *result`` |
| 3022 |
The command completion result from CQE dword0 |
| 3023 |
|
| 3024 |
**Return** |
| 3025 |
|
| 3026 |
The nvme command status if a response was received (see |
| 3027 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3028 |
|
| 3029 |
|
| 3030 |
.. c:function:: int nvme_set_features_write_atomic (int fd, bool dn, bool save, __u32 *result) |
| 3031 |
|
| 3032 |
Set write atomic feature |
| 3033 |
|
| 3034 |
**Parameters** |
| 3035 |
|
| 3036 |
``int fd`` |
| 3037 |
File descriptor of nvme device |
| 3038 |
|
| 3039 |
``bool dn`` |
| 3040 |
Disable Normal |
| 3041 |
|
| 3042 |
``bool save`` |
| 3043 |
Save value across power states |
| 3044 |
|
| 3045 |
``__u32 *result`` |
| 3046 |
The command completion result from CQE dword0 |
| 3047 |
|
| 3048 |
**Return** |
| 3049 |
|
| 3050 |
The nvme command status if a response was received (see |
| 3051 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3052 |
|
| 3053 |
|
| 3054 |
.. c:function:: int nvme_set_features_async_event (int fd, __u32 events, bool save, __u32 *result) |
| 3055 |
|
| 3056 |
Set asynchronous event feature |
| 3057 |
|
| 3058 |
**Parameters** |
| 3059 |
|
| 3060 |
``int fd`` |
| 3061 |
File descriptor of nvme device |
| 3062 |
|
| 3063 |
``__u32 events`` |
| 3064 |
Events to enable |
| 3065 |
|
| 3066 |
``bool save`` |
| 3067 |
Save value across power states |
| 3068 |
|
| 3069 |
``__u32 *result`` |
| 3070 |
The command completion result from CQE dword0 |
| 3071 |
|
| 3072 |
**Return** |
| 3073 |
|
| 3074 |
The nvme command status if a response was received (see |
| 3075 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3076 |
|
| 3077 |
|
| 3078 |
.. c:function:: int nvme_set_features_auto_pst (int fd, bool apste, bool save, struct nvme_feat_auto_pst *apst, __u32 *result) |
| 3079 |
|
| 3080 |
Set autonomous power state feature |
| 3081 |
|
| 3082 |
**Parameters** |
| 3083 |
|
| 3084 |
``int fd`` |
| 3085 |
File descriptor of nvme device |
| 3086 |
|
| 3087 |
``bool apste`` |
| 3088 |
Autonomous Power State Transition Enable |
| 3089 |
|
| 3090 |
``bool save`` |
| 3091 |
Save value across power states |
| 3092 |
|
| 3093 |
``struct nvme_feat_auto_pst *apst`` |
| 3094 |
Autonomous Power State Transition |
| 3095 |
|
| 3096 |
``__u32 *result`` |
| 3097 |
The command completion result from CQE dword0 |
| 3098 |
|
| 3099 |
**Return** |
| 3100 |
|
| 3101 |
The nvme command status if a response was received (see |
| 3102 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3103 |
|
| 3104 |
|
| 3105 |
.. c:function:: int nvme_set_features_timestamp (int fd, bool save, __u64 timestamp) |
| 3106 |
|
| 3107 |
Set timestamp feature |
| 3108 |
|
| 3109 |
**Parameters** |
| 3110 |
|
| 3111 |
``int fd`` |
| 3112 |
File descriptor of nvme device |
| 3113 |
|
| 3114 |
``bool save`` |
| 3115 |
Save value across power states |
| 3116 |
|
| 3117 |
``__u64 timestamp`` |
| 3118 |
The current timestamp value to assign to this feature |
| 3119 |
|
| 3120 |
**Return** |
| 3121 |
|
| 3122 |
The nvme command status if a response was received (see |
| 3123 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3124 |
|
| 3125 |
|
| 3126 |
.. c:function:: int nvme_set_features_hctm (int fd, __u16 tmt2, __u16 tmt1, bool save, __u32 *result) |
| 3127 |
|
| 3128 |
Set thermal management feature |
| 3129 |
|
| 3130 |
**Parameters** |
| 3131 |
|
| 3132 |
``int fd`` |
| 3133 |
File descriptor of nvme device |
| 3134 |
|
| 3135 |
``__u16 tmt2`` |
| 3136 |
Thermal Management Temperature 2 |
| 3137 |
|
| 3138 |
``__u16 tmt1`` |
| 3139 |
Thermal Management Temperature 1 |
| 3140 |
|
| 3141 |
``bool save`` |
| 3142 |
Save value across power states |
| 3143 |
|
| 3144 |
``__u32 *result`` |
| 3145 |
The command completion result from CQE dword0 |
| 3146 |
|
| 3147 |
**Return** |
| 3148 |
|
| 3149 |
The nvme command status if a response was received (see |
| 3150 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3151 |
|
| 3152 |
|
| 3153 |
.. c:function:: int nvme_set_features_nopsc (int fd, bool noppme, bool save, __u32 *result) |
| 3154 |
|
| 3155 |
Set non-operational power state feature |
| 3156 |
|
| 3157 |
**Parameters** |
| 3158 |
|
| 3159 |
``int fd`` |
| 3160 |
File descriptor of nvme device |
| 3161 |
|
| 3162 |
``bool noppme`` |
| 3163 |
Non-Operational Power State Permissive Mode Enable |
| 3164 |
|
| 3165 |
``bool save`` |
| 3166 |
Save value across power states |
| 3167 |
|
| 3168 |
``__u32 *result`` |
| 3169 |
The command completion result from CQE dword0 |
| 3170 |
|
| 3171 |
**Return** |
| 3172 |
|
| 3173 |
The nvme command status if a response was received (see |
| 3174 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3175 |
|
| 3176 |
|
| 3177 |
.. c:function:: int nvme_set_features_rrl (int fd, __u8 rrl, __u16 nvmsetid, bool save, __u32 *result) |
| 3178 |
|
| 3179 |
Set read recovery level feature |
| 3180 |
|
| 3181 |
**Parameters** |
| 3182 |
|
| 3183 |
``int fd`` |
| 3184 |
File descriptor of nvme device |
| 3185 |
|
| 3186 |
``__u8 rrl`` |
| 3187 |
Read recovery level setting |
| 3188 |
|
| 3189 |
``__u16 nvmsetid`` |
| 3190 |
NVM set id |
| 3191 |
|
| 3192 |
``bool save`` |
| 3193 |
Save value across power states |
| 3194 |
|
| 3195 |
``__u32 *result`` |
| 3196 |
The command completion result from CQE dword0 |
| 3197 |
|
| 3198 |
**Return** |
| 3199 |
|
| 3200 |
The nvme command status if a response was received (see |
| 3201 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3202 |
|
| 3203 |
|
| 3204 |
.. c:function:: int nvme_set_features_plm_config (int fd, bool enable, __u16 nvmsetid, bool save, struct nvme_plm_config *data, __u32 *result) |
| 3205 |
|
| 3206 |
Set predictable latency feature |
| 3207 |
|
| 3208 |
**Parameters** |
| 3209 |
|
| 3210 |
``int fd`` |
| 3211 |
File descriptor of nvme device |
| 3212 |
|
| 3213 |
``bool enable`` |
| 3214 |
Predictable Latency Enable |
| 3215 |
|
| 3216 |
``__u16 nvmsetid`` |
| 3217 |
NVM Set Identifier |
| 3218 |
|
| 3219 |
``bool save`` |
| 3220 |
Save value across power states |
| 3221 |
|
| 3222 |
``struct nvme_plm_config *data`` |
| 3223 |
Pointer to structure nvme_plm_config |
| 3224 |
|
| 3225 |
``__u32 *result`` |
| 3226 |
The command completion result from CQE dword0 |
| 3227 |
|
| 3228 |
**Return** |
| 3229 |
|
| 3230 |
The nvme command status if a response was received (see |
| 3231 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3232 |
|
| 3233 |
|
| 3234 |
.. c:function:: int nvme_set_features_plm_window (int fd, enum nvme_feat_plm_window_select sel, __u16 nvmsetid, bool save, __u32 *result) |
| 3235 |
|
| 3236 |
Set window select feature |
| 3237 |
|
| 3238 |
**Parameters** |
| 3239 |
|
| 3240 |
``int fd`` |
| 3241 |
File descriptor of nvme device |
| 3242 |
|
| 3243 |
``enum nvme_feat_plm_window_select sel`` |
| 3244 |
Window Select |
| 3245 |
|
| 3246 |
``__u16 nvmsetid`` |
| 3247 |
NVM Set Identifier |
| 3248 |
|
| 3249 |
``bool save`` |
| 3250 |
Save value across power states |
| 3251 |
|
| 3252 |
``__u32 *result`` |
| 3253 |
The command completion result from CQE dword0 |
| 3254 |
|
| 3255 |
**Return** |
| 3256 |
|
| 3257 |
The nvme command status if a response was received (see |
| 3258 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3259 |
|
| 3260 |
|
| 3261 |
.. c:function:: int nvme_set_features_lba_sts_interval (int fd, __u16 lsiri, __u16 lsipi, bool save, __u32 *result) |
| 3262 |
|
| 3263 |
Set LBA status information feature |
| 3264 |
|
| 3265 |
**Parameters** |
| 3266 |
|
| 3267 |
``int fd`` |
| 3268 |
File descriptor of nvme device |
| 3269 |
|
| 3270 |
``__u16 lsiri`` |
| 3271 |
LBA Status Information Report Interval |
| 3272 |
|
| 3273 |
``__u16 lsipi`` |
| 3274 |
LBA Status Information Poll Interval |
| 3275 |
|
| 3276 |
``bool save`` |
| 3277 |
Save value across power states |
| 3278 |
|
| 3279 |
``__u32 *result`` |
| 3280 |
The command completion result from CQE dword0 |
| 3281 |
|
| 3282 |
**Return** |
| 3283 |
|
| 3284 |
The nvme command status if a response was received (see |
| 3285 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3286 |
|
| 3287 |
|
| 3288 |
.. c:function:: int nvme_set_features_host_behavior (int fd, bool save, struct nvme_feat_host_behavior *data) |
| 3289 |
|
| 3290 |
Set host behavior feature |
| 3291 |
|
| 3292 |
**Parameters** |
| 3293 |
|
| 3294 |
``int fd`` |
| 3295 |
File descriptor of nvme device |
| 3296 |
|
| 3297 |
``bool save`` |
| 3298 |
Save value across power states |
| 3299 |
|
| 3300 |
``struct nvme_feat_host_behavior *data`` |
| 3301 |
Pointer to structure nvme_feat_host_behavior |
| 3302 |
|
| 3303 |
**Return** |
| 3304 |
|
| 3305 |
The nvme command status if a response was received (see |
| 3306 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3307 |
|
| 3308 |
|
| 3309 |
.. c:function:: int nvme_set_features_sanitize (int fd, bool nodrm, bool save, __u32 *result) |
| 3310 |
|
| 3311 |
Set sanitize feature |
| 3312 |
|
| 3313 |
**Parameters** |
| 3314 |
|
| 3315 |
``int fd`` |
| 3316 |
File descriptor of nvme device |
| 3317 |
|
| 3318 |
``bool nodrm`` |
| 3319 |
No-Deallocate Response Mode |
| 3320 |
|
| 3321 |
``bool save`` |
| 3322 |
Save value across power states |
| 3323 |
|
| 3324 |
``__u32 *result`` |
| 3325 |
The command completion result from CQE dword0 |
| 3326 |
|
| 3327 |
**Return** |
| 3328 |
|
| 3329 |
The nvme command status if a response was received (see |
| 3330 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3331 |
|
| 3332 |
|
| 3333 |
.. c:function:: int nvme_set_features_endurance_evt_cfg (int fd, __u16 endgid, __u8 egwarn, bool save, __u32 *result) |
| 3334 |
|
| 3335 |
Set endurance event config feature |
| 3336 |
|
| 3337 |
**Parameters** |
| 3338 |
|
| 3339 |
``int fd`` |
| 3340 |
File descriptor of nvme device |
| 3341 |
|
| 3342 |
``__u16 endgid`` |
| 3343 |
Endurance Group Identifier |
| 3344 |
|
| 3345 |
``__u8 egwarn`` |
| 3346 |
Flags to enable warning, see :c:type:`enum nvme_eg_critical_warning_flags <nvme_eg_critical_warning_flags>` |
| 3347 |
|
| 3348 |
``bool save`` |
| 3349 |
Save value across power states |
| 3350 |
|
| 3351 |
``__u32 *result`` |
| 3352 |
The command completion result from CQE dword0 |
| 3353 |
|
| 3354 |
**Return** |
| 3355 |
|
| 3356 |
The nvme command status if a response was received (see |
| 3357 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3358 |
|
| 3359 |
|
| 3360 |
.. c:function:: int nvme_set_features_sw_progress (int fd, __u8 pbslc, bool save, __u32 *result) |
| 3361 |
|
| 3362 |
Set pre-boot software load count feature |
| 3363 |
|
| 3364 |
**Parameters** |
| 3365 |
|
| 3366 |
``int fd`` |
| 3367 |
File descriptor of nvme device |
| 3368 |
|
| 3369 |
``__u8 pbslc`` |
| 3370 |
Pre-boot Software Load Count |
| 3371 |
|
| 3372 |
``bool save`` |
| 3373 |
Save value across power states |
| 3374 |
|
| 3375 |
``__u32 *result`` |
| 3376 |
The command completion result from CQE dword0 |
| 3377 |
|
| 3378 |
**Return** |
| 3379 |
|
| 3380 |
The nvme command status if a response was received (see |
| 3381 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3382 |
|
| 3383 |
|
| 3384 |
.. c:function:: int nvme_set_features_host_id (int fd, bool exhid, bool save, __u8 *hostid) |
| 3385 |
|
| 3386 |
Set enable extended host identifiers feature |
| 3387 |
|
| 3388 |
**Parameters** |
| 3389 |
|
| 3390 |
``int fd`` |
| 3391 |
File descriptor of nvme device |
| 3392 |
|
| 3393 |
``bool exhid`` |
| 3394 |
Enable Extended Host Identifier |
| 3395 |
|
| 3396 |
``bool save`` |
| 3397 |
Save value across power states |
| 3398 |
|
| 3399 |
``__u8 *hostid`` |
| 3400 |
Host ID to set |
| 3401 |
|
| 3402 |
**Return** |
| 3403 |
|
| 3404 |
The nvme command status if a response was received (see |
| 3405 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3406 |
|
| 3407 |
|
| 3408 |
.. c:function:: int nvme_set_features_resv_mask (int fd, __u32 mask, bool save, __u32 *result) |
| 3409 |
|
| 3410 |
Set reservation notification mask feature |
| 3411 |
|
| 3412 |
**Parameters** |
| 3413 |
|
| 3414 |
``int fd`` |
| 3415 |
File descriptor of nvme device |
| 3416 |
|
| 3417 |
``__u32 mask`` |
| 3418 |
Reservation Notification Mask Field |
| 3419 |
|
| 3420 |
``bool save`` |
| 3421 |
Save value across power states |
| 3422 |
|
| 3423 |
``__u32 *result`` |
| 3424 |
The command completion result from CQE dword0 |
| 3425 |
|
| 3426 |
**Description** |
| 3427 |
|
| 3428 |
|
| 3429 |
Deprecated: doesn't support specifying a NSID. |
| 3430 |
Use nvme_set_features_resv_mask2() instead. |
| 3431 |
|
| 3432 |
**Return** |
| 3433 |
|
| 3434 |
The nvme command status if a response was received (see |
| 3435 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3436 |
|
| 3437 |
|
| 3438 |
.. c:function:: int nvme_set_features_resv_mask2 (int fd, __u32 nsid, __u32 mask, bool save, __u32 *result) |
| 3439 |
|
| 3440 |
Set reservation notification mask feature |
| 3441 |
|
| 3442 |
**Parameters** |
| 3443 |
|
| 3444 |
``int fd`` |
| 3445 |
File descriptor of nvme device |
| 3446 |
|
| 3447 |
``__u32 nsid`` |
| 3448 |
Namespace ID |
| 3449 |
|
| 3450 |
``__u32 mask`` |
| 3451 |
Reservation Notification Mask Field |
| 3452 |
|
| 3453 |
``bool save`` |
| 3454 |
Save value across power states |
| 3455 |
|
| 3456 |
``__u32 *result`` |
| 3457 |
The command completion result from CQE dword0 |
| 3458 |
|
| 3459 |
**Return** |
| 3460 |
|
| 3461 |
The nvme command status if a response was received (see |
| 3462 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3463 |
|
| 3464 |
|
| 3465 |
.. c:function:: int nvme_set_features_resv_persist (int fd, bool ptpl, bool save, __u32 *result) |
| 3466 |
|
| 3467 |
Set persist through power loss feature |
| 3468 |
|
| 3469 |
**Parameters** |
| 3470 |
|
| 3471 |
``int fd`` |
| 3472 |
File descriptor of nvme device |
| 3473 |
|
| 3474 |
``bool ptpl`` |
| 3475 |
Persist Through Power Loss |
| 3476 |
|
| 3477 |
``bool save`` |
| 3478 |
Save value across power states |
| 3479 |
|
| 3480 |
``__u32 *result`` |
| 3481 |
The command completion result from CQE dword0 |
| 3482 |
|
| 3483 |
**Description** |
| 3484 |
|
| 3485 |
|
| 3486 |
Deprecated: doesn't support specifying a NSID. |
| 3487 |
Use nvme_set_features_resv_persist2() instead. |
| 3488 |
|
| 3489 |
**Return** |
| 3490 |
|
| 3491 |
The nvme command status if a response was received (see |
| 3492 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3493 |
|
| 3494 |
|
| 3495 |
.. c:function:: int nvme_set_features_resv_persist2 (int fd, __u32 nsid, bool ptpl, bool save, __u32 *result) |
| 3496 |
|
| 3497 |
Set persist through power loss feature |
| 3498 |
|
| 3499 |
**Parameters** |
| 3500 |
|
| 3501 |
``int fd`` |
| 3502 |
File descriptor of nvme device |
| 3503 |
|
| 3504 |
``__u32 nsid`` |
| 3505 |
Namespace ID |
| 3506 |
|
| 3507 |
``bool ptpl`` |
| 3508 |
Persist Through Power Loss |
| 3509 |
|
| 3510 |
``bool save`` |
| 3511 |
Save value across power states |
| 3512 |
|
| 3513 |
``__u32 *result`` |
| 3514 |
The command completion result from CQE dword0 |
| 3515 |
|
| 3516 |
**Return** |
| 3517 |
|
| 3518 |
The nvme command status if a response was received (see |
| 3519 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3520 |
|
| 3521 |
|
| 3522 |
.. c:function:: int nvme_set_features_write_protect (int fd, enum nvme_feat_nswpcfg_state state, bool save, __u32 *result) |
| 3523 |
|
| 3524 |
Set write protect feature |
| 3525 |
|
| 3526 |
**Parameters** |
| 3527 |
|
| 3528 |
``int fd`` |
| 3529 |
File descriptor of nvme device |
| 3530 |
|
| 3531 |
``enum nvme_feat_nswpcfg_state state`` |
| 3532 |
Write Protection State |
| 3533 |
|
| 3534 |
``bool save`` |
| 3535 |
Save value across power states |
| 3536 |
|
| 3537 |
``__u32 *result`` |
| 3538 |
The command completion result from CQE dword0 |
| 3539 |
|
| 3540 |
**Description** |
| 3541 |
|
| 3542 |
|
| 3543 |
Deprecated: doesn't support specifying a NSID. |
| 3544 |
Use nvme_set_features_write_protect2() instead. |
| 3545 |
|
| 3546 |
**Return** |
| 3547 |
|
| 3548 |
The nvme command status if a response was received (see |
| 3549 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3550 |
|
| 3551 |
|
| 3552 |
.. c:function:: int nvme_set_features_write_protect2 (int fd, __u32 nsid, enum nvme_feat_nswpcfg_state state, bool save, __u32 *result) |
| 3553 |
|
| 3554 |
Set write protect feature |
| 3555 |
|
| 3556 |
**Parameters** |
| 3557 |
|
| 3558 |
``int fd`` |
| 3559 |
File descriptor of nvme device |
| 3560 |
|
| 3561 |
``__u32 nsid`` |
| 3562 |
Namespace ID |
| 3563 |
|
| 3564 |
``enum nvme_feat_nswpcfg_state state`` |
| 3565 |
Write Protection State |
| 3566 |
|
| 3567 |
``bool save`` |
| 3568 |
Save value across power states |
| 3569 |
|
| 3570 |
``__u32 *result`` |
| 3571 |
The command completion result from CQE dword0 |
| 3572 |
|
| 3573 |
**Return** |
| 3574 |
|
| 3575 |
The nvme command status if a response was received (see |
| 3576 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3577 |
|
| 3578 |
|
| 3579 |
.. c:function:: int nvme_set_features_iocs_profile (int fd, __u16 iocsi, bool save) |
| 3580 |
|
| 3581 |
Set I/O command set profile feature |
| 3582 |
|
| 3583 |
**Parameters** |
| 3584 |
|
| 3585 |
``int fd`` |
| 3586 |
File descriptor of nvme device |
| 3587 |
|
| 3588 |
``__u16 iocsi`` |
| 3589 |
I/O Command Set Combination Index |
| 3590 |
|
| 3591 |
``bool save`` |
| 3592 |
Save value across power states |
| 3593 |
|
| 3594 |
**Return** |
| 3595 |
|
| 3596 |
The nvme command status if a response was received (see |
| 3597 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3598 |
|
| 3599 |
|
| 3600 |
.. c:function:: int nvme_get_features (struct nvme_get_features_args *args) |
| 3601 |
|
| 3602 |
Retrieve a feature attribute |
| 3603 |
|
| 3604 |
**Parameters** |
| 3605 |
|
| 3606 |
``struct nvme_get_features_args *args`` |
| 3607 |
:c:type:`struct nvme_get_features_args <nvme_get_features_args>` argument structure |
| 3608 |
|
| 3609 |
**Return** |
| 3610 |
|
| 3611 |
The nvme command status if a response was received (see |
| 3612 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3613 |
|
| 3614 |
|
| 3615 |
.. c:function:: int nvme_get_features_data (int fd, enum nvme_features_id fid, __u32 nsid, __u32 data_len, void *data, __u32 *result) |
| 3616 |
|
| 3617 |
Helper function for **nvme_get_features\(\)** |
| 3618 |
|
| 3619 |
**Parameters** |
| 3620 |
|
| 3621 |
``int fd`` |
| 3622 |
File descriptor of nvme device |
| 3623 |
|
| 3624 |
``enum nvme_features_id fid`` |
| 3625 |
Feature identifier |
| 3626 |
|
| 3627 |
``__u32 nsid`` |
| 3628 |
Namespace ID, if applicable |
| 3629 |
|
| 3630 |
``__u32 data_len`` |
| 3631 |
Length of feature data, if applicable, in bytes |
| 3632 |
|
| 3633 |
``void *data`` |
| 3634 |
User address of feature data, if applicable |
| 3635 |
|
| 3636 |
``__u32 *result`` |
| 3637 |
The command completion result from CQE dword0 |
| 3638 |
|
| 3639 |
**Return** |
| 3640 |
|
| 3641 |
The nvme command status if a response was received (see |
| 3642 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3643 |
|
| 3644 |
|
| 3645 |
.. c:function:: int nvme_get_features_simple (int fd, enum nvme_features_id fid, __u32 nsid, __u32 *result) |
| 3646 |
|
| 3647 |
Helper function for **nvme_get_features\(\)** |
| 3648 |
|
| 3649 |
**Parameters** |
| 3650 |
|
| 3651 |
``int fd`` |
| 3652 |
File descriptor of nvme device |
| 3653 |
|
| 3654 |
``enum nvme_features_id fid`` |
| 3655 |
Feature identifier |
| 3656 |
|
| 3657 |
``__u32 nsid`` |
| 3658 |
Namespace ID, if applicable |
| 3659 |
|
| 3660 |
``__u32 *result`` |
| 3661 |
The command completion result from CQE dword0 |
| 3662 |
|
| 3663 |
**Return** |
| 3664 |
|
| 3665 |
The nvme command status if a response was received (see |
| 3666 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3667 |
|
| 3668 |
|
| 3669 |
.. c:function:: int nvme_get_features_arbitration (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3670 |
|
| 3671 |
Get arbitration feature |
| 3672 |
|
| 3673 |
**Parameters** |
| 3674 |
|
| 3675 |
``int fd`` |
| 3676 |
File descriptor of nvme device |
| 3677 |
|
| 3678 |
``enum nvme_get_features_sel sel`` |
| 3679 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3680 |
|
| 3681 |
``__u32 *result`` |
| 3682 |
The command completion result from CQE dword0 |
| 3683 |
|
| 3684 |
**Return** |
| 3685 |
|
| 3686 |
The nvme command status if a response was received (see |
| 3687 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3688 |
|
| 3689 |
|
| 3690 |
.. c:function:: int nvme_get_features_power_mgmt (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3691 |
|
| 3692 |
Get power management feature |
| 3693 |
|
| 3694 |
**Parameters** |
| 3695 |
|
| 3696 |
``int fd`` |
| 3697 |
File descriptor of nvme device |
| 3698 |
|
| 3699 |
``enum nvme_get_features_sel sel`` |
| 3700 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3701 |
|
| 3702 |
``__u32 *result`` |
| 3703 |
The command completion result from CQE dword0 |
| 3704 |
|
| 3705 |
**Return** |
| 3706 |
|
| 3707 |
The nvme command status if a response was received (see |
| 3708 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3709 |
|
| 3710 |
|
| 3711 |
.. c:function:: int nvme_get_features_lba_range (int fd, enum nvme_get_features_sel sel, struct nvme_lba_range_type *data, __u32 *result) |
| 3712 |
|
| 3713 |
Get LBA range feature |
| 3714 |
|
| 3715 |
**Parameters** |
| 3716 |
|
| 3717 |
``int fd`` |
| 3718 |
File descriptor of nvme device |
| 3719 |
|
| 3720 |
``enum nvme_get_features_sel sel`` |
| 3721 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3722 |
|
| 3723 |
``struct nvme_lba_range_type *data`` |
| 3724 |
User address of feature data, if applicable |
| 3725 |
|
| 3726 |
``__u32 *result`` |
| 3727 |
The command completion result from CQE dword0 |
| 3728 |
|
| 3729 |
**Description** |
| 3730 |
|
| 3731 |
|
| 3732 |
Deprecated: doesn't support specifying a NSID. |
| 3733 |
Use nvme_get_features_lba_range2() instead. |
| 3734 |
|
| 3735 |
**Return** |
| 3736 |
|
| 3737 |
The nvme command status if a response was received (see |
| 3738 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3739 |
|
| 3740 |
|
| 3741 |
.. c:function:: int nvme_get_features_lba_range2 (int fd, enum nvme_get_features_sel sel, __u32 nsid, struct nvme_lba_range_type *data, __u32 *result) |
| 3742 |
|
| 3743 |
Get LBA range feature |
| 3744 |
|
| 3745 |
**Parameters** |
| 3746 |
|
| 3747 |
``int fd`` |
| 3748 |
File descriptor of nvme device |
| 3749 |
|
| 3750 |
``enum nvme_get_features_sel sel`` |
| 3751 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3752 |
|
| 3753 |
``__u32 nsid`` |
| 3754 |
Namespace ID |
| 3755 |
|
| 3756 |
``struct nvme_lba_range_type *data`` |
| 3757 |
Buffer to receive LBA Range Type data structure |
| 3758 |
|
| 3759 |
``__u32 *result`` |
| 3760 |
The command completion result from CQE dword0 |
| 3761 |
|
| 3762 |
**Return** |
| 3763 |
|
| 3764 |
The nvme command status if a response was received (see |
| 3765 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3766 |
|
| 3767 |
|
| 3768 |
.. c:function:: int nvme_get_features_temp_thresh (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3769 |
|
| 3770 |
Get temperature threshold feature |
| 3771 |
|
| 3772 |
**Parameters** |
| 3773 |
|
| 3774 |
``int fd`` |
| 3775 |
File descriptor of nvme device |
| 3776 |
|
| 3777 |
``enum nvme_get_features_sel sel`` |
| 3778 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3779 |
|
| 3780 |
``__u32 *result`` |
| 3781 |
The command completion result from CQE dword0 |
| 3782 |
|
| 3783 |
**Return** |
| 3784 |
|
| 3785 |
The nvme command status if a response was received (see |
| 3786 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3787 |
|
| 3788 |
|
| 3789 |
.. c:function:: int nvme_get_features_temp_thresh2 (int fd, enum nvme_get_features_sel sel, __u8 tmpsel, enum nvme_feat_tmpthresh_thsel thsel, __u32 *result) |
| 3790 |
|
| 3791 |
Get temperature threshold feature |
| 3792 |
|
| 3793 |
**Parameters** |
| 3794 |
|
| 3795 |
``int fd`` |
| 3796 |
File descriptor of nvme device |
| 3797 |
|
| 3798 |
``enum nvme_get_features_sel sel`` |
| 3799 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3800 |
|
| 3801 |
``__u8 tmpsel`` |
| 3802 |
Threshold Temperature Select |
| 3803 |
|
| 3804 |
``enum nvme_feat_tmpthresh_thsel thsel`` |
| 3805 |
Threshold Type Select |
| 3806 |
|
| 3807 |
``__u32 *result`` |
| 3808 |
The command completion result from CQE dword0 |
| 3809 |
|
| 3810 |
**Return** |
| 3811 |
|
| 3812 |
The nvme command status if a response was received (see |
| 3813 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3814 |
|
| 3815 |
|
| 3816 |
.. c:function:: int nvme_get_features_err_recovery (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3817 |
|
| 3818 |
Get error recovery feature |
| 3819 |
|
| 3820 |
**Parameters** |
| 3821 |
|
| 3822 |
``int fd`` |
| 3823 |
File descriptor of nvme device |
| 3824 |
|
| 3825 |
``enum nvme_get_features_sel sel`` |
| 3826 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3827 |
|
| 3828 |
``__u32 *result`` |
| 3829 |
The command completion result from CQE dword0 |
| 3830 |
|
| 3831 |
**Description** |
| 3832 |
|
| 3833 |
|
| 3834 |
Deprecated: doesn't support specifying a NSID. |
| 3835 |
Use nvme_get_features_err_recovery2() instead. |
| 3836 |
|
| 3837 |
**Return** |
| 3838 |
|
| 3839 |
The nvme command status if a response was received (see |
| 3840 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3841 |
|
| 3842 |
|
| 3843 |
.. c:function:: int nvme_get_features_err_recovery2 (int fd, enum nvme_get_features_sel sel, __u32 nsid, __u32 *result) |
| 3844 |
|
| 3845 |
Get error recovery feature |
| 3846 |
|
| 3847 |
**Parameters** |
| 3848 |
|
| 3849 |
``int fd`` |
| 3850 |
File descriptor of nvme device |
| 3851 |
|
| 3852 |
``enum nvme_get_features_sel sel`` |
| 3853 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3854 |
|
| 3855 |
``__u32 nsid`` |
| 3856 |
Namespace ID |
| 3857 |
|
| 3858 |
``__u32 *result`` |
| 3859 |
The command completion result from CQE dword0 |
| 3860 |
|
| 3861 |
**Return** |
| 3862 |
|
| 3863 |
The nvme command status if a response was received (see |
| 3864 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3865 |
|
| 3866 |
|
| 3867 |
.. c:function:: int nvme_get_features_volatile_wc (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3868 |
|
| 3869 |
Get volatile write cache feature |
| 3870 |
|
| 3871 |
**Parameters** |
| 3872 |
|
| 3873 |
``int fd`` |
| 3874 |
File descriptor of nvme device |
| 3875 |
|
| 3876 |
``enum nvme_get_features_sel sel`` |
| 3877 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3878 |
|
| 3879 |
``__u32 *result`` |
| 3880 |
The command completion result from CQE dword0 |
| 3881 |
|
| 3882 |
**Return** |
| 3883 |
|
| 3884 |
The nvme command status if a response was received (see |
| 3885 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3886 |
|
| 3887 |
|
| 3888 |
.. c:function:: int nvme_get_features_num_queues (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3889 |
|
| 3890 |
Get number of queues feature |
| 3891 |
|
| 3892 |
**Parameters** |
| 3893 |
|
| 3894 |
``int fd`` |
| 3895 |
File descriptor of nvme device |
| 3896 |
|
| 3897 |
``enum nvme_get_features_sel sel`` |
| 3898 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3899 |
|
| 3900 |
``__u32 *result`` |
| 3901 |
The command completion result from CQE dword0 |
| 3902 |
|
| 3903 |
**Return** |
| 3904 |
|
| 3905 |
The nvme command status if a response was received (see |
| 3906 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3907 |
|
| 3908 |
|
| 3909 |
.. c:function:: int nvme_get_features_irq_coalesce (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3910 |
|
| 3911 |
Get IRQ coalesce feature |
| 3912 |
|
| 3913 |
**Parameters** |
| 3914 |
|
| 3915 |
``int fd`` |
| 3916 |
File descriptor of nvme device |
| 3917 |
|
| 3918 |
``enum nvme_get_features_sel sel`` |
| 3919 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3920 |
|
| 3921 |
``__u32 *result`` |
| 3922 |
The command completion result from CQE dword0 |
| 3923 |
|
| 3924 |
**Return** |
| 3925 |
|
| 3926 |
The nvme command status if a response was received (see |
| 3927 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3928 |
|
| 3929 |
|
| 3930 |
.. c:function:: int nvme_get_features_irq_config (int fd, enum nvme_get_features_sel sel, __u16 iv, __u32 *result) |
| 3931 |
|
| 3932 |
Get IRQ config feature |
| 3933 |
|
| 3934 |
**Parameters** |
| 3935 |
|
| 3936 |
``int fd`` |
| 3937 |
File descriptor of nvme device |
| 3938 |
|
| 3939 |
``enum nvme_get_features_sel sel`` |
| 3940 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3941 |
|
| 3942 |
``__u16 iv`` |
| 3943 |
|
| 3944 |
``__u32 *result`` |
| 3945 |
The command completion result from CQE dword0 |
| 3946 |
|
| 3947 |
**Return** |
| 3948 |
|
| 3949 |
The nvme command status if a response was received (see |
| 3950 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3951 |
|
| 3952 |
|
| 3953 |
.. c:function:: int nvme_get_features_write_atomic (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3954 |
|
| 3955 |
Get write atomic feature |
| 3956 |
|
| 3957 |
**Parameters** |
| 3958 |
|
| 3959 |
``int fd`` |
| 3960 |
File descriptor of nvme device |
| 3961 |
|
| 3962 |
``enum nvme_get_features_sel sel`` |
| 3963 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3964 |
|
| 3965 |
``__u32 *result`` |
| 3966 |
The command completion result from CQE dword0 |
| 3967 |
|
| 3968 |
**Return** |
| 3969 |
|
| 3970 |
The nvme command status if a response was received (see |
| 3971 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3972 |
|
| 3973 |
|
| 3974 |
.. c:function:: int nvme_get_features_async_event (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 3975 |
|
| 3976 |
Get asynchronous event feature |
| 3977 |
|
| 3978 |
**Parameters** |
| 3979 |
|
| 3980 |
``int fd`` |
| 3981 |
File descriptor of nvme device |
| 3982 |
|
| 3983 |
``enum nvme_get_features_sel sel`` |
| 3984 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 3985 |
|
| 3986 |
``__u32 *result`` |
| 3987 |
The command completion result from CQE dword0 |
| 3988 |
|
| 3989 |
**Return** |
| 3990 |
|
| 3991 |
The nvme command status if a response was received (see |
| 3992 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 3993 |
|
| 3994 |
|
| 3995 |
.. c:function:: int nvme_get_features_auto_pst (int fd, enum nvme_get_features_sel sel, struct nvme_feat_auto_pst *apst, __u32 *result) |
| 3996 |
|
| 3997 |
Get autonomous power state feature |
| 3998 |
|
| 3999 |
**Parameters** |
| 4000 |
|
| 4001 |
``int fd`` |
| 4002 |
File descriptor of nvme device |
| 4003 |
|
| 4004 |
``enum nvme_get_features_sel sel`` |
| 4005 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4006 |
|
| 4007 |
``struct nvme_feat_auto_pst *apst`` |
| 4008 |
|
| 4009 |
``__u32 *result`` |
| 4010 |
The command completion result from CQE dword0 |
| 4011 |
|
| 4012 |
**Return** |
| 4013 |
|
| 4014 |
The nvme command status if a response was received (see |
| 4015 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4016 |
|
| 4017 |
|
| 4018 |
.. c:function:: int nvme_get_features_host_mem_buf (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4019 |
|
| 4020 |
Get host memory buffer feature |
| 4021 |
|
| 4022 |
**Parameters** |
| 4023 |
|
| 4024 |
``int fd`` |
| 4025 |
File descriptor of nvme device |
| 4026 |
|
| 4027 |
``enum nvme_get_features_sel sel`` |
| 4028 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4029 |
|
| 4030 |
``__u32 *result`` |
| 4031 |
The command completion result from CQE dword0 |
| 4032 |
|
| 4033 |
**Description** |
| 4034 |
|
| 4035 |
|
| 4036 |
Deprecated: doesn't fetch the Host Memory Buffer Attributes data structure. |
| 4037 |
Use nvme_get_features_host_mem_buf2() instead. |
| 4038 |
|
| 4039 |
**Return** |
| 4040 |
|
| 4041 |
The nvme command status if a response was received (see |
| 4042 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4043 |
|
| 4044 |
|
| 4045 |
.. c:function:: int nvme_get_features_host_mem_buf2 (int fd, enum nvme_get_features_sel sel, struct nvme_host_mem_buf_attrs *attrs, __u32 *result) |
| 4046 |
|
| 4047 |
Get host memory buffer feature |
| 4048 |
|
| 4049 |
**Parameters** |
| 4050 |
|
| 4051 |
``int fd`` |
| 4052 |
File descriptor of nvme device |
| 4053 |
|
| 4054 |
``enum nvme_get_features_sel sel`` |
| 4055 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4056 |
|
| 4057 |
``struct nvme_host_mem_buf_attrs *attrs`` |
| 4058 |
Buffer for returned Host Memory Buffer Attributes |
| 4059 |
|
| 4060 |
``__u32 *result`` |
| 4061 |
The command completion result from CQE dword0 |
| 4062 |
|
| 4063 |
**Return** |
| 4064 |
|
| 4065 |
The nvme command status if a response was received (see |
| 4066 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4067 |
|
| 4068 |
|
| 4069 |
.. c:function:: int nvme_get_features_timestamp (int fd, enum nvme_get_features_sel sel, struct nvme_timestamp *ts) |
| 4070 |
|
| 4071 |
Get timestamp feature |
| 4072 |
|
| 4073 |
**Parameters** |
| 4074 |
|
| 4075 |
``int fd`` |
| 4076 |
File descriptor of nvme device |
| 4077 |
|
| 4078 |
``enum nvme_get_features_sel sel`` |
| 4079 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4080 |
|
| 4081 |
``struct nvme_timestamp *ts`` |
| 4082 |
Current timestamp |
| 4083 |
|
| 4084 |
**Return** |
| 4085 |
|
| 4086 |
The nvme command status if a response was received (see |
| 4087 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4088 |
|
| 4089 |
|
| 4090 |
.. c:function:: int nvme_get_features_kato (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4091 |
|
| 4092 |
Get keep alive timeout feature |
| 4093 |
|
| 4094 |
**Parameters** |
| 4095 |
|
| 4096 |
``int fd`` |
| 4097 |
File descriptor of nvme device |
| 4098 |
|
| 4099 |
``enum nvme_get_features_sel sel`` |
| 4100 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4101 |
|
| 4102 |
``__u32 *result`` |
| 4103 |
The command completion result from CQE dword0 |
| 4104 |
|
| 4105 |
**Return** |
| 4106 |
|
| 4107 |
The nvme command status if a response was received (see |
| 4108 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4109 |
|
| 4110 |
|
| 4111 |
.. c:function:: int nvme_get_features_hctm (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4112 |
|
| 4113 |
Get thermal management feature |
| 4114 |
|
| 4115 |
**Parameters** |
| 4116 |
|
| 4117 |
``int fd`` |
| 4118 |
File descriptor of nvme device |
| 4119 |
|
| 4120 |
``enum nvme_get_features_sel sel`` |
| 4121 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4122 |
|
| 4123 |
``__u32 *result`` |
| 4124 |
The command completion result from CQE dword0 |
| 4125 |
|
| 4126 |
**Return** |
| 4127 |
|
| 4128 |
The nvme command status if a response was received (see |
| 4129 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4130 |
|
| 4131 |
|
| 4132 |
.. c:function:: int nvme_get_features_nopsc (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4133 |
|
| 4134 |
Get non-operational power state feature |
| 4135 |
|
| 4136 |
**Parameters** |
| 4137 |
|
| 4138 |
``int fd`` |
| 4139 |
File descriptor of nvme device |
| 4140 |
|
| 4141 |
``enum nvme_get_features_sel sel`` |
| 4142 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4143 |
|
| 4144 |
``__u32 *result`` |
| 4145 |
The command completion result from CQE dword0 |
| 4146 |
|
| 4147 |
**Return** |
| 4148 |
|
| 4149 |
The nvme command status if a response was received (see |
| 4150 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4151 |
|
| 4152 |
|
| 4153 |
.. c:function:: int nvme_get_features_rrl (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4154 |
|
| 4155 |
Get read recovery level feature |
| 4156 |
|
| 4157 |
**Parameters** |
| 4158 |
|
| 4159 |
``int fd`` |
| 4160 |
File descriptor of nvme device |
| 4161 |
|
| 4162 |
``enum nvme_get_features_sel sel`` |
| 4163 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4164 |
|
| 4165 |
``__u32 *result`` |
| 4166 |
The command completion result from CQE dword0 |
| 4167 |
|
| 4168 |
**Return** |
| 4169 |
|
| 4170 |
The nvme command status if a response was received (see |
| 4171 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4172 |
|
| 4173 |
|
| 4174 |
.. c:function:: int nvme_get_features_plm_config (int fd, enum nvme_get_features_sel sel, __u16 nvmsetid, struct nvme_plm_config *data, __u32 *result) |
| 4175 |
|
| 4176 |
Get predictable latency feature |
| 4177 |
|
| 4178 |
**Parameters** |
| 4179 |
|
| 4180 |
``int fd`` |
| 4181 |
File descriptor of nvme device |
| 4182 |
|
| 4183 |
``enum nvme_get_features_sel sel`` |
| 4184 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4185 |
|
| 4186 |
``__u16 nvmsetid`` |
| 4187 |
NVM set id |
| 4188 |
|
| 4189 |
``struct nvme_plm_config *data`` |
| 4190 |
|
| 4191 |
``__u32 *result`` |
| 4192 |
The command completion result from CQE dword0 |
| 4193 |
|
| 4194 |
**Return** |
| 4195 |
|
| 4196 |
The nvme command status if a response was received (see |
| 4197 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4198 |
|
| 4199 |
|
| 4200 |
.. c:function:: int nvme_get_features_plm_window (int fd, enum nvme_get_features_sel sel, __u16 nvmsetid, __u32 *result) |
| 4201 |
|
| 4202 |
Get window select feature |
| 4203 |
|
| 4204 |
**Parameters** |
| 4205 |
|
| 4206 |
``int fd`` |
| 4207 |
File descriptor of nvme device |
| 4208 |
|
| 4209 |
``enum nvme_get_features_sel sel`` |
| 4210 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4211 |
|
| 4212 |
``__u16 nvmsetid`` |
| 4213 |
NVM set id |
| 4214 |
|
| 4215 |
``__u32 *result`` |
| 4216 |
The command completion result from CQE dword0 |
| 4217 |
|
| 4218 |
**Return** |
| 4219 |
|
| 4220 |
The nvme command status if a response was received (see |
| 4221 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4222 |
|
| 4223 |
|
| 4224 |
.. c:function:: int nvme_get_features_lba_sts_interval (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4225 |
|
| 4226 |
Get LBA status information feature |
| 4227 |
|
| 4228 |
**Parameters** |
| 4229 |
|
| 4230 |
``int fd`` |
| 4231 |
File descriptor of nvme device |
| 4232 |
|
| 4233 |
``enum nvme_get_features_sel sel`` |
| 4234 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4235 |
|
| 4236 |
``__u32 *result`` |
| 4237 |
The command completion result from CQE dword0 |
| 4238 |
|
| 4239 |
**Return** |
| 4240 |
|
| 4241 |
The nvme command status if a response was received (see |
| 4242 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4243 |
|
| 4244 |
|
| 4245 |
.. c:function:: int nvme_get_features_host_behavior (int fd, enum nvme_get_features_sel sel, struct nvme_feat_host_behavior *data, __u32 *result) |
| 4246 |
|
| 4247 |
Get host behavior feature |
| 4248 |
|
| 4249 |
**Parameters** |
| 4250 |
|
| 4251 |
``int fd`` |
| 4252 |
File descriptor of nvme device |
| 4253 |
|
| 4254 |
``enum nvme_get_features_sel sel`` |
| 4255 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4256 |
|
| 4257 |
``struct nvme_feat_host_behavior *data`` |
| 4258 |
Pointer to structure nvme_feat_host_behavior |
| 4259 |
|
| 4260 |
``__u32 *result`` |
| 4261 |
The command completion result from CQE dword0 |
| 4262 |
|
| 4263 |
**Return** |
| 4264 |
|
| 4265 |
The nvme command status if a response was received (see |
| 4266 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4267 |
|
| 4268 |
|
| 4269 |
.. c:function:: int nvme_get_features_sanitize (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4270 |
|
| 4271 |
Get sanitize feature |
| 4272 |
|
| 4273 |
**Parameters** |
| 4274 |
|
| 4275 |
``int fd`` |
| 4276 |
File descriptor of nvme device |
| 4277 |
|
| 4278 |
``enum nvme_get_features_sel sel`` |
| 4279 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4280 |
|
| 4281 |
``__u32 *result`` |
| 4282 |
The command completion result from CQE dword0 |
| 4283 |
|
| 4284 |
**Return** |
| 4285 |
|
| 4286 |
The nvme command status if a response was received (see |
| 4287 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4288 |
|
| 4289 |
|
| 4290 |
.. c:function:: int nvme_get_features_endurance_event_cfg (int fd, enum nvme_get_features_sel sel, __u16 endgid, __u32 *result) |
| 4291 |
|
| 4292 |
Get endurance event config feature |
| 4293 |
|
| 4294 |
**Parameters** |
| 4295 |
|
| 4296 |
``int fd`` |
| 4297 |
File descriptor of nvme device |
| 4298 |
|
| 4299 |
``enum nvme_get_features_sel sel`` |
| 4300 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4301 |
|
| 4302 |
``__u16 endgid`` |
| 4303 |
Endurance Group Identifier |
| 4304 |
|
| 4305 |
``__u32 *result`` |
| 4306 |
The command completion result from CQE dword0 |
| 4307 |
|
| 4308 |
**Return** |
| 4309 |
|
| 4310 |
The nvme command status if a response was received (see |
| 4311 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4312 |
|
| 4313 |
|
| 4314 |
.. c:function:: int nvme_get_features_sw_progress (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4315 |
|
| 4316 |
Get software progress feature |
| 4317 |
|
| 4318 |
**Parameters** |
| 4319 |
|
| 4320 |
``int fd`` |
| 4321 |
File descriptor of nvme device |
| 4322 |
|
| 4323 |
``enum nvme_get_features_sel sel`` |
| 4324 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4325 |
|
| 4326 |
``__u32 *result`` |
| 4327 |
The command completion result from CQE dword0 |
| 4328 |
|
| 4329 |
**Return** |
| 4330 |
|
| 4331 |
The nvme command status if a response was received (see |
| 4332 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4333 |
|
| 4334 |
|
| 4335 |
.. c:function:: int nvme_get_features_host_id (int fd, enum nvme_get_features_sel sel, bool exhid, __u32 len, __u8 *hostid) |
| 4336 |
|
| 4337 |
Get host id feature |
| 4338 |
|
| 4339 |
**Parameters** |
| 4340 |
|
| 4341 |
``int fd`` |
| 4342 |
File descriptor of nvme device |
| 4343 |
|
| 4344 |
``enum nvme_get_features_sel sel`` |
| 4345 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4346 |
|
| 4347 |
``bool exhid`` |
| 4348 |
Enable Extended Host Identifier |
| 4349 |
|
| 4350 |
``__u32 len`` |
| 4351 |
Length of **hostid** |
| 4352 |
|
| 4353 |
``__u8 *hostid`` |
| 4354 |
Buffer for returned host ID |
| 4355 |
|
| 4356 |
**Return** |
| 4357 |
|
| 4358 |
The nvme command status if a response was received (see |
| 4359 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4360 |
|
| 4361 |
|
| 4362 |
.. c:function:: int nvme_get_features_resv_mask (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4363 |
|
| 4364 |
Get reservation mask feature |
| 4365 |
|
| 4366 |
**Parameters** |
| 4367 |
|
| 4368 |
``int fd`` |
| 4369 |
File descriptor of nvme device |
| 4370 |
|
| 4371 |
``enum nvme_get_features_sel sel`` |
| 4372 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4373 |
|
| 4374 |
``__u32 *result`` |
| 4375 |
The command completion result from CQE dword0 |
| 4376 |
|
| 4377 |
**Description** |
| 4378 |
|
| 4379 |
|
| 4380 |
Deprecated: doesn't support specifying a NSID. |
| 4381 |
Use nvme_get_features_resv_mask2() instead. |
| 4382 |
|
| 4383 |
**Return** |
| 4384 |
|
| 4385 |
The nvme command status if a response was received (see |
| 4386 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4387 |
|
| 4388 |
|
| 4389 |
.. c:function:: int nvme_get_features_resv_mask2 (int fd, enum nvme_get_features_sel sel, __u32 nsid, __u32 *result) |
| 4390 |
|
| 4391 |
Get reservation mask feature |
| 4392 |
|
| 4393 |
**Parameters** |
| 4394 |
|
| 4395 |
``int fd`` |
| 4396 |
File descriptor of nvme device |
| 4397 |
|
| 4398 |
``enum nvme_get_features_sel sel`` |
| 4399 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4400 |
|
| 4401 |
``__u32 nsid`` |
| 4402 |
Namespace ID |
| 4403 |
|
| 4404 |
``__u32 *result`` |
| 4405 |
The command completion result from CQE dword0 |
| 4406 |
|
| 4407 |
**Return** |
| 4408 |
|
| 4409 |
The nvme command status if a response was received (see |
| 4410 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4411 |
|
| 4412 |
|
| 4413 |
.. c:function:: int nvme_get_features_resv_persist (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4414 |
|
| 4415 |
Get reservation persist feature |
| 4416 |
|
| 4417 |
**Parameters** |
| 4418 |
|
| 4419 |
``int fd`` |
| 4420 |
File descriptor of nvme device |
| 4421 |
|
| 4422 |
``enum nvme_get_features_sel sel`` |
| 4423 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4424 |
|
| 4425 |
``__u32 *result`` |
| 4426 |
The command completion result from CQE dword0 |
| 4427 |
|
| 4428 |
**Description** |
| 4429 |
|
| 4430 |
|
| 4431 |
Deprecated: doesn't support specifying a NSID. |
| 4432 |
Use nvme_get_features_resv_persist2() instead. |
| 4433 |
|
| 4434 |
**Return** |
| 4435 |
|
| 4436 |
The nvme command status if a response was received (see |
| 4437 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4438 |
|
| 4439 |
|
| 4440 |
.. c:function:: int nvme_get_features_resv_persist2 (int fd, enum nvme_get_features_sel sel, __u32 nsid, __u32 *result) |
| 4441 |
|
| 4442 |
Get reservation persist feature |
| 4443 |
|
| 4444 |
**Parameters** |
| 4445 |
|
| 4446 |
``int fd`` |
| 4447 |
File descriptor of nvme device |
| 4448 |
|
| 4449 |
``enum nvme_get_features_sel sel`` |
| 4450 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4451 |
|
| 4452 |
``__u32 nsid`` |
| 4453 |
Namespace ID |
| 4454 |
|
| 4455 |
``__u32 *result`` |
| 4456 |
The command completion result from CQE dword0 |
| 4457 |
|
| 4458 |
**Return** |
| 4459 |
|
| 4460 |
The nvme command status if a response was received (see |
| 4461 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4462 |
|
| 4463 |
|
| 4464 |
.. c:function:: int nvme_get_features_write_protect (int fd, __u32 nsid, enum nvme_get_features_sel sel, __u32 *result) |
| 4465 |
|
| 4466 |
Get write protect feature |
| 4467 |
|
| 4468 |
**Parameters** |
| 4469 |
|
| 4470 |
``int fd`` |
| 4471 |
File descriptor of nvme device |
| 4472 |
|
| 4473 |
``__u32 nsid`` |
| 4474 |
Namespace ID |
| 4475 |
|
| 4476 |
``enum nvme_get_features_sel sel`` |
| 4477 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4478 |
|
| 4479 |
``__u32 *result`` |
| 4480 |
The command completion result from CQE dword0 |
| 4481 |
|
| 4482 |
**Return** |
| 4483 |
|
| 4484 |
The nvme command status if a response was received (see |
| 4485 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4486 |
|
| 4487 |
|
| 4488 |
.. c:function:: int nvme_get_features_iocs_profile (int fd, enum nvme_get_features_sel sel, __u32 *result) |
| 4489 |
|
| 4490 |
Get IOCS profile feature |
| 4491 |
|
| 4492 |
**Parameters** |
| 4493 |
|
| 4494 |
``int fd`` |
| 4495 |
File descriptor of nvme device |
| 4496 |
|
| 4497 |
``enum nvme_get_features_sel sel`` |
| 4498 |
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>` |
| 4499 |
|
| 4500 |
``__u32 *result`` |
| 4501 |
The command completion result from CQE dword0 |
| 4502 |
|
| 4503 |
**Return** |
| 4504 |
|
| 4505 |
The nvme command status if a response was received (see |
| 4506 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4507 |
|
| 4508 |
|
| 4509 |
.. c:function:: int nvme_format_nvm (struct nvme_format_nvm_args *args) |
| 4510 |
|
| 4511 |
Format nvme namespace(s) |
| 4512 |
|
| 4513 |
**Parameters** |
| 4514 |
|
| 4515 |
``struct nvme_format_nvm_args *args`` |
| 4516 |
:c:type:`struct nvme_format_nvme_args <nvme_format_nvme_args>` argument structure |
| 4517 |
|
| 4518 |
**Description** |
| 4519 |
|
| 4520 |
The Format NVM command low level formats the NVM media. This command is used |
| 4521 |
by the host to change the LBA data size and/or metadata size. A low level |
| 4522 |
format may destroy all data and metadata associated with all namespaces or |
| 4523 |
only the specific namespace associated with the command |
| 4524 |
|
| 4525 |
**Return** |
| 4526 |
|
| 4527 |
The nvme command status if a response was received (see |
| 4528 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4529 |
|
| 4530 |
|
| 4531 |
.. c:function:: int nvme_ns_mgmt (struct nvme_ns_mgmt_args *args) |
| 4532 |
|
| 4533 |
Issue a Namespace management command |
| 4534 |
|
| 4535 |
**Parameters** |
| 4536 |
|
| 4537 |
``struct nvme_ns_mgmt_args *args`` |
| 4538 |
:c:type:`struct nvme_ns_mgmt_args <nvme_ns_mgmt_args>` Argument structure |
| 4539 |
|
| 4540 |
**Return** |
| 4541 |
|
| 4542 |
The nvme command status if a response was received (see |
| 4543 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4544 |
|
| 4545 |
|
| 4546 |
.. c:function:: int nvme_ns_mgmt_create (int fd, struct nvme_id_ns *ns, __u32 *nsid, __u32 timeout, __u8 csi, struct nvme_ns_mgmt_host_sw_specified *data) |
| 4547 |
|
| 4548 |
Create a non attached namespace |
| 4549 |
|
| 4550 |
**Parameters** |
| 4551 |
|
| 4552 |
``int fd`` |
| 4553 |
File descriptor of nvme device |
| 4554 |
|
| 4555 |
``struct nvme_id_ns *ns`` |
| 4556 |
Namespace identification that defines ns creation parameters |
| 4557 |
|
| 4558 |
``__u32 *nsid`` |
| 4559 |
On success, set to the namespace id that was created |
| 4560 |
|
| 4561 |
``__u32 timeout`` |
| 4562 |
Override the default timeout to this value in milliseconds; |
| 4563 |
set to 0 to use the system default. |
| 4564 |
|
| 4565 |
``__u8 csi`` |
| 4566 |
Command Set Identifier |
| 4567 |
|
| 4568 |
``struct nvme_ns_mgmt_host_sw_specified *data`` |
| 4569 |
Host Software Specified Fields that defines ns creation parameters |
| 4570 |
|
| 4571 |
**Description** |
| 4572 |
|
| 4573 |
On successful creation, the namespace exists in the subsystem, but is not |
| 4574 |
attached to any controller. Use the nvme_ns_attach_ctrls() to assign the |
| 4575 |
namespace to one or more controllers. |
| 4576 |
|
| 4577 |
**Return** |
| 4578 |
|
| 4579 |
The nvme command status if a response was received (see |
| 4580 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4581 |
|
| 4582 |
|
| 4583 |
.. c:function:: int nvme_ns_mgmt_delete_timeout (int fd, __u32 nsid, __u32 timeout) |
| 4584 |
|
| 4585 |
Delete a non attached namespace with timeout |
| 4586 |
|
| 4587 |
**Parameters** |
| 4588 |
|
| 4589 |
``int fd`` |
| 4590 |
File descriptor of nvme device |
| 4591 |
|
| 4592 |
``__u32 nsid`` |
| 4593 |
Namespace identifier to delete |
| 4594 |
|
| 4595 |
``__u32 timeout`` |
| 4596 |
Override the default timeout to this value in milliseconds; |
| 4597 |
set to 0 to use the system default. |
| 4598 |
|
| 4599 |
**Description** |
| 4600 |
|
| 4601 |
It is recommended that a namespace being deleted is not attached to any |
| 4602 |
controller. Use the nvme_ns_detach_ctrls() first if the namespace is still |
| 4603 |
attached. |
| 4604 |
|
| 4605 |
**Return** |
| 4606 |
|
| 4607 |
The nvme command status if a response was received (see |
| 4608 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4609 |
|
| 4610 |
|
| 4611 |
.. c:function:: int nvme_ns_mgmt_delete (int fd, __u32 nsid) |
| 4612 |
|
| 4613 |
Delete a non attached namespace |
| 4614 |
|
| 4615 |
**Parameters** |
| 4616 |
|
| 4617 |
``int fd`` |
| 4618 |
File descriptor of nvme device |
| 4619 |
|
| 4620 |
``__u32 nsid`` |
| 4621 |
Namespace identifier to delete |
| 4622 |
|
| 4623 |
**Description** |
| 4624 |
|
| 4625 |
It is recommended that a namespace being deleted is not attached to any |
| 4626 |
controller. Use the nvme_ns_detach_ctrls() first if the namespace is still |
| 4627 |
attached. |
| 4628 |
|
| 4629 |
**Return** |
| 4630 |
|
| 4631 |
The nvme command status if a response was received (see |
| 4632 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4633 |
|
| 4634 |
|
| 4635 |
.. c:function:: int nvme_ns_attach (struct nvme_ns_attach_args *args) |
| 4636 |
|
| 4637 |
Attach or detach namespace to controller(s) |
| 4638 |
|
| 4639 |
**Parameters** |
| 4640 |
|
| 4641 |
``struct nvme_ns_attach_args *args`` |
| 4642 |
:c:type:`struct nvme_ns_attach_args <nvme_ns_attach_args>` Argument structure |
| 4643 |
|
| 4644 |
**Return** |
| 4645 |
|
| 4646 |
The nvme command status if a response was received (see |
| 4647 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4648 |
|
| 4649 |
|
| 4650 |
.. c:function:: int nvme_ns_attach_ctrls (int fd, __u32 nsid, struct nvme_ctrl_list *ctrlist) |
| 4651 |
|
| 4652 |
Attach namespace to controllers |
| 4653 |
|
| 4654 |
**Parameters** |
| 4655 |
|
| 4656 |
``int fd`` |
| 4657 |
File descriptor of nvme device |
| 4658 |
|
| 4659 |
``__u32 nsid`` |
| 4660 |
Namespace ID to attach |
| 4661 |
|
| 4662 |
``struct nvme_ctrl_list *ctrlist`` |
| 4663 |
Controller list to modify attachment state of nsid |
| 4664 |
|
| 4665 |
**Return** |
| 4666 |
|
| 4667 |
The nvme command status if a response was received (see |
| 4668 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4669 |
|
| 4670 |
|
| 4671 |
.. c:function:: int nvme_ns_detach_ctrls (int fd, __u32 nsid, struct nvme_ctrl_list *ctrlist) |
| 4672 |
|
| 4673 |
Detach namespace from controllers |
| 4674 |
|
| 4675 |
**Parameters** |
| 4676 |
|
| 4677 |
``int fd`` |
| 4678 |
File descriptor of nvme device |
| 4679 |
|
| 4680 |
``__u32 nsid`` |
| 4681 |
Namespace ID to detach |
| 4682 |
|
| 4683 |
``struct nvme_ctrl_list *ctrlist`` |
| 4684 |
Controller list to modify attachment state of nsid |
| 4685 |
|
| 4686 |
**Return** |
| 4687 |
|
| 4688 |
The nvme command status if a response was received (see |
| 4689 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4690 |
|
| 4691 |
|
| 4692 |
.. c:function:: int nvme_fw_download (struct nvme_fw_download_args *args) |
| 4693 |
|
| 4694 |
Download part or all of a firmware image to the controller |
| 4695 |
|
| 4696 |
**Parameters** |
| 4697 |
|
| 4698 |
``struct nvme_fw_download_args *args`` |
| 4699 |
:c:type:`struct nvme_fw_download_args <nvme_fw_download_args>` argument structure |
| 4700 |
|
| 4701 |
**Description** |
| 4702 |
|
| 4703 |
The Firmware Image Download command downloads all or a portion of an image |
| 4704 |
for a future update to the controller. The Firmware Image Download command |
| 4705 |
downloads a new image (in whole or in part) to the controller. |
| 4706 |
|
| 4707 |
The image may be constructed of multiple pieces that are individually |
| 4708 |
downloaded with separate Firmware Image Download commands. Each Firmware |
| 4709 |
Image Download command includes a Dword Offset and Number of Dwords that |
| 4710 |
specify a dword range. |
| 4711 |
|
| 4712 |
The new firmware image is not activated as part of the Firmware Image |
| 4713 |
Download command. Use the nvme_fw_commit() to activate a newly downloaded |
| 4714 |
image. |
| 4715 |
|
| 4716 |
**Return** |
| 4717 |
|
| 4718 |
The nvme command status if a response was received (see |
| 4719 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4720 |
|
| 4721 |
|
| 4722 |
.. c:function:: int nvme_fw_commit (struct nvme_fw_commit_args *args) |
| 4723 |
|
| 4724 |
Commit firmware using the specified action |
| 4725 |
|
| 4726 |
**Parameters** |
| 4727 |
|
| 4728 |
``struct nvme_fw_commit_args *args`` |
| 4729 |
:c:type:`struct nvme_fw_commit_args <nvme_fw_commit_args>` argument structure |
| 4730 |
|
| 4731 |
**Description** |
| 4732 |
|
| 4733 |
The Firmware Commit command modifies the firmware image or Boot Partitions. |
| 4734 |
|
| 4735 |
**Return** |
| 4736 |
|
| 4737 |
The nvme command status if a response was received (see |
| 4738 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. The command |
| 4739 |
status response may specify additional reset actions required to complete |
| 4740 |
the commit process. |
| 4741 |
|
| 4742 |
|
| 4743 |
.. c:function:: int nvme_security_send (struct nvme_security_send_args *args) |
| 4744 |
|
| 4745 |
Security Send command |
| 4746 |
|
| 4747 |
**Parameters** |
| 4748 |
|
| 4749 |
``struct nvme_security_send_args *args`` |
| 4750 |
:c:type:`struct nvme_security_send <nvme_security_send>` argument structure |
| 4751 |
|
| 4752 |
**Description** |
| 4753 |
|
| 4754 |
The Security Send command transfers security protocol data to the |
| 4755 |
controller. The data structure transferred to the controller as part of this |
| 4756 |
command contains security protocol specific commands to be performed by the |
| 4757 |
controller. The data structure transferred may also contain data or |
| 4758 |
parameters associated with the security protocol commands. |
| 4759 |
|
| 4760 |
The security data is protocol specific and is not defined by the NVMe |
| 4761 |
specification. |
| 4762 |
|
| 4763 |
**Return** |
| 4764 |
|
| 4765 |
The nvme command status if a response was received (see |
| 4766 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4767 |
|
| 4768 |
|
| 4769 |
.. c:function:: int nvme_security_receive (struct nvme_security_receive_args *args) |
| 4770 |
|
| 4771 |
Security Receive command |
| 4772 |
|
| 4773 |
**Parameters** |
| 4774 |
|
| 4775 |
``struct nvme_security_receive_args *args`` |
| 4776 |
:c:type:`struct nvme_security_receive <nvme_security_receive>` argument structure |
| 4777 |
|
| 4778 |
**Return** |
| 4779 |
|
| 4780 |
The nvme command status if a response was received (see |
| 4781 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4782 |
|
| 4783 |
|
| 4784 |
.. c:function:: int nvme_get_lba_status (struct nvme_get_lba_status_args *args) |
| 4785 |
|
| 4786 |
Retrieve information on possibly unrecoverable LBAs |
| 4787 |
|
| 4788 |
**Parameters** |
| 4789 |
|
| 4790 |
``struct nvme_get_lba_status_args *args`` |
| 4791 |
:c:type:`struct nvme_get_lba_status_args <nvme_get_lba_status_args>` argument structure |
| 4792 |
|
| 4793 |
**Description** |
| 4794 |
|
| 4795 |
The Get LBA Status command requests information about Potentially |
| 4796 |
Unrecoverable LBAs. Refer to the specification for action type descriptions. |
| 4797 |
|
| 4798 |
**Return** |
| 4799 |
|
| 4800 |
The nvme command status if a response was received (see |
| 4801 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4802 |
|
| 4803 |
|
| 4804 |
.. c:function:: int nvme_directive_send (struct nvme_directive_send_args *args) |
| 4805 |
|
| 4806 |
Send directive command |
| 4807 |
|
| 4808 |
**Parameters** |
| 4809 |
|
| 4810 |
``struct nvme_directive_send_args *args`` |
| 4811 |
:c:type:`struct nvme_directive_send_args <nvme_directive_send_args>` argument structure |
| 4812 |
|
| 4813 |
**Description** |
| 4814 |
|
| 4815 |
Directives is a mechanism to enable host and NVM subsystem or controller |
| 4816 |
information exchange. The Directive Send command transfers data related to a |
| 4817 |
specific Directive Type from the host to the controller. |
| 4818 |
|
| 4819 |
See the NVMe specification for more information. |
| 4820 |
|
| 4821 |
**Return** |
| 4822 |
|
| 4823 |
The nvme command status if a response was received (see |
| 4824 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4825 |
|
| 4826 |
|
| 4827 |
.. c:function:: int nvme_directive_send_id_endir (int fd, __u32 nsid, bool endir, enum nvme_directive_dtype dtype, struct nvme_id_directives *id) |
| 4828 |
|
| 4829 |
Directive Send Enable Directive |
| 4830 |
|
| 4831 |
**Parameters** |
| 4832 |
|
| 4833 |
``int fd`` |
| 4834 |
File descriptor of nvme device |
| 4835 |
|
| 4836 |
``__u32 nsid`` |
| 4837 |
Namespace Identifier |
| 4838 |
|
| 4839 |
``bool endir`` |
| 4840 |
Enable Directive |
| 4841 |
|
| 4842 |
``enum nvme_directive_dtype dtype`` |
| 4843 |
Directive Type |
| 4844 |
|
| 4845 |
``struct nvme_id_directives *id`` |
| 4846 |
Pointer to structure nvme_id_directives |
| 4847 |
|
| 4848 |
**Return** |
| 4849 |
|
| 4850 |
The nvme command status if a response was received (see |
| 4851 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4852 |
|
| 4853 |
|
| 4854 |
.. c:function:: int nvme_directive_send_stream_release_identifier (int fd, __u32 nsid, __u16 stream_id) |
| 4855 |
|
| 4856 |
Directive Send Stream release |
| 4857 |
|
| 4858 |
**Parameters** |
| 4859 |
|
| 4860 |
``int fd`` |
| 4861 |
File descriptor of nvme device |
| 4862 |
|
| 4863 |
``__u32 nsid`` |
| 4864 |
Namespace ID |
| 4865 |
|
| 4866 |
``__u16 stream_id`` |
| 4867 |
Stream identifier |
| 4868 |
|
| 4869 |
**Return** |
| 4870 |
|
| 4871 |
The nvme command status if a response was received (see |
| 4872 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4873 |
|
| 4874 |
|
| 4875 |
.. c:function:: int nvme_directive_send_stream_release_resource (int fd, __u32 nsid) |
| 4876 |
|
| 4877 |
Directive Send Stream release resources |
| 4878 |
|
| 4879 |
**Parameters** |
| 4880 |
|
| 4881 |
``int fd`` |
| 4882 |
File descriptor of nvme device |
| 4883 |
|
| 4884 |
``__u32 nsid`` |
| 4885 |
Namespace ID |
| 4886 |
|
| 4887 |
**Return** |
| 4888 |
|
| 4889 |
The nvme command status if a response was received (see |
| 4890 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4891 |
|
| 4892 |
|
| 4893 |
.. c:function:: int nvme_directive_recv (struct nvme_directive_recv_args *args) |
| 4894 |
|
| 4895 |
Receive directive specific data |
| 4896 |
|
| 4897 |
**Parameters** |
| 4898 |
|
| 4899 |
``struct nvme_directive_recv_args *args`` |
| 4900 |
:c:type:`struct nvme_directive_recv_args <nvme_directive_recv_args>` argument structure |
| 4901 |
|
| 4902 |
**Return** |
| 4903 |
|
| 4904 |
The nvme command status if a response was received (see |
| 4905 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4906 |
|
| 4907 |
|
| 4908 |
.. c:function:: int nvme_directive_recv_identify_parameters (int fd, __u32 nsid, struct nvme_id_directives *id) |
| 4909 |
|
| 4910 |
Directive receive identifier parameters |
| 4911 |
|
| 4912 |
**Parameters** |
| 4913 |
|
| 4914 |
``int fd`` |
| 4915 |
File descriptor of nvme device |
| 4916 |
|
| 4917 |
``__u32 nsid`` |
| 4918 |
Namespace ID |
| 4919 |
|
| 4920 |
``struct nvme_id_directives *id`` |
| 4921 |
Identify parameters buffer |
| 4922 |
|
| 4923 |
**Return** |
| 4924 |
|
| 4925 |
The nvme command status if a response was received (see |
| 4926 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4927 |
|
| 4928 |
|
| 4929 |
.. c:function:: int nvme_directive_recv_stream_parameters (int fd, __u32 nsid, struct nvme_streams_directive_params *parms) |
| 4930 |
|
| 4931 |
Directive receive stream parameters |
| 4932 |
|
| 4933 |
**Parameters** |
| 4934 |
|
| 4935 |
``int fd`` |
| 4936 |
File descriptor of nvme device |
| 4937 |
|
| 4938 |
``__u32 nsid`` |
| 4939 |
Namespace ID |
| 4940 |
|
| 4941 |
``struct nvme_streams_directive_params *parms`` |
| 4942 |
Streams directive parameters buffer |
| 4943 |
|
| 4944 |
**Return** |
| 4945 |
|
| 4946 |
The nvme command status if a response was received (see |
| 4947 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4948 |
|
| 4949 |
|
| 4950 |
.. c:function:: int nvme_directive_recv_stream_status (int fd, __u32 nsid, unsigned int nr_entries, struct nvme_streams_directive_status *id) |
| 4951 |
|
| 4952 |
Directive receive stream status |
| 4953 |
|
| 4954 |
**Parameters** |
| 4955 |
|
| 4956 |
``int fd`` |
| 4957 |
File descriptor of nvme device |
| 4958 |
|
| 4959 |
``__u32 nsid`` |
| 4960 |
Namespace ID |
| 4961 |
|
| 4962 |
``unsigned int nr_entries`` |
| 4963 |
Number of streams to receive |
| 4964 |
|
| 4965 |
``struct nvme_streams_directive_status *id`` |
| 4966 |
Stream status buffer |
| 4967 |
|
| 4968 |
**Return** |
| 4969 |
|
| 4970 |
The nvme command status if a response was received (see |
| 4971 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4972 |
|
| 4973 |
|
| 4974 |
.. c:function:: int nvme_directive_recv_stream_allocate (int fd, __u32 nsid, __u16 nsr, __u32 *result) |
| 4975 |
|
| 4976 |
Directive receive stream allocate |
| 4977 |
|
| 4978 |
**Parameters** |
| 4979 |
|
| 4980 |
``int fd`` |
| 4981 |
File descriptor of nvme device |
| 4982 |
|
| 4983 |
``__u32 nsid`` |
| 4984 |
Namespace ID |
| 4985 |
|
| 4986 |
``__u16 nsr`` |
| 4987 |
Namespace Streams Requested |
| 4988 |
|
| 4989 |
``__u32 *result`` |
| 4990 |
If successful, the CQE dword0 value |
| 4991 |
|
| 4992 |
**Return** |
| 4993 |
|
| 4994 |
The nvme command status if a response was received (see |
| 4995 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 4996 |
|
| 4997 |
|
| 4998 |
.. c:function:: int nvme_capacity_mgmt (struct nvme_capacity_mgmt_args *args) |
| 4999 |
|
| 5000 |
Capacity management command |
| 5001 |
|
| 5002 |
**Parameters** |
| 5003 |
|
| 5004 |
``struct nvme_capacity_mgmt_args *args`` |
| 5005 |
:c:type:`struct nvme_capacity_mgmt_args <nvme_capacity_mgmt_args>` argument structure |
| 5006 |
|
| 5007 |
**Return** |
| 5008 |
|
| 5009 |
The nvme command status if a response was received (see |
| 5010 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5011 |
|
| 5012 |
|
| 5013 |
.. c:function:: int nvme_lockdown (struct nvme_lockdown_args *args) |
| 5014 |
|
| 5015 |
Issue lockdown command |
| 5016 |
|
| 5017 |
**Parameters** |
| 5018 |
|
| 5019 |
``struct nvme_lockdown_args *args`` |
| 5020 |
:c:type:`struct nvme_lockdown_args <nvme_lockdown_args>` argument structure |
| 5021 |
|
| 5022 |
**Return** |
| 5023 |
|
| 5024 |
The nvme command status if a response was received (see |
| 5025 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5026 |
|
| 5027 |
|
| 5028 |
.. c:function:: int nvme_set_property (struct nvme_set_property_args *args) |
| 5029 |
|
| 5030 |
Set controller property |
| 5031 |
|
| 5032 |
**Parameters** |
| 5033 |
|
| 5034 |
``struct nvme_set_property_args *args`` |
| 5035 |
:c:type:`struct nvme_set_property_args <nvme_set_property_args>` argument structure |
| 5036 |
|
| 5037 |
**Description** |
| 5038 |
|
| 5039 |
This is an NVMe-over-Fabrics specific command, not applicable to PCIe. These |
| 5040 |
properties align to the PCI MMIO controller registers. |
| 5041 |
|
| 5042 |
**Return** |
| 5043 |
|
| 5044 |
The nvme command status if a response was received (see |
| 5045 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5046 |
|
| 5047 |
|
| 5048 |
.. c:function:: int nvme_get_property (struct nvme_get_property_args *args) |
| 5049 |
|
| 5050 |
Get a controller property |
| 5051 |
|
| 5052 |
**Parameters** |
| 5053 |
|
| 5054 |
``struct nvme_get_property_args *args`` |
| 5055 |
:c:type:`struct nvme_get_propert_args <nvme_get_propert_args>` argument structure |
| 5056 |
|
| 5057 |
**Description** |
| 5058 |
|
| 5059 |
This is an NVMe-over-Fabrics specific command, not applicable to PCIe. These |
| 5060 |
properties align to the PCI MMIO controller registers. |
| 5061 |
|
| 5062 |
**Return** |
| 5063 |
|
| 5064 |
The nvme command status if a response was received (see |
| 5065 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5066 |
|
| 5067 |
|
| 5068 |
.. c:function:: int nvme_sanitize_nvm (struct nvme_sanitize_nvm_args *args) |
| 5069 |
|
| 5070 |
Start a sanitize operation |
| 5071 |
|
| 5072 |
**Parameters** |
| 5073 |
|
| 5074 |
``struct nvme_sanitize_nvm_args *args`` |
| 5075 |
:c:type:`struct nvme_sanitize_nvm_args <nvme_sanitize_nvm_args>` argument structure |
| 5076 |
|
| 5077 |
**Description** |
| 5078 |
|
| 5079 |
A sanitize operation alters all user data in the NVM subsystem such that |
| 5080 |
recovery of any previous user data from any cache, the non-volatile media, |
| 5081 |
or any Controller Memory Buffer is not possible. |
| 5082 |
|
| 5083 |
The Sanitize command starts a sanitize operation or to recover from a |
| 5084 |
previously failed sanitize operation. The sanitize operation types that may |
| 5085 |
be supported are Block Erase, Crypto Erase, and Overwrite. All sanitize |
| 5086 |
operations are processed in the background, i.e., completion of the sanitize |
| 5087 |
command does not indicate completion of the sanitize operation. |
| 5088 |
|
| 5089 |
**Return** |
| 5090 |
|
| 5091 |
The nvme command status if a response was received (see |
| 5092 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5093 |
|
| 5094 |
|
| 5095 |
.. c:function:: int nvme_dev_self_test (struct nvme_dev_self_test_args *args) |
| 5096 |
|
| 5097 |
Start or abort a self test |
| 5098 |
|
| 5099 |
**Parameters** |
| 5100 |
|
| 5101 |
``struct nvme_dev_self_test_args *args`` |
| 5102 |
:c:type:`struct nvme_dev_self_test <nvme_dev_self_test>` argument structure |
| 5103 |
|
| 5104 |
**Description** |
| 5105 |
|
| 5106 |
The Device Self-test command starts a device self-test operation or abort a |
| 5107 |
device self-test operation. A device self-test operation is a diagnostic |
| 5108 |
testing sequence that tests the integrity and functionality of the |
| 5109 |
controller and may include testing of the media associated with namespaces. |
| 5110 |
The controller may return a response to this command immediately while |
| 5111 |
running the self-test in the background. |
| 5112 |
|
| 5113 |
Set the 'nsid' field to 0 to not include namespaces in the test. Set to |
| 5114 |
0xffffffff to test all namespaces. All other values tests a specific |
| 5115 |
namespace, if present. |
| 5116 |
|
| 5117 |
**Return** |
| 5118 |
|
| 5119 |
The nvme command status if a response was received (see |
| 5120 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5121 |
|
| 5122 |
|
| 5123 |
.. c:function:: int nvme_virtual_mgmt (struct nvme_virtual_mgmt_args *args) |
| 5124 |
|
| 5125 |
Virtualization resource management |
| 5126 |
|
| 5127 |
**Parameters** |
| 5128 |
|
| 5129 |
``struct nvme_virtual_mgmt_args *args`` |
| 5130 |
:c:type:`struct nvme_virtual_mgmt_args <nvme_virtual_mgmt_args>` argument structure |
| 5131 |
|
| 5132 |
**Description** |
| 5133 |
|
| 5134 |
The Virtualization Management command is supported by primary controllers |
| 5135 |
that support the Virtualization Enhancements capability. This command is |
| 5136 |
used for several functions: |
| 5137 |
|
| 5138 |
- Modifying Flexible Resource allocation for the primary controller |
| 5139 |
- Assigning Flexible Resources for secondary controllers |
| 5140 |
- Setting the Online and Offline state for secondary controllers |
| 5141 |
|
| 5142 |
**Return** |
| 5143 |
|
| 5144 |
The nvme command status if a response was received (see |
| 5145 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5146 |
|
| 5147 |
|
| 5148 |
.. c:function:: int nvme_flush (int fd, __u32 nsid) |
| 5149 |
|
| 5150 |
Send an nvme flush command |
| 5151 |
|
| 5152 |
**Parameters** |
| 5153 |
|
| 5154 |
``int fd`` |
| 5155 |
File descriptor of nvme device |
| 5156 |
|
| 5157 |
``__u32 nsid`` |
| 5158 |
Namespace identifier |
| 5159 |
|
| 5160 |
**Description** |
| 5161 |
|
| 5162 |
The Flush command requests that the contents of volatile write cache be made |
| 5163 |
non-volatile. |
| 5164 |
|
| 5165 |
**Return** |
| 5166 |
|
| 5167 |
The nvme command status if a response was received (see |
| 5168 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5169 |
|
| 5170 |
|
| 5171 |
.. c:function:: int nvme_io (struct nvme_io_args *args, __u8 opcode) |
| 5172 |
|
| 5173 |
Submit an nvme user I/O command |
| 5174 |
|
| 5175 |
**Parameters** |
| 5176 |
|
| 5177 |
``struct nvme_io_args *args`` |
| 5178 |
:c:type:`struct nvme_io_args <nvme_io_args>` argument structure |
| 5179 |
|
| 5180 |
``__u8 opcode`` |
| 5181 |
Opcode to execute |
| 5182 |
|
| 5183 |
**Return** |
| 5184 |
|
| 5185 |
The nvme command status if a response was received (see |
| 5186 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5187 |
|
| 5188 |
|
| 5189 |
.. c:function:: int nvme_read (struct nvme_io_args *args) |
| 5190 |
|
| 5191 |
Submit an nvme user read command |
| 5192 |
|
| 5193 |
**Parameters** |
| 5194 |
|
| 5195 |
``struct nvme_io_args *args`` |
| 5196 |
:c:type:`struct nvme_io_args <nvme_io_args>` argument structure |
| 5197 |
|
| 5198 |
**Return** |
| 5199 |
|
| 5200 |
The nvme command status if a response was received (see |
| 5201 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5202 |
|
| 5203 |
|
| 5204 |
.. c:function:: int nvme_write (struct nvme_io_args *args) |
| 5205 |
|
| 5206 |
Submit an nvme user write command |
| 5207 |
|
| 5208 |
**Parameters** |
| 5209 |
|
| 5210 |
``struct nvme_io_args *args`` |
| 5211 |
:c:type:`struct nvme_io_args <nvme_io_args>` argument structure |
| 5212 |
|
| 5213 |
**Return** |
| 5214 |
|
| 5215 |
The nvme command status if a response was received (see |
| 5216 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5217 |
|
| 5218 |
|
| 5219 |
.. c:function:: int nvme_compare (struct nvme_io_args *args) |
| 5220 |
|
| 5221 |
Submit an nvme user compare command |
| 5222 |
|
| 5223 |
**Parameters** |
| 5224 |
|
| 5225 |
``struct nvme_io_args *args`` |
| 5226 |
:c:type:`struct nvme_io_args <nvme_io_args>` argument structure |
| 5227 |
|
| 5228 |
**Return** |
| 5229 |
|
| 5230 |
The nvme command status if a response was received (see |
| 5231 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5232 |
|
| 5233 |
|
| 5234 |
.. c:function:: int nvme_write_zeros (struct nvme_io_args *args) |
| 5235 |
|
| 5236 |
Submit an nvme write zeroes command |
| 5237 |
|
| 5238 |
**Parameters** |
| 5239 |
|
| 5240 |
``struct nvme_io_args *args`` |
| 5241 |
:c:type:`struct nvme_io_args <nvme_io_args>` argument structure |
| 5242 |
|
| 5243 |
**Description** |
| 5244 |
|
| 5245 |
The Write Zeroes command sets a range of logical blocks to zero. After |
| 5246 |
successful completion of this command, the value returned by subsequent |
| 5247 |
reads of logical blocks in this range shall be all bytes cleared to 0h until |
| 5248 |
a write occurs to this LBA range. |
| 5249 |
|
| 5250 |
**Return** |
| 5251 |
|
| 5252 |
The nvme command status if a response was received (see |
| 5253 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5254 |
|
| 5255 |
|
| 5256 |
.. c:function:: int nvme_write_uncorrectable (struct nvme_io_args *args) |
| 5257 |
|
| 5258 |
Submit an nvme write uncorrectable command |
| 5259 |
|
| 5260 |
**Parameters** |
| 5261 |
|
| 5262 |
``struct nvme_io_args *args`` |
| 5263 |
:c:type:`struct nvme_io_args <nvme_io_args>` argument structure |
| 5264 |
|
| 5265 |
**Description** |
| 5266 |
|
| 5267 |
The Write Uncorrectable command marks a range of logical blocks as invalid. |
| 5268 |
When the specified logical block(s) are read after this operation, a failure |
| 5269 |
is returned with Unrecovered Read Error status. To clear the invalid logical |
| 5270 |
block status, a write operation on those logical blocks is required. |
| 5271 |
|
| 5272 |
**Return** |
| 5273 |
|
| 5274 |
The nvme command status if a response was received (see |
| 5275 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5276 |
|
| 5277 |
|
| 5278 |
.. c:function:: int nvme_verify (struct nvme_io_args *args) |
| 5279 |
|
| 5280 |
Send an nvme verify command |
| 5281 |
|
| 5282 |
**Parameters** |
| 5283 |
|
| 5284 |
``struct nvme_io_args *args`` |
| 5285 |
:c:type:`struct nvme_io_args <nvme_io_args>` argument structure |
| 5286 |
|
| 5287 |
**Description** |
| 5288 |
|
| 5289 |
The Verify command verifies integrity of stored information by reading data |
| 5290 |
and metadata, if applicable, for the LBAs indicated without transferring any |
| 5291 |
data or metadata to the host. |
| 5292 |
|
| 5293 |
**Return** |
| 5294 |
|
| 5295 |
The nvme command status if a response was received (see |
| 5296 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5297 |
|
| 5298 |
|
| 5299 |
.. c:function:: int nvme_dsm (struct nvme_dsm_args *args) |
| 5300 |
|
| 5301 |
Send an nvme data set management command |
| 5302 |
|
| 5303 |
**Parameters** |
| 5304 |
|
| 5305 |
``struct nvme_dsm_args *args`` |
| 5306 |
:c:type:`struct nvme_dsm_args <nvme_dsm_args>` argument structure |
| 5307 |
|
| 5308 |
**Description** |
| 5309 |
|
| 5310 |
The Dataset Management command is used by the host to indicate attributes |
| 5311 |
for ranges of logical blocks. This includes attributes like frequency that |
| 5312 |
data is read or written, access size, and other information that may be used |
| 5313 |
to optimize performance and reliability, and may be used to |
| 5314 |
deallocate/unmap/trim those logical blocks. |
| 5315 |
|
| 5316 |
**Return** |
| 5317 |
|
| 5318 |
The nvme command status if a response was received (see |
| 5319 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5320 |
|
| 5321 |
|
| 5322 |
.. c:function:: int nvme_copy (struct nvme_copy_args *args) |
| 5323 |
|
| 5324 |
Copy command |
| 5325 |
|
| 5326 |
**Parameters** |
| 5327 |
|
| 5328 |
``struct nvme_copy_args *args`` |
| 5329 |
:c:type:`struct nvme_copy_args <nvme_copy_args>` argument structure |
| 5330 |
|
| 5331 |
**Return** |
| 5332 |
|
| 5333 |
The nvme command status if a response was received (see |
| 5334 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5335 |
|
| 5336 |
|
| 5337 |
.. c:function:: int nvme_resv_acquire (struct nvme_resv_acquire_args *args) |
| 5338 |
|
| 5339 |
Send an nvme reservation acquire |
| 5340 |
|
| 5341 |
**Parameters** |
| 5342 |
|
| 5343 |
``struct nvme_resv_acquire_args *args`` |
| 5344 |
:c:type:`struct nvme_resv_acquire <nvme_resv_acquire>` argument structure |
| 5345 |
|
| 5346 |
**Description** |
| 5347 |
|
| 5348 |
The Reservation Acquire command acquires a reservation on a namespace, |
| 5349 |
preempt a reservation held on a namespace, and abort a reservation held on a |
| 5350 |
namespace. |
| 5351 |
|
| 5352 |
**Return** |
| 5353 |
|
| 5354 |
The nvme command status if a response was received (see |
| 5355 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5356 |
|
| 5357 |
|
| 5358 |
.. c:function:: int nvme_resv_register (struct nvme_resv_register_args *args) |
| 5359 |
|
| 5360 |
Send an nvme reservation register |
| 5361 |
|
| 5362 |
**Parameters** |
| 5363 |
|
| 5364 |
``struct nvme_resv_register_args *args`` |
| 5365 |
:c:type:`struct nvme_resv_register_args <nvme_resv_register_args>` argument structure |
| 5366 |
|
| 5367 |
**Description** |
| 5368 |
|
| 5369 |
The Reservation Register command registers, unregisters, or replaces a |
| 5370 |
reservation key. |
| 5371 |
|
| 5372 |
**Return** |
| 5373 |
|
| 5374 |
The nvme command status if a response was received (see |
| 5375 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5376 |
|
| 5377 |
|
| 5378 |
.. c:function:: int nvme_resv_release (struct nvme_resv_release_args *args) |
| 5379 |
|
| 5380 |
Send an nvme reservation release |
| 5381 |
|
| 5382 |
**Parameters** |
| 5383 |
|
| 5384 |
``struct nvme_resv_release_args *args`` |
| 5385 |
:c:type:`struct nvme_resv_release_args <nvme_resv_release_args>` argument structure |
| 5386 |
|
| 5387 |
**Return** |
| 5388 |
|
| 5389 |
The nvme command status if a response was received (see |
| 5390 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5391 |
|
| 5392 |
|
| 5393 |
.. c:function:: int nvme_resv_report (struct nvme_resv_report_args *args) |
| 5394 |
|
| 5395 |
Send an nvme reservation report |
| 5396 |
|
| 5397 |
**Parameters** |
| 5398 |
|
| 5399 |
``struct nvme_resv_report_args *args`` |
| 5400 |
struct nvme_resv_report_args argument structure |
| 5401 |
|
| 5402 |
**Description** |
| 5403 |
|
| 5404 |
Returns a Reservation Status data structure to memory that describes the |
| 5405 |
registration and reservation status of a namespace. See the definition for |
| 5406 |
the returned structure, :c:type:`struct nvme_reservation_status <nvme_reservation_status>`, for more details. |
| 5407 |
|
| 5408 |
**Return** |
| 5409 |
|
| 5410 |
The nvme command status if a response was received (see |
| 5411 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5412 |
|
| 5413 |
|
| 5414 |
.. c:function:: int nvme_io_mgmt_recv (struct nvme_io_mgmt_recv_args *args) |
| 5415 |
|
| 5416 |
I/O Management Receive command |
| 5417 |
|
| 5418 |
**Parameters** |
| 5419 |
|
| 5420 |
``struct nvme_io_mgmt_recv_args *args`` |
| 5421 |
:c:type:`struct nvme_io_mgmt_recv_args <nvme_io_mgmt_recv_args>` argument structure |
| 5422 |
|
| 5423 |
**Return** |
| 5424 |
|
| 5425 |
The nvme command status if a response was received (see |
| 5426 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5427 |
|
| 5428 |
|
| 5429 |
.. c:function:: int nvme_fdp_reclaim_unit_handle_status (int fd, __u32 nsid, __u32 data_len, void *data) |
| 5430 |
|
| 5431 |
Get reclaim unit handle status |
| 5432 |
|
| 5433 |
**Parameters** |
| 5434 |
|
| 5435 |
``int fd`` |
| 5436 |
File descriptor of nvme device |
| 5437 |
|
| 5438 |
``__u32 nsid`` |
| 5439 |
Namespace identifier |
| 5440 |
|
| 5441 |
``__u32 data_len`` |
| 5442 |
Length of response buffer |
| 5443 |
|
| 5444 |
``void *data`` |
| 5445 |
Response buffer |
| 5446 |
|
| 5447 |
**Return** |
| 5448 |
|
| 5449 |
The nvme command status if a response was received (see |
| 5450 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5451 |
|
| 5452 |
|
| 5453 |
.. c:function:: int nvme_io_mgmt_send (struct nvme_io_mgmt_send_args *args) |
| 5454 |
|
| 5455 |
I/O Management Send command |
| 5456 |
|
| 5457 |
**Parameters** |
| 5458 |
|
| 5459 |
``struct nvme_io_mgmt_send_args *args`` |
| 5460 |
:c:type:`struct nvme_io_mgmt_send_args <nvme_io_mgmt_send_args>` argument structure |
| 5461 |
|
| 5462 |
**Return** |
| 5463 |
|
| 5464 |
The nvme command status if a response was received (see |
| 5465 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5466 |
|
| 5467 |
|
| 5468 |
.. c:function:: int nvme_fdp_reclaim_unit_handle_update (int fd, __u32 nsid, unsigned int npids, __u16 *pids) |
| 5469 |
|
| 5470 |
Update a list of reclaim unit handles |
| 5471 |
|
| 5472 |
**Parameters** |
| 5473 |
|
| 5474 |
``int fd`` |
| 5475 |
File descriptor of nvme device |
| 5476 |
|
| 5477 |
``__u32 nsid`` |
| 5478 |
Namespace identifier |
| 5479 |
|
| 5480 |
``unsigned int npids`` |
| 5481 |
Number of placement identifiers |
| 5482 |
|
| 5483 |
``__u16 *pids`` |
| 5484 |
List of placement identifiers |
| 5485 |
|
| 5486 |
**Return** |
| 5487 |
|
| 5488 |
The nvme command status if a response was received (see |
| 5489 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5490 |
|
| 5491 |
|
| 5492 |
.. c:function:: int nvme_zns_mgmt_send (struct nvme_zns_mgmt_send_args *args) |
| 5493 |
|
| 5494 |
ZNS management send command |
| 5495 |
|
| 5496 |
**Parameters** |
| 5497 |
|
| 5498 |
``struct nvme_zns_mgmt_send_args *args`` |
| 5499 |
:c:type:`struct nvme_zns_mgmt_send_args <nvme_zns_mgmt_send_args>` argument structure |
| 5500 |
|
| 5501 |
**Return** |
| 5502 |
|
| 5503 |
The nvme command status if a response was received (see |
| 5504 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5505 |
|
| 5506 |
|
| 5507 |
.. c:function:: int nvme_zns_mgmt_recv (struct nvme_zns_mgmt_recv_args *args) |
| 5508 |
|
| 5509 |
ZNS management receive command |
| 5510 |
|
| 5511 |
**Parameters** |
| 5512 |
|
| 5513 |
``struct nvme_zns_mgmt_recv_args *args`` |
| 5514 |
:c:type:`struct nvme_zns_mgmt_recv_args <nvme_zns_mgmt_recv_args>` argument structure |
| 5515 |
|
| 5516 |
**Return** |
| 5517 |
|
| 5518 |
The nvme command status if a response was received (see |
| 5519 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5520 |
|
| 5521 |
|
| 5522 |
.. c:function:: int nvme_zns_report_zones (int fd, __u32 nsid, __u64 slba, enum nvme_zns_report_options opts, bool extended, bool partial, __u32 data_len, void *data, __u32 timeout, __u32 *result) |
| 5523 |
|
| 5524 |
Return the list of zones |
| 5525 |
|
| 5526 |
**Parameters** |
| 5527 |
|
| 5528 |
``int fd`` |
| 5529 |
File descriptor of nvme device |
| 5530 |
|
| 5531 |
``__u32 nsid`` |
| 5532 |
Namespace ID |
| 5533 |
|
| 5534 |
``__u64 slba`` |
| 5535 |
Starting LBA |
| 5536 |
|
| 5537 |
``enum nvme_zns_report_options opts`` |
| 5538 |
Reporting options |
| 5539 |
|
| 5540 |
``bool extended`` |
| 5541 |
Extended report |
| 5542 |
|
| 5543 |
``bool partial`` |
| 5544 |
Partial report requested |
| 5545 |
|
| 5546 |
``__u32 data_len`` |
| 5547 |
Length of the data buffer |
| 5548 |
|
| 5549 |
``void *data`` |
| 5550 |
Userspace address of the report zones data |
| 5551 |
|
| 5552 |
``__u32 timeout`` |
| 5553 |
timeout in ms |
| 5554 |
|
| 5555 |
``__u32 *result`` |
| 5556 |
The command completion result from CQE dword0 |
| 5557 |
|
| 5558 |
**Return** |
| 5559 |
|
| 5560 |
The nvme command status if a response was received (see |
| 5561 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5562 |
|
| 5563 |
|
| 5564 |
.. c:function:: int nvme_zns_append (struct nvme_zns_append_args *args) |
| 5565 |
|
| 5566 |
Append data to a zone |
| 5567 |
|
| 5568 |
**Parameters** |
| 5569 |
|
| 5570 |
``struct nvme_zns_append_args *args`` |
| 5571 |
:c:type:`struct nvme_zns_append_args <nvme_zns_append_args>` argument structure |
| 5572 |
|
| 5573 |
**Return** |
| 5574 |
|
| 5575 |
The nvme command status if a response was received (see |
| 5576 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5577 |
|
| 5578 |
|
| 5579 |
.. c:function:: int nvme_dim_send (struct nvme_dim_args *args) |
| 5580 |
|
| 5581 |
Send a Discovery Information Management (DIM) command |
| 5582 |
|
| 5583 |
**Parameters** |
| 5584 |
|
| 5585 |
``struct nvme_dim_args *args`` |
| 5586 |
:c:type:`struct nvme_dim_args <nvme_dim_args>` argument structure |
| 5587 |
|
| 5588 |
**Return** |
| 5589 |
|
| 5590 |
The nvme command status if a response was received (see |
| 5591 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5592 |
|
| 5593 |
|
| 5594 |
.. c:function:: int nvme_lm_cdq (struct nvme_lm_cdq_args *args) |
| 5595 |
|
| 5596 |
Controller Data Queue - Controller Data Queue command |
| 5597 |
|
| 5598 |
**Parameters** |
| 5599 |
|
| 5600 |
``struct nvme_lm_cdq_args *args`` |
| 5601 |
:c:type:`struct nvme_lm_cdq_args <nvme_lm_cdq_args>` argument structure |
| 5602 |
|
| 5603 |
**Return** |
| 5604 |
|
| 5605 |
The nvme command status if a response was received (see |
| 5606 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.) |
| 5607 |
|
| 5608 |
|
| 5609 |
.. c:function:: int nvme_lm_track_send (struct nvme_lm_track_send_args *args) |
| 5610 |
|
| 5611 |
Track Send command |
| 5612 |
|
| 5613 |
**Parameters** |
| 5614 |
|
| 5615 |
``struct nvme_lm_track_send_args *args`` |
| 5616 |
:c:type:`struct nvme_lm_track_send_args <nvme_lm_track_send_args>` argument structure |
| 5617 |
|
| 5618 |
**Return** |
| 5619 |
|
| 5620 |
The nvme command status if a response was received (see |
| 5621 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5622 |
|
| 5623 |
|
| 5624 |
.. c:function:: int nvme_lm_migration_send (struct nvme_lm_migration_send_args *args) |
| 5625 |
|
| 5626 |
Migration Send command |
| 5627 |
|
| 5628 |
**Parameters** |
| 5629 |
|
| 5630 |
``struct nvme_lm_migration_send_args *args`` |
| 5631 |
:c:type:`struct nvme_lm_migration_send_args <nvme_lm_migration_send_args>` argument structure |
| 5632 |
|
| 5633 |
**Return** |
| 5634 |
|
| 5635 |
The nvme command status if a response was received (see |
| 5636 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5637 |
|
| 5638 |
|
| 5639 |
.. c:function:: int nvme_lm_migration_recv (struct nvme_lm_migration_recv_args *args) |
| 5640 |
|
| 5641 |
Migration Receive command |
| 5642 |
|
| 5643 |
**Parameters** |
| 5644 |
|
| 5645 |
``struct nvme_lm_migration_recv_args *args`` |
| 5646 |
:c:type:`struct nvme_lm_migration_rev_args <nvme_lm_migration_rev_args>` argument structure |
| 5647 |
|
| 5648 |
**Return** |
| 5649 |
|
| 5650 |
The nvme command status if a response was received (see |
| 5651 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5652 |
|
| 5653 |
|
| 5654 |
.. c:function:: int nvme_lm_set_features_ctrl_data_queue (int fd, __u16 cdqid, __u32 hp, __u32 tpt, bool etpt, __u32 *result) |
| 5655 |
|
| 5656 |
Set Controller Datea Queue feature |
| 5657 |
|
| 5658 |
**Parameters** |
| 5659 |
|
| 5660 |
``int fd`` |
| 5661 |
File descriptor of nvme device |
| 5662 |
|
| 5663 |
``__u16 cdqid`` |
| 5664 |
Controller Data Queue ID (CDQID) |
| 5665 |
|
| 5666 |
``__u32 hp`` |
| 5667 |
Head Pointer |
| 5668 |
|
| 5669 |
``__u32 tpt`` |
| 5670 |
Tail Pointer Trigger |
| 5671 |
|
| 5672 |
``bool etpt`` |
| 5673 |
Enable Tail Pointer Trigger |
| 5674 |
|
| 5675 |
``__u32 *result`` |
| 5676 |
The command completions result from CQE dword0 |
| 5677 |
|
| 5678 |
**Return** |
| 5679 |
|
| 5680 |
The nvme command status if a response was received (see |
| 5681 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5682 |
|
| 5683 |
|
| 5684 |
.. c:function:: int nvme_lm_get_features_ctrl_data_queue (int fd, __u16 cdqid, struct nvme_lm_ctrl_data_queue_fid_data *data, __u32 *result) |
| 5685 |
|
| 5686 |
Get Controller Data Queue feature |
| 5687 |
|
| 5688 |
**Parameters** |
| 5689 |
|
| 5690 |
``int fd`` |
| 5691 |
File descriptor of nvme device |
| 5692 |
|
| 5693 |
``__u16 cdqid`` |
| 5694 |
Controller Data Queue ID (CDQID) |
| 5695 |
|
| 5696 |
``struct nvme_lm_ctrl_data_queue_fid_data *data`` |
| 5697 |
Get Controller Data Queue feature data |
| 5698 |
|
| 5699 |
``__u32 *result`` |
| 5700 |
The command completions result from CQE dword0 |
| 5701 |
|
| 5702 |
**Return** |
| 5703 |
|
| 5704 |
The nvme command status if a response was received (see |
| 5705 |
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. |
| 5706 |
|
| 5707 |
|