diff --git a/src/nvfs-pci.c b/src/nvfs-pci.c index 37c533d..247d0ba 100644 --- a/src/nvfs-pci.c +++ b/src/nvfs-pci.c @@ -346,7 +346,9 @@ static void __nvfs_find_all_device_paths(uint64_t paths[][MAX_PCI_DEPTH], if (idx == UINT_MAX) goto error; gpu_info_table[idx] = pdevinfo; - } else if (PCI_DEV_IB(class >> 8) || PCI_DEV_NVME(class)) { + } else if (PCI_DEV_IB(class >> 8) || + PCI_DEV_NVME(class) || + PCI_DEV_HF(class >> 8)) { idx = nvfs_create_peer_hash_entry(pdevinfo); if (idx == UINT_MAX) goto error; @@ -654,6 +656,9 @@ void nvfs_fill_gpu2peer_distance_table_once(void) { __nvfs_find_all_device_paths(peer_bdf_map, MAX_PEER_DEVS, PCI_CLASS_NETWORK_INFINIBAND << 8); __nvfs_find_all_device_paths(peer_bdf_map, MAX_PEER_DEVS, PCI_CLASS_NETWORK_ETHERNET << 8); + nvfs_dbg("nvfs listing other host fabric controller (vendor specific) paths:\n"); + __nvfs_find_all_device_paths(peer_bdf_map, MAX_PEER_DEVS, PCI_CLASS_NETWORK_HOST_FABRIC << 8); + nvfs_dbg("nvfs listing NVME paths:\n"); __nvfs_find_all_device_paths(peer_bdf_map, MAX_PEER_DEVS, PCI_CLASS_STORAGE_EXPRESS); diff --git a/src/nvfs-pci.h b/src/nvfs-pci.h index 13eeb99..ffcb266 100644 --- a/src/nvfs-pci.h +++ b/src/nvfs-pci.h @@ -59,6 +59,8 @@ // device classes probed by nvidia-fs for generating pci-distance matrix #define PCI_CLASS_NETWORK_INFINIBAND 0x207 +#define PCI_CLASS_NETWORK_HOST_FABRIC 0x208 + #define PCI_DEV_GPU(class, vendor) \ (((vendor) == PCI_VENDOR_ID_NVIDIA) && \ (((class) == PCI_CLASS_DISPLAY_VGA) || \ @@ -68,6 +70,9 @@ ((((class) == PCI_CLASS_NETWORK_ETHERNET) || \ (((class) == PCI_CLASS_NETWORK_INFINIBAND)))) +#define PCI_DEV_HF(class) \ + ((class) == PCI_CLASS_NETWORK_HOST_FABRIC) + #define PCI_DEV_NVME(class) \ ((class) == PCI_CLASS_STORAGE_EXPRESS) @@ -128,7 +133,7 @@ static inline bool nvfs_pdevinfo_get_acs(uint64_t pdevinfo) { // embed class info to pdevinfo static inline void nvfs_pdevinfo_set_class(uint64_t *pdevinfo, unsigned int dev_class) { - if (PCI_DEV_IB(dev_class >> 8)) + if (PCI_DEV_IB(dev_class >> 8) || PCI_DEV_HF(dev_class >> 8)) *pdevinfo |= (1ULL << NVFS_PDEVINFO_NET_CHECK_BIT); else if (PCI_DEV_NVME(dev_class)) *pdevinfo |= (1ULL << NVFS_PDEVINFO_NVME_CHECK_BIT);