|
21 | 21 | * NVMe standard definitions |
22 | 22 | */ |
23 | 23 |
|
| 24 | +#define NVME_UUID_LEN 16 |
| 25 | +#define NVME_UUID_LEN_STRING 37 /* 1b4e28ba-2fa1-11d2-883f-0016d3cca427 + \0 */ |
| 26 | + |
24 | 27 | /** |
25 | 28 | * NVME_GET() - extract field from complex value |
26 | 29 | * @value: The original value of a complex field |
@@ -6005,6 +6008,75 @@ enum nvme_apst_entry { |
6005 | 6008 | NVME_APST_ENTRY_ITPT_MASK = 0xffffff, |
6006 | 6009 | }; |
6007 | 6010 |
|
| 6011 | +/** |
| 6012 | + * struct nvme_std_perf_attr - Standard performance attribute structure |
| 6013 | + * @rsvd0: Reserved |
| 6014 | + * @r4karl: Random 4 KiB average read latency |
| 6015 | + * @rsvd5: Reserved |
| 6016 | + */ |
| 6017 | +struct nvme_std_perf_attr { |
| 6018 | + __u8 rsvd0[4]; |
| 6019 | + __u8 r4karl; |
| 6020 | + __u8 rsvd5[4091]; |
| 6021 | +}; |
| 6022 | + |
| 6023 | +/** |
| 6024 | + * struct nvme_perf_attr_id - Performance attribute identifier structure |
| 6025 | + * @id: Performance attribute identifier |
| 6026 | + */ |
| 6027 | +struct nvme_perf_attr_id { |
| 6028 | + __u8 id[NVME_UUID_LEN]; |
| 6029 | +}; |
| 6030 | + |
| 6031 | +/** |
| 6032 | + * struct nvme_perf_attr_id_list - Performance attribute identifier list structure |
| 6033 | + * @attrtyp: Bits 7-3: Reserved |
| 6034 | + * Bits 2-0: Attribute type |
| 6035 | + * @msvspa: Maximum saveable vendor specific performance attributes |
| 6036 | + * @usvspa: Unused saveable vendor specific performance attributes |
| 6037 | + * @rsvd3: Reserved |
| 6038 | + * @id_list: Performance attribute identifier list |
| 6039 | + * @rsvd1024: Reserved |
| 6040 | + */ |
| 6041 | +struct nvme_perf_attr_id_list { |
| 6042 | + __u8 attrtyp; |
| 6043 | + __u8 msvspa; |
| 6044 | + __u8 usvspa; |
| 6045 | + __u8 rsvd3[13]; |
| 6046 | + struct nvme_perf_attr_id id_list[63]; |
| 6047 | + __u8 rsvd1024[3072]; |
| 6048 | +}; |
| 6049 | + |
| 6050 | +/** |
| 6051 | + * struct nvme_vs_perf_attr - Vendor specific performance attribute structure |
| 6052 | + * @paid: Performance attribute identifier |
| 6053 | + * @rsvd16: Reserved |
| 6054 | + * @attrl: Attribute Length |
| 6055 | + * @vs: Vendor specific |
| 6056 | + */ |
| 6057 | +struct nvme_vs_perf_attr { |
| 6058 | + __u8 paid[16]; |
| 6059 | + __u8 rsvd16[14]; |
| 6060 | + __le16 attrl; |
| 6061 | + __u8 vs[4064]; |
| 6062 | +}; |
| 6063 | + |
| 6064 | +/** |
| 6065 | + * struct nvme_perf_characteristics - Performance attribute structure |
| 6066 | + * @std_perf: Standard performance attribute |
| 6067 | + * @id_list: Performance attribute identifier list |
| 6068 | + * @vs_perf: Vendor specific performance attribute |
| 6069 | + * @attr_buf: Attribute buffer |
| 6070 | + */ |
| 6071 | +struct nvme_perf_characteristics { |
| 6072 | + union { |
| 6073 | + struct nvme_std_perf_attr std_perf[0]; |
| 6074 | + struct nvme_perf_attr_id_list id_list[0]; |
| 6075 | + struct nvme_vs_perf_attr vs_perf[0]; |
| 6076 | + __u8 attr_buf[4096]; |
| 6077 | + }; |
| 6078 | +}; |
| 6079 | + |
6008 | 6080 | /** |
6009 | 6081 | * struct nvme_metadata_element_desc - Metadata Element Descriptor |
6010 | 6082 | * @type: Element Type (ET) |
|
0 commit comments