Skip to content

Commit

Permalink
linux: mark HPE Cray Cassini HSNs with subtype "Slingshot"
Browse files Browse the repository at this point in the history
Those are almost identical to Ethernet NICs.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Mar 9, 2023
1 parent c9ad835 commit 3615159
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/hwloc.doxy
Expand Up @@ -1536,6 +1536,7 @@ components when I/O discovery is enabled and supported.
<li>Network interfaces (::HWLOC_OBJ_OSDEV_NETWORK)
<ul>
<li><em>eth0</em>, <em>wlan0</em>, <em>ib0</em> (Linux component)</li>
<li><em>hsn0</em> with "Slingshot" subtype for HPE Cray HSNs (Linux component).</li>
</ul>
</li>
<li>OpenFabrics (InfiniBand, Omni-Path, usNIC, etc) HCAs (::HWLOC_OBJ_OSDEV_OPENFABRICS)
Expand Down Expand Up @@ -1812,6 +1813,7 @@ subtype <tt>Cluster</tt>, <tt>Module</tt>, <tt>Tile</tt>, <tt>Compute Unit</tt>,
<li>Co-processor: subtype <tt>OpenCL</tt>, <tt>LevelZero</tt>, <tt>CUDA</tt>, or <tt>VectorEngine</tt>.</li>
<li>GPU: subtype <tt>RSMI</tt> (AMD GPU) or <tt>NVML</tt> (NVIDIA GPU).</li>
<li>OpenFabrics: subtype <tt>BXI</tt> (Bull/Atos BXI HCA).</li>
<li>Network: subtype <tt>Slingshot</tt> (HPE Cray Slingshot Cassini HSN).</li>
<li>Storage: subtype <tt>Disk</tt>, <tt>Tape</tt>, or <tt>Removable Media Device</tt>.</li>
<li>Memory: <tt>NVM</tt> (non-volatile memory), <tt>SPM</tt> (specific-purpose memory), <tt>CXLMem</tt> (CXL volatile ou persistent memory).</li>
</ul>
Expand Down
9 changes: 9 additions & 0 deletions hwloc/topology-linux.c
Expand Up @@ -6198,6 +6198,15 @@ hwloc_linuxfs_net_class_fillinfos(int root_fd,
}
}
}
if (!strncmp(obj->name, "hsn", 3)) {
/* Cray Cassini HSN for Slingshot networks are Ethernet-based,
* named hsnX with a "cxi" (and "cxi_user") class.
*/
snprintf(path, sizeof(path), "%s/device/cxi", osdevpath);
if (!hwloc_access(path, R_OK|X_OK, root_fd)) {
obj->subtype = strdup("Slingshot");
}
}
}

static int
Expand Down

0 comments on commit 3615159

Please sign in to comment.