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