Documentation ¶
Index ¶
- func GetDeviceAlias(device string) (string, error)
- func GetDeviceNames() ([]string, error)
- func GetSupportedProviders() []string
- func SetLogger(l logger)
- func ValidateNUMAConfig(device string, numaNode uint) error
- func ValidateNUMAStub(device string, numaNode uint) error
- func ValidateProviderConfig(device string, provider string) error
- func ValidateProviderStub(device string, provider string) error
- type DeviceAffinity
- type DeviceScan
- type FabricScan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDeviceAlias ¶
GetDeviceAlias is a wrapper for getDeviceAliasWithSystemList. This interface specifies an empty additionalSystemDevices list which allows for the default behavior we want for normal use. Test functions can call getDeviceAliasWithSystemList() directly and specify an arbitrary additionalSystemDevice list as necessary.
func GetDeviceNames ¶
GetDeviceNames examines the network interfaces and returns a []string identifying them by name
func GetSupportedProviders ¶
func GetSupportedProviders() []string
GetSupportedProviders returns a []string containing all supported Mercury providers
func ValidateNUMAConfig ¶
ValidateNUMAConfig confirms that the given network device matches the NUMA ID given.
func ValidateNUMAStub ¶
ValidateNUMAStub is used for most unit testing to replace ValidateNUMAConfig because the network configuration validation depends upon physical hardware resources and configuration on the target machine that are either not known or static in the test environment
func ValidateProviderConfig ¶
ValidateProviderConfig confirms that the given network device supports the chosen provider
func ValidateProviderStub ¶
ValidateProviderStub is used for most unit testing to replace ValidateProviderConfig because the network configuration validation depends upon physical hardware resources and configuration on the target machine that are either not known or static in the test environment
Types ¶
type DeviceAffinity ¶
DeviceAffinity describes the essential details of a device and its NUMA affinity
func GetAffinityForDevice ¶
func GetAffinityForDevice(deviceScanCfg DeviceScan) (DeviceAffinity, error)
GetAffinityForDevice searches the system topology reported by hwloc for the device specified by netDeviceName and returns the corresponding name, cpuset, nodeset, and NUMA node ID information.
Call initDeviceScan() to initialize the hwloc library and then set the deviceScanCfg.targetDevice to a network device name prior to calling this function.
The input deviceScanCfg netDeviceName string specifies a network device to search for. Typical network device names are "eth0", "eth1", "ib0", etc. The name may also be a virtual network device name such as "hfi1_0" or a decorated virtual network device name such as "hfi1_0-dgram". These virtual network devices are valid hwloc device names, and are used by libfabric, but they are not valid network device names for libraries such as CART. CART requires one of the system device names. Therefore, virtual device names are converted to system device names when it can be determined.
The DeviceAffinity NUMANode describes the logical NUMA node that this device is closest to. Note that, if administrator cgroup settings exclude any NUMA Node resources that cover the particular network device, then the NUMA node ID may be inaccurate.
func GetAffinityForNetworkDevices ¶
func GetAffinityForNetworkDevices(deviceNames []string) ([]DeviceAffinity, error)
GetAffinityForNetworkDevices searches the system topology reported by hwloc for the devices specified by deviceNames and returns the corresponding name, cpuset, nodeset and NUMA node information for each device it finds.
The input deviceNames []string specifies names of each network device to search for. Typical network device names are "eth0", "eth1", "ib0", etc.
The DeviceAffinity DeviceName matches the deviceNames strings and should be used to help match an input device with the output.
Network device names that are not found in the topology are ignored. The order of network devices in the return string depends on the natural order in the system topology and does not depend on the order specified by the input string.
func (*DeviceAffinity) String ¶
func (da *DeviceAffinity) String() string
type DeviceScan ¶
type DeviceScan struct {
// contains filtered or unexported fields
}
DeviceScan caches initialization data for later hwloc usage
type FabricScan ¶
FabricScan data encapsulates the results of the fabric scanning
func ScanFabric ¶
func ScanFabric(provider string) ([]FabricScan, error)
ScanFabric examines libfabric data to find the network devices that support the given fabric provider.
func (FabricScan) String ¶
func (fs FabricScan) String() string