libnvme(2)
π libnvme β libnvme(2), the API manual, bestie edition π
okay so we're deep in the API manual today and the main character is struct nbft_hfi_info_tcp β the HFI Transport Info Descriptor for NVMe/TCP (Figure 13, she's numbered, she's iconic). grab a strawberry drink π and let's get into it.
β¨ NAME β¨
struct nbft_hfi_info_tcp β the HFI Transport Info Descriptor for NVMe/TCP, aka Figure 13. that's her. that's the whole vibe. π«Ά
π SYNOPSIS π
struct nbft_hfi_info_tcp {
__u8 structure_id;
__u8 version;
__u8 trtype;
__u8 trinfo_version;
__le16 hfi_index;
__u8 flags;
__le32 pci_sbdf;
__u8 mac_addr[6];
__le16 vlan;
__u8 ip_origin;
__u8 ip_address[16];
__u8 subnet_mask_prefix;
__u8 ip_gateway[16];
__u8 reserved1;
__le16 route_metric;
__u8 primary_dns[16];
__u8 secondary_dns[16];
__u8 dhcp_server[16];
struct nbft_heap_obj host_name_obj;
__u8 reserved2[18];
};
look at her. so many fields. so much lore. no cap. π
π Members π
π« structure_id
Structure ID. this one shall be set to 7h β that's HFI Transport Info, aka #NBFT_DESC_HFI_TRINFO. like, it literally tells you what she is. periodt.
π« version
Version. shall be set to 1h. yes queen, stay consistent.
π« trtype
HFI Transport Type β go peek at enum nbft_trtype. this field shall be set to 03h, which means NVMe/TCP, aka #NBFT_TRTYPE_TCP. it's giving transport. π¦
π« trinfo_version
Transport Info Version. if your implementation is compliant with this specification, you shall set this to 1h. no freelancing, bestie.
π« hfi_index
HFI Descriptor Index. this holds the value of the HFI Descriptor Index field of the HFI Descriptor (check struct nbft_hfi.index) whose HFI Transport Info Descriptor Heap Object Reference field points at this HFI Transport Info Descriptor. yes, it's a whole chain of pointing. iykyk. π₯
π« flags
HFI Transport Flags β see enum nbft_hfi_info_tcp_flags for the full menu. πΈ
π« pci_sbdf
PCI Express Routing ID for the HFI Transport Function. this field indicates the PCI Express Routing ID exactly as specified in the PCI Express Base Specification. no notes, it's a standard. β
π« mac_addr
MAC Address. the MAC address of this HFI, in EUI-48TM format, as defined in the IEEE Guidelines for Use of Extended Unique Identifiers. heads up: this field shall be set to a non-zero value. zero is not the moment. π
π« vlan
VLAN. if this field is set to a non-zero value, then it contains the VLAN identifier of the VLAN associated with this HFI, as defined in IEEE 802.1q-2018. if no VLAN is associated with this HFI, then this field shall be cleared to 0h. simple as that.
π« ip_origin
IP Origin. if this field is non-zero, it indicates the source of the Ethernet L3 configuration information that the driver uses for this interface. the valid values are defined in the Win 32 API: NL_PREFIX_ORIGIN enumeration specification. if the driver doesn't use IP Origin, this field should be cleared to 0h. π§
π« ip_address
IP Address. this field indicates the IPv4 or IPv6 address of this HFI. and β important β this field shall be set to a non-zero value. π
π« subnet_mask_prefix
Subnet Mask Prefix. this one indicates the IPv4 or IPv6 subnet mask, written in CIDR routing prefix notation. math but make it networking. β¨
π« ip_gateway
IP Gateway. if this field is non-zero, it holds the IPv4 or IPv6 address of the IP gateway for this HFI. if it's cleared to 0h, then no IP gateway is specified. that's it, that's the rule.
π« reserved1
Reserved. don't touch, she's resting. π
π« route_metric
Route Metric. if this field is non-zero, it indicates the cost value for the route indicated by this HF. this is the value the pre-OS driver uses when choosing among all available routes. lower values = higher priority, so keep that in mind. refer to IETF RFC 4249.
okay and the defaults: if the pre-OS driver supports routing but didn't configure a specific route metric for this interface, it should set this value to500. if the pre-OS driver doesn't support routing at all, then this field should be cleared to0h.
π« primary_dns
Primary DNS. if this field is non-zero, it indicates the IPv4 or IPv6 address of the Primary DNS server for this HFI, if any, from byte offset 0h of the NBFT Table Header. if it's cleared to 0h, then no Primary DNS is specified. π
π« secondary_dns
Secondary DNS. if this field is non-zero, it indicates the IPv4 or IPv6 address of the Secondary DNS server for this HFI, if any, from byte offset 0h of the NBFT Table Header. if it's cleared to 0h, then no Secondary DNS is specified. the sequel, basically. π
π« dhcp_server
DHCP Server. if the DHCP Override bit is set to 1h, then this field indicates the IPv4 or IPv6 address of the DHCP server that was used to assign this HFI address. if that bit is cleared to 0h, then this field is reserved. so it depends on the bit, bestie. keep up. π
π« host_name_obj
Host Name Heap Object Reference. if this field is non-zero, it indicates the location and size of a heap object that contains a Host Name string. cute little pointer moment. π¦
π« reserved2
Reserved. also resting. let her sleep. π
and that's the whole descriptor, no skips, no crumbs left. π
written up by the libnvme crew,struct nbft_hfi_info_tcp,libnvme(2), dated July 2026 β mwah, sending this one straight to the group chat. slay, bye. πβ¨
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms