device

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SysfsRoot = "/sys"
)

Variables

This section is empty.

Functions

func FindOrphanedCPUs added in v0.2.0

func FindOrphanedCPUs(domains []PCIeDomain, allCPUs cpuset.CPUSet) cpuset.CPUSet

func IsPCIeRootName added in v0.2.0

func IsPCIeRootName(name string) bool

IsPCIeRootName matches the constructions of the pcie roots in the linux kernel. The kernel format string is "pci%04x:%02x" (linux 7.0.9: drivers/pci/probe.c:1028).

func MapCPUsToPCIeDomain added in v0.2.0

func MapCPUsToPCIeDomain(domains []PCIeDomain, allCPUs cpuset.CPUSet) map[int][]*PCIeDomain

MapCPUsToPCIeDomain returns a map cpuid -> pciedomains

func SetCompatibilityAttributes

func SetCompatibilityAttributes(attrs map[resourceapi.QualifiedName]resourceapi.DeviceAttribute, numaID int64)

SetCompatibilityAttributes add attributes to enable compatibility (e.g. alignment) with other DRA resource drivers leveraging attributes which are not kubernetes standard. This is the "staging area" which enables attribute sharing until (or before) they become standard.

Types

type PCIeDomain added in v0.2.0

type PCIeDomain struct {
	RootName  string
	LocalCPUs cpuset.CPUSet
}

func PCIeDomainsFromFS added in v0.2.0

func PCIeDomainsFromFS(logger logr.Logger, sysfs SysFS) ([]PCIeDomain, error)

func (PCIeDomain) String added in v0.2.0

func (pcd PCIeDomain) String() string

type SysFS added in v0.2.0

type SysFS interface {
	fs.ReadLinkFS
	fs.ReadDirFS
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL