mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 21:24:36 +00:00
gpu: Fixing typos for PCIe topology changes
Some comments and functions had typos and wrong capitalization. Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
This commit is contained in:
parent
8330fb8ee7
commit
0f454d0c04
@ -188,7 +188,7 @@ var PCIePortPrefixMapping = map[PCIePort]PCIePortBusPrefix{
|
|||||||
BridgePort: PCIBridgePortPrefix,
|
BridgePort: PCIBridgePortPrefix,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p PCIePort) InValid() bool {
|
func (p PCIePort) Invalid() bool {
|
||||||
switch p {
|
switch p {
|
||||||
case RootPort:
|
case RootPort:
|
||||||
fallthrough
|
fallthrough
|
||||||
@ -374,7 +374,7 @@ const (
|
|||||||
VFIOAPDeviceMediatedType
|
VFIOAPDeviceMediatedType
|
||||||
)
|
)
|
||||||
|
|
||||||
// VFIOPCIDev represents a VFIO PCI device used for hotplugging
|
// VFIODev represents a VFIO PCI device used for hotplugging
|
||||||
type VFIODev struct {
|
type VFIODev struct {
|
||||||
// ID is used to identify this drive in the hypervisor options.
|
// ID is used to identify this drive in the hypervisor options.
|
||||||
ID string
|
ID string
|
||||||
|
@ -47,7 +47,7 @@ func deviceLogger() *logrus.Entry {
|
|||||||
return api.DeviceLogger()
|
return api.DeviceLogger()
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPCIeDevice Identifies PCIe device by reading the size of the PCI config space
|
// IsPCIeDevice identifies PCIe device by reading the size of the PCI config space
|
||||||
// Plain PCI device have 256 bytes of config space where PCIe devices have 4K
|
// Plain PCI device have 256 bytes of config space where PCIe devices have 4K
|
||||||
func IsPCIeDevice(bdf string) bool {
|
func IsPCIeDevice(bdf string) bool {
|
||||||
if len(strings.Split(bdf, ":")) == 2 {
|
if len(strings.Split(bdf, ":")) == 2 {
|
||||||
|
@ -579,7 +579,7 @@ func addHypervisorPCIePortOverride(value string) (config.PCIePort, error) {
|
|||||||
return config.NoPort, nil
|
return config.NoPort, nil
|
||||||
}
|
}
|
||||||
port := config.PCIePort(value)
|
port := config.PCIePort(value)
|
||||||
if port.InValid() {
|
if port.Invalid() {
|
||||||
return config.InvalidPort, fmt.Errorf("Invalid PCIe port \"%v\" specified in annotation", value)
|
return config.InvalidPort, fmt.Errorf("Invalid PCIe port \"%v\" specified in annotation", value)
|
||||||
}
|
}
|
||||||
return port, nil
|
return port, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user