~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/nvme_ioctl.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*
  3  * Definitions for the NVM Express ioctl interface
  4  * Copyright (c) 2011-2014, Intel Corporation.
  5  */
  6 
  7 #ifndef _UAPI_LINUX_NVME_IOCTL_H
  8 #define _UAPI_LINUX_NVME_IOCTL_H
  9 
 10 #include <linux/types.h>
 11 
 12 struct nvme_user_io {
 13         __u8    opcode;
 14         __u8    flags;
 15         __u16   control;
 16         __u16   nblocks;
 17         __u16   rsvd;
 18         __u64   metadata;
 19         __u64   addr;
 20         __u64   slba;
 21         __u32   dsmgmt;
 22         __u32   reftag;
 23         __u16   apptag;
 24         __u16   appmask;
 25 };
 26 
 27 struct nvme_passthru_cmd {
 28         __u8    opcode;
 29         __u8    flags;
 30         __u16   rsvd1;
 31         __u32   nsid;
 32         __u32   cdw2;
 33         __u32   cdw3;
 34         __u64   metadata;
 35         __u64   addr;
 36         __u32   metadata_len;
 37         __u32   data_len;
 38         __u32   cdw10;
 39         __u32   cdw11;
 40         __u32   cdw12;
 41         __u32   cdw13;
 42         __u32   cdw14;
 43         __u32   cdw15;
 44         __u32   timeout_ms;
 45         __u32   result;
 46 };
 47 
 48 struct nvme_passthru_cmd64 {
 49         __u8    opcode;
 50         __u8    flags;
 51         __u16   rsvd1;
 52         __u32   nsid;
 53         __u32   cdw2;
 54         __u32   cdw3;
 55         __u64   metadata;
 56         __u64   addr;
 57         __u32   metadata_len;
 58         union {
 59                 __u32   data_len; /* for non-vectored io */
 60                 __u32   vec_cnt; /* for vectored io */
 61         };
 62         __u32   cdw10;
 63         __u32   cdw11;
 64         __u32   cdw12;
 65         __u32   cdw13;
 66         __u32   cdw14;
 67         __u32   cdw15;
 68         __u32   timeout_ms;
 69         __u32   rsvd2;
 70         __u64   result;
 71 };
 72 
 73 /* same as struct nvme_passthru_cmd64, minus the 8b result field */
 74 struct nvme_uring_cmd {
 75         __u8    opcode;
 76         __u8    flags;
 77         __u16   rsvd1;
 78         __u32   nsid;
 79         __u32   cdw2;
 80         __u32   cdw3;
 81         __u64   metadata;
 82         __u64   addr;
 83         __u32   metadata_len;
 84         __u32   data_len;
 85         __u32   cdw10;
 86         __u32   cdw11;
 87         __u32   cdw12;
 88         __u32   cdw13;
 89         __u32   cdw14;
 90         __u32   cdw15;
 91         __u32   timeout_ms;
 92         __u32   rsvd2;
 93 };
 94 
 95 #define nvme_admin_cmd nvme_passthru_cmd
 96 
 97 #define NVME_IOCTL_ID           _IO('N', 0x40)
 98 #define NVME_IOCTL_ADMIN_CMD    _IOWR('N', 0x41, struct nvme_admin_cmd)
 99 #define NVME_IOCTL_SUBMIT_IO    _IOW('N', 0x42, struct nvme_user_io)
100 #define NVME_IOCTL_IO_CMD       _IOWR('N', 0x43, struct nvme_passthru_cmd)
101 #define NVME_IOCTL_RESET        _IO('N', 0x44)
102 #define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)
103 #define NVME_IOCTL_RESCAN       _IO('N', 0x46)
104 #define NVME_IOCTL_ADMIN64_CMD  _IOWR('N', 0x47, struct nvme_passthru_cmd64)
105 #define NVME_IOCTL_IO64_CMD     _IOWR('N', 0x48, struct nvme_passthru_cmd64)
106 #define NVME_IOCTL_IO64_CMD_VEC _IOWR('N', 0x49, struct nvme_passthru_cmd64)
107 
108 /* io_uring async commands: */
109 #define NVME_URING_CMD_IO       _IOWR('N', 0x80, struct nvme_uring_cmd)
110 #define NVME_URING_CMD_IO_VEC   _IOWR('N', 0x81, struct nvme_uring_cmd)
111 #define NVME_URING_CMD_ADMIN    _IOWR('N', 0x82, struct nvme_uring_cmd)
112 #define NVME_URING_CMD_ADMIN_VEC _IOWR('N', 0x83, struct nvme_uring_cmd)
113 
114 #endif /* _UAPI_LINUX_NVME_IOCTL_H */
115 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php