Skip to content

Commit 5562204

Browse files
authored
Merge pull request #693 from uniemimu/linterfixes
gpu rm linter comment fixes
2 parents e0b3cf1 + 0670a82 commit 5562204

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ type DeviceInfo struct {
7373

7474
type getClientFunc func(string, time.Duration, int) (podresourcesv1.PodResourcesListerClient, *grpc.ClientConn, error)
7575

76+
// ResourceManager interface for the fractional resource handling.
7677
type ResourceManager interface {
7778
ReallocateWithFractionalResources(*pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
7879
SetDevInfos(DeviceInfoMap)
@@ -88,6 +89,7 @@ type resourceManager struct {
8889
prGetClientFunc getClientFunc
8990
}
9091

92+
// NewDeviceInfo creates a new DeviceInfo.
9193
func NewDeviceInfo(nodes []pluginapi.DeviceSpec, mounts []pluginapi.Mount, envs map[string]string) *DeviceInfo {
9294
return &DeviceInfo{
9395
nodes: nodes,
@@ -96,8 +98,10 @@ func NewDeviceInfo(nodes []pluginapi.DeviceSpec, mounts []pluginapi.Mount, envs
9698
}
9799
}
98100

101+
// DeviceInfoMap is a map of device infos. deviceId -> *DeviceInfo.
99102
type DeviceInfoMap map[string]*DeviceInfo
100103

104+
// NewDeviceInfoMap creates a new DeviceInfoMap.
101105
func NewDeviceInfoMap() DeviceInfoMap {
102106
return DeviceInfoMap{}
103107
}

cmd/internal/pluginutils/sriov.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"strings"
2121
)
2222

23+
// IsSriovPFwithVFs returns true if the device with given pfpath has virtual functions, false otherwise.
2324
func IsSriovPFwithVFs(pfpath string) bool {
2425
dat, err := os.ReadFile(path.Join(pfpath, "device/sriov_numvfs"))
2526

0 commit comments

Comments
 (0)