Skip to content

Commit

Permalink
Bump github.com/NVIDIA/go-nvlib from 0.2.0 to 0.6.1
Browse files Browse the repository at this point in the history
Bumps [github.com/NVIDIA/go-nvlib](https://github.com/NVIDIA/go-nvlib) from 0.2.0 to 0.6.1.
- [Release notes](https://github.com/NVIDIA/go-nvlib/releases)
- [Commits](NVIDIA/go-nvlib@v0.2.0...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/NVIDIA/go-nvlib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Christopher Desiniotis <[email protected]>
  • Loading branch information
dependabot[bot] and cdesiniotis committed Jul 16, 2024
1 parent 866d496 commit 9bdf140
Show file tree
Hide file tree
Showing 16 changed files with 2,152 additions and 415 deletions.
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module github.com/NVIDIA/vgpu-device-manager

go 1.21
go 1.22.0

toolchain go1.22.4

require (
github.com/NVIDIA/go-nvlib v0.2.0
github.com/NVIDIA/go-nvlib v0.6.1
github.com/google/uuid v1.6.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/NVIDIA/go-nvlib v0.2.0 h1:roq+SDstbP1fcy2XVH7wB2Gz2/Ud7Q+NGQYOcVITVrA=
github.com/NVIDIA/go-nvlib v0.2.0/go.mod h1:kFuLNTyD1tF6FbRFlk+/EdUW5BrkE+v1Y3A3/9zKSjA=
github.com/NVIDIA/go-nvlib v0.6.1 h1:0/5FvaKvDJoJeJ+LFlh+NDQMxMlVw9wOXrOVrGXttfE=
github.com/NVIDIA/go-nvlib v0.6.1/go.mod h1:9UrsLGx/q1OrENygXjOuM5Ey5KCtiZhbvBlbUIxtGWY=
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down
17 changes: 3 additions & 14 deletions pkg/vgpu/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ func (m *nvlibVGPUConfigManager) GetVGPUConfig(gpu int) (types.VGPUConfig, error
}
vgpuConfig := types.VGPUConfig{}
for _, vgpuDev := range vgpuDevs {
pf, err := vgpuDev.GetPhysicalFunction()
if err != nil {
return nil, fmt.Errorf("error getting physical device for vGPU device: %v", err)
}
pf := vgpuDev.GetPhysicalFunction()
if device.Address == pf.Address {
vgpuConfig[vgpuDev.MDEVType]++
}
Expand All @@ -85,11 +82,7 @@ func (m *nvlibVGPUConfigManager) SetVGPUConfig(gpu int, config types.VGPUConfig)
// Filter for 'parent' devices that are backed by the physical function
parents := []*nvmdev.ParentDevice{}
for _, p := range allParents {
pf, err := p.GetPhysicalFunction()
if err != nil {
return fmt.Errorf("error getting physical function for parent device: %v", err)
}

pf := p.GetPhysicalFunction()
if pf.Address == device.Address {
parents = append(parents, p)
}
Expand Down Expand Up @@ -163,11 +156,7 @@ func (m *nvlibVGPUConfigManager) ClearVGPUConfig(gpu int) error {
}

for _, vgpuDev := range vgpuDevs {
pf, err := vgpuDev.GetPhysicalFunction()
if err != nil {
return fmt.Errorf("error getting physical device for vGPU device: %v", err)
}

pf := vgpuDev.GetPhysicalFunction()
if device.Address == pf.Address {
err = vgpuDev.Delete()
if err != nil {
Expand Down
40 changes: 34 additions & 6 deletions vendor/github.com/NVIDIA/go-nvlib/pkg/nvmdev/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 49 additions & 44 deletions vendor/github.com/NVIDIA/go-nvlib/pkg/nvmdev/nvmdev.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9bdf140

Please sign in to comment.