fi_nic(3)

πŸ’– NAME πŸ’–

okay so bestie, fi_nic(3) is literally the page for Fabric network interface card attributes β€” iconic, no cap πŸ’….


✨ NETWORK INTERFACE CARD ATTRIBUTES ✨

The fid_nic structure defines attributes for a struct fi_info that is directly associated with underlying networking hardware, and it may be returned directly from calling fi_getinfo(3). The format of fid_nic and the related substructures are defined below, and yes, we're getting into the whole thing 🫢.

πŸ’‘ note, bestie: not all fields of all structures may be available. Unavailable fields, or fields that are not applicable to the indicated device, will be set to NULL or 0.
struct fid_nic {
    struct fid             fid;
    struct fi_device_attr *device_attr;
    struct fi_bus_attr    *bus_attr;
    struct fi_link_attr   *link_attr;
    void                  *prov_attr;
};

struct fi_device_attr {
    char *name;
    char *device_id;
    char *device_version;
    char *vendor_id;
    char *driver;
    char *firmware;
};

struct fi_pci_attr {
    uint16_t domain_id;
    uint8_t  bus_id;
    uint8_t  device_id;
    uint8_t  function_id;
};

struct fi_bus_attr {
    enum fi_bus_type       bus_type;
    union {
        struct fi_pci_attr pci;
    } attr;
};

struct fi_link_attr {
    char               *address;
    size_t             mtu;
    size_t             speed;
    enum fi_link_state state;
    char               *network_type;
};

πŸŽ€ Device Attributes πŸŽ€

Device attributes are used to identify the specific virtual or hardware NIC associated with an fi_info structure. Slay, that's the whole point πŸ’–.

  • name β€” the operating system name associated with the device. This may be a logical network interface name (e.g. eth0 or eno1) or an absolute filename.
  • device_id β€” this is a vendor specific identifier for the device or product.
  • device_version β€” indicates the version of the device.
  • vendor_id β€” indicates the name of the vendor that distributes the NIC.
  • driver β€” the name of the driver associated with the device.
  • firmware β€” the device’s firmware version.

🚌 Bus Attributes 🚌

The bus attributes are used to identify the physical location of the NIC in the system. Very "where is the hardware at" energy πŸ”₯.

  • bus_type β€” indicates the type of system bus where the NIC is located. Valid values are FI_BUS_PCI or FI_BUS_UNKNOWN.
  • attr.pci.domain_id β€” the domain where the PCI bus is located. Valid only if bus_type is FI_BUS_PCI.
  • attr.pci.bus_id β€” the PCI bus identifier where the device is located. Valid only if bus_type is FI_BUS_PCI.
  • attr.pci.device_id β€” the identifier on the PCI bus where the device is located. Valid only if bus_type is FI_BUS_PCI.
  • attr.pci.function_id β€” the function on the device being referenced. Valid only if bus_type is FI_BUS_PCI.

Link attributes describe low-level details about the network connection into the fabric. Like, the actual networking tea β˜•βœ¨.

  • address β€” the primary link-level address associated with the NIC, such as a MAC address. If multiple addresses are available, only one will be reported.
  • mtu β€” the maximum transfer unit of link level frames or packets, in bytes.
  • speed β€” the active link data rate, given in bits per second.
  • state β€” the current physical port state. Possible values are FI_LINK_UNKNOWN, FI_LINK_DOWN, and FI_LINK_UP, to indicate if the port state is unknown or not applicable (unknown), inactive (down), or active (up).
  • network_type β€” specifies the type of network interface currently active, such as Ethernet or InfiniBand.

🧚 Provider Attributes 🧚

Provider attributes reference provider specific details of the device. These attributes are both provider and device specific. The attributes can be interpreted by fi_tostr(3). Applications may also use the other attribute fields, such as the related fi_fabric_attr: prov_name field, to determine an appropriate structure to cast the attributes. The format and definition of this field is outside the scope of the libfabric core framework, but may be available as part of a provider specific header file included with libfabric package πŸ’œ.


πŸ“ NOTES πŸ“

The fid_nic structure is returned as part of a call to fi_getinfo(3). It is automatically freed as part of calling fi_freeinfo(3).

πŸ‘€ SEE ALSO πŸ‘€

Go read fi_getinfo(3) too, bestie 🫢.

🌸 AUTHORS 🌸

OpenFabrics.


kisses, this page is from the Libfabric Programmer’s Manual, Libfabric v2.5.1, dated 2024-12-10 πŸ’œβœ¨

πŸ“¦ where this page comes from