Versions in this module Expand all Collapse all v0 v0.1.0 May 1, 2024 v0.0.1 Feb 21, 2024 Changes in this version + const ArbitrationFeature + const AsyncEventFeature + const AutoPSTFeature + const CommandRetryDelayMask + const CommandRetryDelayShift + const DeviceSelfTestCommand + const DirectivesSupport + const DoNotRetryMask + const DoorbellBufferConfigCommand + const EnduranceFeature + const ErrorRecoveryFeature + const FirmwareCommitImageDownload + const FormatNVMCommandSupport + const GetLBAStatusCapability + const HCTMFeature + const HostBehaviorFeature + const HostIDFeature + const HostMemoryBufferFeature + const IOCSProfileFeature + const IRQCoalesceFeature + const IRQConfigFeature + const IdentifyDataSize + const KATOFeature + const LBARangeFeature + const LBAStatusInfoFeature + const LogCdw10LogPageIdentiferMask + const LogCdw10LogPageIdentiferShift + const LogCdw10LogSpecificFieldMask + const LogCdw10LogSpecificFieldShift + const LogCdw10NumberOfDwordsLowerMask + const LogCdw10NumberOfDwordsLowerShift + const LogCdw10RetainAsynchronousEventMask + const LogCdw10RetainAsynchronousEventShift + const LogCdw11LogSpecificIdentifierMask + const LogCdw11LogSpecificIdentifierShift + const LogCdw11NumberOfDwordsUpperMask + const LogCdw11NumberOfDwordsUpperShift + const LogCdw14UuidMask + const LogCdw14UuidShift + const MiControllerMetadata + const MiNamespaceMetadata + const MoreMask + const NVMeMISendReceiveSupport + const NamespaceManagementCapability + const NoPSCFeature + const NoneFeature + const NumQueuesFeature + const OsCtrlNameElementType + const OsDriverNameElementType + const OsDriverVersionElementType + const OsNamespaceNameElementType + const PLMConfigFeature + const PLMWindowFeature + const PowerManagmentFeature + const PreBootCtrlNameElementType + const PreBootDriverNameElementType + const PreBootDriverVersionElementType + const PreBootNamespaceNameElementType + const RRLFeature + const ReservationMaskFeature + const ReservationPersistentFeature + const SWProgressFeature + const SanitizeFeature + const SecuritySendReceiveCapabilities + const StatusCodeMask + const TemperatureThresholdFeature + const TimestampFeature + const VirtualiztionManagementSupport + const VolatileWriteCacheFeature + const WriteAtomicFeature + const WriteProtectFeature + var FeatureBufferLength = [256]uint32 + var VirtualManagementResourceTypeName = map[VirtualManagementResourceType]string + func DeviceList(r string) ([]string, error) + type AdminCmd = PassthruCmd + func (cmd *AdminCmd) String() string + type AdminCommandOpCode uint8 + const FormatNvmOpCode + const GetFeatures + const GetLogPage + const IdentifyOpCode + const NamespaceAttachOpCode + const NamespaceManagementOpCode + const NvmeMiRecv + const NvmeMiSend + const SetFeatures + const VirtualMgmtOpCode + func (code AdminCommandOpCode) String() string + type CommandError struct + CommandRetryDelay uint8 + DoNotRetry bool + More bool + StatusCode StatusCode + func (e *CommandError) Error() string + type CtrlCaps struct + ControllerId uint16 + ControllerResourceType uint8 + PortId uint16 + Reserved48 [16]uint8 + Reserved5 [27]uint8 + Reserved90 [4016]uint8 + VIFlexibleResourcePreferredGranularity uint16 + VIResourcesFlexibleAllocatedToPrimary uint16 + VIResourcesFlexibleAssigned uint32 + VIResourcesFlexibleSecondaryMaximum uint16 + VIResourcesFlexibleTotal uint32 + VIResourcesPrivateTotal uint16 + VQFlexibleResourcePreferredGranularity uint16 + VQResourcesFlexibleAllocatedToPrimary uint16 + VQResourcesFlexibleAssigned uint32 + VQResourcesFlexibleSecondaryMaximum uint16 + VQResourcesFlexibleTotal uint32 + VQResourcesPrivateTotal uint16 + type CtrlList struct + Identifiers [2047]uint16 + Num uint16 + type Device struct + Path string + func Connect(dev *switchtec.Device, pdfid uint16) (*Device, error) + func Open(devPath string) (*Device, error) + func (dev *Device) AttachNamespace(namespaceID uint32, controllers []uint16) error + func (dev *Device) Close() + func (dev *Device) CreateNamespace(size uint64, capacity uint64, format uint8, dps uint8, sharing uint8, ...) (uint32, error) + func (dev *Device) DeleteNamespace(namespaceID uint32) error + func (dev *Device) DetachNamespace(namespaceID uint32, controllers []uint16) error + func (dev *Device) FormatNamespace(namespaceID uint32) error + func (dev *Device) GetFeature(nsid uint32, fid Feature, sel int, cdw11 uint32, len uint32, buf []byte) error + func (dev *Device) GetSmartLog() (*SmartLog, error) + func (dev *Device) Identify(namespaceId uint32, cns IdentifyControllerOrNamespaceType, data []byte) error + func (dev *Device) IdentifyController() (*IdCtrl, error) + func (dev *Device) IdentifyNamespace(namespaceId uint32, present bool) (*IdNs, error) + func (dev *Device) IdentifyNamespaceControllerList(namespaceId uint32) (*CtrlList, error) + func (dev *Device) IdentifyNamespaceList(namespaceId uint32, all bool) ([1024]NamespaceIdentifier, error) + func (dev *Device) IdentifyPrimaryControllerCapabilities(controllerId uint16) (*CtrlCaps, error) + func (dev *Device) IdentifyRaw(namespaceId uint32, cdw10 uint32, cdw11 uint32, data []byte) error + func (dev *Device) ListSecondary(startingCtrlId uint32, namespaceId uint32) (*SecondaryControllerList, error) + func (dev *Device) SetFeature(nsid uint32, fid Feature, cdw12 uint32, save bool, len uint32, buf []byte) error + func (dev *Device) String() string + func (dev *Device) VirtualMgmt(ctrlId uint16, action VirtualManagementAction, ...) error + type Feature uint8 + type FormatNs struct + Fill uint8 + Format uint8 + MetadataSetting uint8 + ProtectionInfo uint8 + ProtectionInfoLocation uint8 + SecureEraseSetting uint8 + Unused [2]uint8 + type FormattedLBASize struct + Format uint8 + Metadata uint8 + Reserved uint8 + type HostMetadataElementType uint8 + type IdCtrl id_ctrl + func (id *IdCtrl) GetCapability(cap OptionalControllerCapabilities) bool + type IdNs struct + AnaGroupIdentifier uint32 + AtomicBoundaryOffset uint16 + AtomicBoundarySizeNormal uint16 + AtomicBoundarySizePowerFail uint16 + AtomicCompareAndWriteUnit uint16 + AtomicWriteUnitNormal uint16 + AtomicWriteUnitPowerFail uint16 + Attributes struct{ ... } + Capacity uint64 + DeallocateLogiclBlockFeatures uint8 + EndToEndDataProtectionCaps uint8 + EndToEndDataProtectionTypeSettings uint8 + EnduranceGroupIdentifier uint16 + Features struct{ ... } + FormatProgressIndicator struct{ ... } + FormattedLBASize FormattedLBASize + GloballyUniqueIdentifier NamespaceGloballyUniqueIdentifier + IeeeExtendedUniqueIdentifier [8]uint8 + LBAFormats [16]struct{ ... } + MetadataCapabilities struct{ ... } + MultiPathIOSharingCapabilities NamespaceCapabilities + NVMCapacity [16]uint8 + NumberOfLBAFormats uint8 + NvmSetIdentifier uint16 + OptimalIOBoundary uint16 + OptimalWriteSize uint16 + PreferredDeallocateAlignment uint16 + PreferredDeallocateGranularity uint16 + PreferredWriteAlignment uint16 + PreferredWriteGranularity uint16 + ReservationCapabilities struct{ ... } + Reserved192 [192]uint8 + Reserved74 [18]uint8 + Reserved96 [3]uint8 + Size uint64 + Utilization uint64 + VendorSpecific [3712]uint8 + type IdentifyControllerOrNamespaceType int + const ControllerList_CNS + const ControllerNamespaceList_CNS + const Controller_CNS + const NVMSetList_CNS + const NamespaceDescriptorList_CNS + const NamespaceGranularityList_CNS + const NamespaceList_CNS + const NamespacePresentList_CNS + const NamespacePresent_CNS + const Namespace_CNS + const PrimaryControllerCapabilities_CNS + const SecondaryControllerList_CNS + const UUIDList_CNS + type MIHostMetadata struct + DescriptorData []byte + NumDescriptors uint8 + Reserved1 uint8 + type MIHostMetadataElementDescriptor struct + Len uint16 + Rev uint8 + Type uint8 + Val []byte + type MiMeatadataFeatureBuilder struct + func NewMiFeatureBuilder() *MiMeatadataFeatureBuilder + func (builder *MiMeatadataFeatureBuilder) AddElement(typ uint8, rev uint8, data []byte) *MiMeatadataFeatureBuilder + func (builder *MiMeatadataFeatureBuilder) Bytes() []byte + type NamespaceCapabilities struct + Reserved uint8 + Sharing uint8 + type NamespaceGloballyUniqueIdentifier [16]byte + func (a *NamespaceGloballyUniqueIdentifier) Parse(s string) + func (a NamespaceGloballyUniqueIdentifier) String() string + type NamespaceIdentifier uint32 + const COMMON_NAMESPACE_IDENTIFIER + type OptionalControllerCapabilities uint16 + type PassthruCmd struct + Addr uint64 + Cdw10 uint32 + Cdw11 uint32 + Cdw12 uint32 + Cdw13 uint32 + Cdw14 uint32 + Cdw15 uint32 + Cdw2 uint32 + Cdw3 uint32 + DataLen uint32 + Flags uint8 + Metadata uint64 + MetadataLen uint32 + NSID uint32 + Opcode uint8 + Reserved1 uint16 + Result uint32 + TimeoutMs uint32 + type SanitizeCapabilities struct + BlockErase uint8 + CryptoErase uint8 + NoDeallocateAfterSanitize uint8 + NoDeallocateMask uint8 + Overwrite uint8 + Unused0 uint8 + Unused1 uint16 + Unused2 uint8 + type SecondaryControllerEntry struct + PrimaryControllerID uint16 + Reserved14 [18]uint8 + Reserved5 [3]uint8 + SecondaryControllerID uint16 + SecondaryControllerState uint8 + VIFlexibleResourcesAssigned uint16 + VQFlexibleResourcesAssigned uint16 + VirtualFunctionNumber uint16 + type SecondaryControllerList struct + Count uint8 + Entries [127]SecondaryControllerEntry + Reserved [31]uint8 + type SmartLog struct + AvailableSpare uint8 + AvailableSpareThreshold uint8 + CompositeTemperature uint16 + ControllerBusyTimeHi uint64 + ControllerBusyTimeLo uint64 + CriticalCompositeTemperatureTime uint32 + CriticalWarning struct{ ... } + DataUnitsReadHi uint64 + DataUnitsReadLo uint64 + DataUnitsWrittenHi uint64 + DataUnitsWrittenLo uint64 + EnduranceGroupCriticalWarningSummary uint8 + HistReadsHi uint64 + HostReadsLo uint64 + HostWritesHi uint64 + HostWritesLo uint64 + MediaErrorsHi uint64 + MediaErrorsLo uint64 + NumberErrorLogEntriesHi uint64 + NumberErrorLogEntriesLo uint64 + PercentageUsed uint8 + PowerCyclesHi uint64 + PowerCyclesLo uint64 + PowerOnHoursHi uint64 + PowerOnHoursLo uint64 + Reserved232 [280]uint8 + Reserved7 [25]uint8 + TemperatureSensor [8]uint16 + ThermalManagementTemperature1TransitionCount uint32 + ThermalManagementTemperature2TransitionCount uint32 + TotalTimeForThermalManagementTemperature1 uint32 + TotalTimeForThermalManagementTemperature2 uint32 + UnsafeShutdownsHi uint64 + UnsafeShutdownsLo uint64 + WarningCompositeTemperatureTime uint32 + type StatusCode uint32 + const NamespaceAlreadyAttached + const NamespaceNotAttached + func (sc StatusCode) String() string + type SwitchtecNvmeCommandError struct + func (e *SwitchtecNvmeCommandError) Error() string + func (e *SwitchtecNvmeCommandError) Unwrap() error + type UserIoCmd struct + Addr uint64 + AppMask uint16 + AppTag uint16 + Control uint16 + DsMgmt uint32 + Flags uint8 + Metadata uint64 + NBlocks uint16 + Opcode uint8 + RefTag uint32 + Reserved uint16 + StartLBA uint64 + type VirtualManagementAction uint32 + const PrimaryFlexibleAction + const SecondaryAssignAction + const SecondaryOfflineAction + const SecondaryOnlineAction + type VirtualManagementResourceType uint32 + const VIResourceType + const VQResourceType