Evan Lezar
bf9a4d3476
Sort functions in interface alphabetically
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-09-02 15:07:39 +02:00
Evan Lezar
a404873b12
Add additional functions to Device interface
...
Add the following functions to the Device interface:
* GetCudaComputeCapability
* GetAttributes
* GetName
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-09-02 15:05:12 +02:00
Evan Lezar
da71bc2bff
Update go-nvml dependency
...
This updates go-nvml to include fixes for getting devices by UUID
and to remove the panic from calls to Init and Shutdown.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-09-01 14:06:25 +02:00
Evan Lezar
9175bde20b
Add SystemGetCudaDriverVersion to NVML interface
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-09-01 14:05:16 +02:00
Christopher Desiniotis
7e23240abb
Merge branch 'add-getters-for-nvpci-and-nvmdev' into 'main'
...
Add several 'getters' to nvpci and nvmdev
See merge request nvidia/cloud-native/go-nvlib!17
2022-08-26 16:24:04 +00:00
Christopher Desiniotis
bccac280ca
nvmdev: Add GetPhysicalFunction() for both Device and ParentDevice
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-08-25 09:35:11 -07:00
Christopher Desiniotis
6ff7845b92
nvpci: Add GetGPUByIndex()
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-08-25 09:34:49 -07:00
Christopher Desiniotis
09ae86c8e0
Merge branch 'pf-filtering' into 'main'
...
Detect if NvidiaPCIDevice is a PF or VF
See merge request nvidia/cloud-native/go-nvlib!13
2022-08-15 17:09:02 +00:00
Kevin Klues
ad3fa31634
Merge branch 'add-nvml-wrapper' into 'main'
...
Add an interface based wrapper around go-nvml for better mocking
See merge request nvidia/cloud-native/go-nvlib!14
2022-08-11 12:41:20 +00:00
Kevin Klues
8e030df089
Add make target for 'go generate'
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-08-11 12:13:41 +00:00
Kevin Klues
2e1e2e784a
Add String() and Error() functions to Return type in nvml package
...
There is a default implementation for these that is overwritten if the
underlying NVML library ends up being used.
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-08-11 12:13:41 +00:00
Kevin Klues
008aa70bc6
Add an interface based wrapper around go-nvml for better mocking
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-08-10 15:52:16 +00:00
Kevin Klues
2d296edf19
Add go-nvml as a vendored repo
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-08-10 06:57:21 +00:00
Christopher Desiniotis
afdf3edd99
Detect if NvidiaPCIDevice is a PF or VF
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-28 19:16:39 -07:00
Christopher Desiniotis
c7f47cb02a
Merge branch 'iommu-group' into 'main'
...
Detect iommu_group for PCI and mdev devices
See merge request nvidia/cloud-native/go-nvlib!12
2022-07-25 23:20:03 +00:00
Christopher Desiniotis
f52cd402a1
Detect iommu_group for PCI and mdev devices
2022-07-25 23:20:03 +00:00
Christopher Desiniotis
f281b5e581
Merge branch 'driver-detection' into 'main'
...
Detect driver bound to an NvidiaPCIDevice and mdev device
See merge request nvidia/cloud-native/go-nvlib!11
2022-07-14 20:39:17 +00:00
Evan Lezar
a965ca0b8f
Merge branch 'add-info-package' into 'main'
...
Add nvinfo package to query system state
See merge request nvidia/cloud-native/go-nvlib!9
2022-07-13 11:50:52 +00:00
Christopher Desiniotis
8209652159
Detect driver bound to mdev devices
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-08 13:11:01 -07:00
Christopher Desiniotis
805db5afa8
Refactor how mdev's are represented internally in nvmdev.
...
The 'mdev' string now represents the absolute path to an
mdev device (/sys/bus/pci/devices/<addr>/<uuid>) instead
of the mdev_type directory for the mdev device
(/sys/bus/pci/devices/<addr>/mdev_supported_types/<mdev-type>).
This is more intuitive and will make it easier to get
more information about a particular mdev device -
like the driver or iommu_group it belongs to - which can
be found at /sys/bus/pci/devices/<addr>/<uuid>.
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-08 13:00:06 -07:00
Christopher Desiniotis
d65cf69086
Bump go to 1.16 in Makefile to align with minimum go version specified in go.mod
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-08 08:46:05 -07:00
Christopher Desiniotis
09edde0a0b
Detect driver bound to an NvidiaPCIDevice
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-08 08:46:02 -07:00
Christopher Desiniotis
e2d858daed
Use 'os' instead of 'ioutil' which is recommended starting with Go 1.16
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-07 13:43:11 -07:00
Christopher Desiniotis
dc53500d0e
Update .gitignore
...
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
2022-07-07 13:42:25 -07:00
Evan Lezar
f0458d65ef
Bump Golang version in build container to 1.16
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-06-28 20:35:01 +02:00
Evan Lezar
31a93fef5c
Update vendoring
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-06-28 15:58:57 +02:00
Evan Lezar
f13f6f0ac9
Add nvinfo package to query system state
...
This change adds an nvinfo package with HasNVML and IsTegraSystem
functions. These functions can be used to control behaviour on
different platforms.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-06-28 15:56:34 +02:00
Kevin Klues
47893b1629
Merge branch 'bar-sizes' into 'main'
...
Added function to retrieve the BAR sizes
See merge request nvidia/cloud-native/go-nvlib!8
2022-06-01 11:43:29 +00:00
Zvonko Kaiser
c5ed06b032
Added function to retrieve the BAR sizes
2022-06-01 03:20:10 -07:00
Christopher Desiniotis
038b3f8b47
Merge branch 'nvmdev' into 'main'
...
Add nvmdev package for mdev (vGPU) devices
See merge request nvidia/cloud-native/go-nvlib!6
2022-05-25 16:34:29 +00:00
Christopher Desiniotis
505f83b943
Add nvmdev package for mdev (vGPU) devices
2022-05-25 16:34:29 +00:00
Kevin Klues
cc0dadbb96
Merge branch 'status_check' into 'master'
...
Added status byte check for capability list
See merge request nvidia/cloud-native/go-nvlib!5
2022-02-16 10:06:24 +00:00
zvonkok
9196546dcc
Add the status byte check
2022-02-16 10:45:15 +01:00
zvonkok
1f718a1568
Update the Open API to OpenRO and OpenRW
2022-02-16 10:44:32 +01:00
Zvonko Kaiser
2c175dcdbf
Fix the linting errors
2022-02-16 10:43:27 +01:00
Kevin Klues
96f9d0d39e
Merge branch 'add-numa-node-to-nvpci' into 'master'
...
Add numa node as a standard field in the nvpci struct
See merge request nvidia/cloud-native/go-nvlib!2
2021-03-22 20:23:41 +00:00
Kevin Klues
4066c09810
Add test for NUMA node addition to nvpci
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 17:19:50 +00:00
Kevin Klues
5adc7bd87c
Add numa node as a standard field in the nvpci struct
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 17:18:38 +00:00
Kevin Klues
af7bde75a5
Update nvpci mock to be more generic and support more devices
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 17:18:35 +00:00
Kevin Klues
2119080eb9
Merge branch 'initial-commits' into 'master'
...
Add initial set of commits for the nvpci library and all build infrastructure
See merge request nvidia/cloud-native/go-nvlib!1
2021-03-22 13:03:11 +00:00
Kevin Klues
b7d96c7bf0
Move pkg/{bytes, mmio} underneath /pkg/nvpci
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:33:20 +00:00
Kevin Klues
575c714bac
Add .gitlab-ci files (for both internal and external builds)
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:22:02 +00:00
Kevin Klues
11d6080941
Add Makefile and build targets
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:19:56 +00:00
Kevin Klues
6a0fd37ab6
Add pkg/nvpci as a direct port from mig-parted/pkg/nvpci
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:19:56 +00:00
Kevin Klues
613fd315f3
Add pkg/mmio as a direct port from mig-parted/internal/mmio
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:19:56 +00:00
Kevin Klues
98d311e418
Add pkg/bytes as a direct port from mig-parted/internal/bytes
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:19:56 +00:00
Kevin Klues
0d682249b6
Add .gitignore
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:19:45 +00:00
Kevin Klues
e43d82971c
Add vendoring for upcoming packages
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:19:45 +00:00
Kevin Klues
7a3c6d6c06
Add initial CONTRIBUTING, LICENSE, and README files
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-03-22 11:19:45 +00:00