diff options
Diffstat (limited to 'src/nvme/nbft.h')
-rw-r--r-- | src/nvme/nbft.h | 110 |
1 files changed, 62 insertions, 48 deletions
diff --git a/src/nvme/nbft.h b/src/nvme/nbft.h index 6012e16..a9eaf6f 100644 --- a/src/nvme/nbft.h +++ b/src/nvme/nbft.h @@ -12,6 +12,14 @@ #include <sys/types.h> #include "util.h" +/** + * DOC: nbft.h + * + * NVM Express Boot Specification, Revision 1.0 + * + * Note: this API is currently unstable, subject to further additions. + */ + /* * ACPI NBFT table structures (TP8012 Boot Specification rev. 1.0) */ @@ -994,17 +1002,17 @@ enum nbft_discovery_flags { /** * enum nbft_info_primary_admin_host_flag - Primary Administrative Host Descriptor Flags * @NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_NOT_INDICATED: Not Indicated by Driver: The driver - * that created this NBFT provided no - * administrative priority hint for - * this NBFT. + * that created this NBFT provided no + * administrative priority hint for + * this NBFT. * @NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_UNSELECTED: Unselected: The driver that created - * this NBFT explicitly indicated that - * this NBFT should not be prioritized - * over any other NBFT. + * this NBFT explicitly indicated that + * this NBFT should not be prioritized + * over any other NBFT. * @NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_SELECTED: Selected: The driver that created - * this NBFT explicitly indicated that - * this NBFT should be prioritized over - * any other NBFT. + * this NBFT explicitly indicated that + * this NBFT should be prioritized over + * any other NBFT. * @NBFT_INFO_PRIMARY_ADMIN_HOST_FLAG_RESERVED: Reserved. */ enum nbft_info_primary_admin_host_flag { @@ -1019,13 +1027,13 @@ enum nbft_info_primary_admin_host_flag { * @id: Host ID (raw UUID, length = 16 bytes). * @nqn: Host NQN. * @host_id_configured: HostID Configured Flag: value of True indicates that @id - * contains administratively-configured value, or driver - * default value if False. + * contains administratively-configured value, or driver + * default value if False. * @host_nqn_configured: Host NQN Configured Flag: value of True indicates that - * @nqn contains administratively-configured value, - * or driver default value if False. + * @nqn contains administratively-configured value, + * or driver default value if False. * @primary: Primary Administrative Host Descriptor, see - * &enum nbft_info_primary_admin_host_flag. + * &enum nbft_info_primary_admin_host_flag. */ struct nbft_info_host { unsigned char *id; @@ -1039,34 +1047,34 @@ struct nbft_info_host { * struct nbft_info_hfi_info_tcp - HFI Transport Info Descriptor - NVMe/TCP * @pci_sbdf: PCI Express Routing ID for the HFI Transport Function. * @mac_addr: MAC Address: The MAC address of this HFI, - * in EUI-48TM format. + * in EUI-48TM format. * @vlan: The VLAN identifier if the VLAN is associated with - * this HFI, as defined in IEEE 802.1q-2018 or zeroes - * if no VLAN is associated with this HFI. + * this HFI, as defined in IEEE 802.1q-2018 or zeroes + * if no VLAN is associated with this HFI. * @ip_origin: The source of Ethernet L3 configuration information - * used by the driver or 0 if not used. + * used by the driver or 0 if not used. * @ipaddr: The IPv4 or IPv6 address of this HFI. * @subnet_mask_prefix: The IPv4 or IPv6 subnet mask in CIDR routing prefix - * notation. + * notation. * @gateway_ipaddr: The IPv4 or IPv6 address of the IP gateway for this - * HFI or zeroes if no IP gateway is specified. + * HFI or zeroes if no IP gateway is specified. * @route_metric: The cost value for the route indicated by this HFI. * @primary_dns_ipaddr: The IPv4 or IPv6 address of the Primary DNS server - * for this HFI. + * for this HFI. * @secondary_dns_ipaddr: The IPv4 or IPv6 address of the Secondary DNS server - * for this HFI. + * for this HFI. * @dhcp_server_ipaddr: The IPv4 or IPv6 address of the DHCP server used - * to assign this HFI address. + * to assign this HFI address. * @host_name: The Host Name string. * @this_hfi_is_default_route: If True, then the BIOS utilized this interface - * described by HFI to be the default route with highest - * priority. If False, then routes are local to their - * own scope. + * described by HFI to be the default route with highest + * priority. If False, then routes are local to their + * own scope. * @dhcp_override: If True, then HFI information was populated - * by consuming the DHCP on this interface. If False, - * then the HFI information was set administratively - * by a configuration interface to the driver and - * pre-OS envrionment. + * by consuming the DHCP on this interface. If False, + * then the HFI information was set administratively + * by a configuration interface to the driver and + * pre-OS envrionment. */ struct nbft_info_hfi_info_tcp { __u32 pci_sbdf; @@ -1088,7 +1096,7 @@ struct nbft_info_hfi_info_tcp { /** * struct nbft_info_hfi - Host Fabric Interface (HFI) Descriptor * @index: HFI Descriptor Index: indicates the number of this HFI Descriptor - * in the Host Fabric Interface Descriptor List. + * in the Host Fabric Interface Descriptor List. * @transport: Transport Type string (e.g. 'tcp'). * @tcp_info: The HFI Transport Info Descriptor, see &struct nbft_info_hfi_info_tcp. */ @@ -1101,12 +1109,12 @@ struct nbft_info_hfi { /** * struct nbft_info_discovery - Discovery Descriptor * @index: The number of this Discovery Descriptor in the Discovery - * Descriptor List. + * Descriptor List. * @security: The Security Profile Descriptor, see &struct nbft_info_security. * @hfi: The HFI Descriptor associated with this Discovery Descriptor. - * See &struct nbft_info_hfi. + * See &struct nbft_info_hfi. * @uri: A URI which indicates an NVMe Discovery controller associated - * with this Discovery Descriptor. + * with this Discovery Descriptor. * @nqn: An NVMe Discovery controller NQN. */ struct nbft_info_discovery { @@ -1120,7 +1128,7 @@ struct nbft_info_discovery { /** * struct nbft_info_security - Security Profile Descriptor * @index: The number of this Security Profile Descriptor in the Security - * Profile Descriptor List. + * Profile Descriptor List. */ struct nbft_info_security { int index; @@ -1143,35 +1151,39 @@ enum nbft_info_nid_type { /** * struct nbft_info_subsystem_ns - Subsystem Namespace (SSNS) info - * @index: SSNS Descriptor Index in the descriptor list. + * @index: SSNS Descriptor Index in the descriptor list. * @discovery: Primary Discovery Controller associated with - * this SSNS Descriptor. + * this SSNS Descriptor. * @security: Security Profile Descriptor associated with - * this namespace. + * this namespace. * @num_hfis: Number of HFIs. * @hfis: List of HFIs associated with this namespace. - * Includes the primary HFI at the first position - * and all secondary HFIs. This array is null-terminated. + * Includes the primary HFI at the first position + * and all secondary HFIs. This array is null-terminated. * @transport: Transport Type string (e.g. 'tcp'). * @traddr: Subsystem Transport Address. * @trsvcid: Subsystem Transport Service Identifier. * @subsys_port_id: The Subsystem Port ID. * @nsid: The Namespace ID of this descriptor or when @nid - * should be used instead. + * should be used instead. * @nid_type: Namespace Identifier Type, see &enum nbft_info_nid_type. * @nid: The Namespace Identifier value. * @subsys_nqn: Subsystem and Namespace NQN. * @pdu_header_digest_required: PDU Header Digest (HDGST) Flag: the use of NVM Header - * Digest Enabled is required. - * @data_digest_required: Data Digest (DDGST) Flag: the use of NVM Data Digest - * Enabled is required. + * Digest Enabled is required. + * @data_digest_required: Data Digest (DDGST) Flag: the use of NVM Data Digest + * Enabled is required. * @controller_id: Controller ID (SSNS Extended Information Descriptor): - * The controller ID associated with the Admin Queue - * or 0 if not supported. + * The controller ID associated with the Admin Queue + * or 0 if not supported. * @asqsz: Admin Submission Queue Size (SSNS Extended Information - * Descriptor) or 0 if not supported. + * Descriptor) or 0 if not supported. * @dhcp_root_path_string: DHCP Root Path Override string (SSNS Extended - * Information Descriptor). + * Information Descriptor). + * @discovered: Indicates that this namespace was acquired + * through discovery. + * @unavailable: Namespace is unavailable as indicated by + * the pre-OS driver. */ struct nbft_info_subsystem_ns { int index; @@ -1192,6 +1204,8 @@ struct nbft_info_subsystem_ns { int controller_id; int asqsz; char *dhcp_root_path_string; + bool discovered; + bool unavailable; }; /** |