Documentation
¶
Index ¶
- Constants
- Variables
- func GetDockerContainerRdmaStats(containerID string)
- func GetPorts(rdmaDeviceName string) []string
- func GetRdmaCharDevices(rdmaDeviceName string) []string
- func GetRdmaDeviceForNetdevice(netdevName string) (string, error)
- func GetRdmaDeviceList() []string
- func GetRdmaDevicesForAuxdev(deviceID string) []string
- func GetRdmaDevicesForPcidev(pcidevName string) []string
- func IsRDmaDeviceForNetdevice(netdevName string) bool
- type RdmaPortStats
- type RdmaStatEntry
- type RdmaStats
Constants ¶
const ( RdmaClassName = "infiniband" RdmaUcmFilePrefix = "ucm" RdmaIssmFilePrefix = "issm" RdmaUmadFilxPrefix = "umad" RdmaUverbsFilxPrefix = "uverbs" RdmaGidAttrDir = "gid_attrs" //nolint:revive RdmaGidAttrNdevDir = "ndevs" //nolint:revive RdmaPortsdir = "ports" RdmaNodeGuidFile = "node_guid" //nolint:revive RdmaCountersDir = "counters" RdmaHwCountersDir = "hw_counters" ReadOnlyPermissions = 0444 )
Variables ¶
var ( RdmaClassDir = "/sys/class/infiniband" RdmaIbUcmDir = "/sys/class/infiniband_cm" RdmaUmadDir = "/sys/class/infiniband_mad" RdmaUverbsDir = "/sys/class/infiniband_verbs" RdmaUcmDevice = "/dev/infiniband/rdma_cm" RdmaDeviceDir = "/dev/infiniband" PciDevDir = "/sys/bus/pci/devices" AuxDevDir = "/sys/bus/auxiliary/devices" )
Functions ¶
func GetDockerContainerRdmaStats ¶
func GetDockerContainerRdmaStats(containerID string)
Get RDMA statistics of a docker container. containerID is prefixed matched against the running docker containers, so a non ambiguous short identifier can be supplied as well.
func GetRdmaCharDevices ¶
GetRdmaCharDevices returns a list of character device absolute paths for a requested rdmaDeviceName. For multi-port RDMA devices, all matching character devices of each type are returned (e.g., all umad and issm devices across all ports). Returns nil if no character devices are found.
func GetRdmaDeviceForNetdevice ¶
Get RDMA device for the netdevice
func GetRdmaDeviceList ¶
func GetRdmaDeviceList() []string
GetRdmaDeviceList Returns a list of rdma device names
func GetRdmaDevicesForAuxdev ¶ added in v1.1.0
Get list of RDMA devices for an auxiliary device. When switchdev mode is used, there may be more than one rdma device. Example deviceID: mlx5_core.sf.4, when found, returns list of devices one or more devices names such as mlx5_0, mlx5_10
func GetRdmaDevicesForPcidev ¶
Get list of RDMA devices for a pci device. When switchdev mode is used, there may be more than one rdma device. Example pcidevName: 0000:05:00.0, when found, returns list of devices one or more devices names such as mlx5_0, mlx5_10
func IsRDmaDeviceForNetdevice ¶
Returns true if rdma device exist for netdevice, else false
Types ¶
type RdmaPortStats ¶
type RdmaPortStats struct {
HwStats []RdmaStatEntry /* /sys/class/infiniband/<dev>/<port>/hw_counters */
Stats []RdmaStatEntry /* /sys/class/infiniband/<dev>/<port>/counters */
Port int
}
func GetRdmaSysfsAllStats ¶
func GetRdmaSysfsAllStats(rdmaDevice string, port int) (RdmaPortStats, error)
Get RDMA sysfs starts from counter and hw_counters directory for a requested port of a device.
type RdmaStatEntry ¶
func GetRdmaSysfsHwStats ¶
func GetRdmaSysfsHwStats(rdmaDevice string, port int) ([]RdmaStatEntry, error)
Get RDMA Sysfs stats from hw_counters directory of a port of a rdma device Port number starts from 1.
func GetRdmaSysfsStats ¶
func GetRdmaSysfsStats(rdmaDevice string, port int) ([]RdmaStatEntry, error)
Get RDMA Sysfs stats from counters directory of a port of a rdma device Port number starts from 1.
type RdmaStats ¶
type RdmaStats struct {
PortStats []RdmaPortStats
}
func GetRdmaSysfsAllPortsStats ¶
Get RDMA sysfs starts from counter and hw_counters directory for a rdma device.