Documentation
¶
Index ¶
- Constants
- Variables
- func GetDataRateGBps(pciGen uint8) float64
- func NewCommandController() *commandController
- type AerGfmsEvent
- type BandwidthCounter
- type BandwidthCounterCommand
- type BandwidthCounterDirectional
- type BandwidthCounterPort
- type BandwidthType
- type BindGfmsEvent
- type Command
- type CommandError
- type Device
- func (dev *Device) BandwidthCounterAll(clear bool) ([]PortId, []BandwidthCounter, error)
- func (dev *Device) BandwidthCounterMany(physPortIds []uint8, clear bool) ([]BandwidthCounter, error)
- func (dev *Device) BandwidthCounterSetAll(bwType BandwidthType) error
- func (dev *Device) BandwidthCounterSetMany(physPortIds []int, bwType BandwidthType) error
- func (dev *Device) Bind(hostSwIdx uint8, hostPhysPortID uint8, hostLogPortID uint8, pdfid uint16) error
- func (dev *Device) ClearGfmsEvents() error
- func (dev *Device) Close() error
- func (dev *Device) CsrRead(pdfid uint16, addr uint16, length uint8) ([]byte, error)
- func (dev *Device) CsrRead16(pdfid uint16, addr uint16) (uint16, error)
- func (dev *Device) CsrRead32(pdfid uint16, addr uint16) (uint32, error)
- func (dev *Device) CsrRead8(pdfid uint16, addr uint16) (uint8, error)
- func (dev *Device) CsrWrite(pdfid uint16, addr uint16, payload []byte) error
- func (dev *Device) CsrWrite16(pdfid uint16, addr uint16, data uint16) error
- func (dev *Device) CsrWrite32(pdfid uint16, addr uint16, data uint32) error
- func (dev *Device) CsrWrite8(pdfid uint16, addr uint16, data uint8) error
- func (dev *Device) Echo(pattern uint32) error
- func (dev *Device) EndPointTunnelDisable(pdfid uint16) error
- func (dev *Device) EndPointTunnelEnable(pdfid uint16) error
- func (dev *Device) EndPointTunnelStatus(pdfid uint16) (EpTunnelStatus, error)
- func (dev *Device) EventCheck(chk *IoctlEventSummary) (*IoctlEventSummary, error)
- func (dev *Device) EventCtl(id EventId, index int32, flags EventFlags, data *[5]uint32) (uint32, error)
- func (dev *Device) EventSummary() (*IoctlEventSummary, error)
- func (dev *Device) EventWait(timeoutMs int) (bool, error)
- func (dev *Device) EventWaitFor(id EventId, index int32, timeout int64) (*IoctlEventSummary, error)
- func (dev *Device) GASRead(offset uint64, length uint64) ([]byte, error)
- func (dev *Device) GASWrite(data []byte, addr uint64) error
- func (dev *Device) GetDeviceId() (uint32, error)
- func (dev *Device) GetEvents(summary *IoctlEventSummary, id EventId, showAll bool, clearAll bool, ...) ([]Event, error)
- func (dev *Device) GetFirmwareInfoMetadata(partitionId FirmwarePartitionId) (*FirmwareMetadata, error)
- func (dev *Device) GetFirmwareVersion() (string, error)
- func (dev *Device) GetFlashInfo() (*FlashInfo, error)
- func (dev *Device) GetGfmsEvents() ([]GfmsEvent, error)
- func (dev *Device) GetSerialNumber() (uint32, error)
- func (dev *Device) GfmsEpPortDeviceEnumerate(pid uint8, f func(*DumpEpPortDevice) error) error
- func (dev *Device) GfmsEpPortFinish() error
- func (dev *Device) GfmsEpPortGet(pid uint8, len uint32) (*bytes.Buffer, error)
- func (dev *Device) GfmsEpPortStart(pid uint8) (uint32, error)
- func (dev *Device) ID() int32
- func (dev *Device) Identify() (int32, error)
- func (dev *Device) IsLocal() bool
- func (dev *Device) LinkStat() ([]PortLinkStat, error)
- func (dev *Device) Lock()
- func (dev *Device) MapResource(path string, offset uint64, length uint64, readonly bool) (*[]byte, error)
- func (dev *Device) NvmeAdminPassthru(pdfid uint16, data []byte, expRspLen int) ([]byte, error)
- func (dev *Device) OpenUart(name string) error
- func (dev *Device) PffToPort(index uint32) (int32, int32, error)
- func (dev *Device) PortToPff(partition, port int32) (int32, error)
- func (dev *Device) ResourceSize(resource string) (int64, error)
- func (dev *Device) RunCommand(cmd Command, payload interface{}, response interface{}) error
- func (dev *Device) RunCommandRawBytes(cmd Command, payload []byte, response []byte) error
- func (dev *Device) SetID(id int32)
- func (dev *Device) Status() (PortIds, error)
- func (dev *Device) SystemPath(resource string) (string, error)
- func (dev *Device) Unbind(hostSwIdx uint8, hostPhysPortID uint8, hostLogPortID uint8) error
- func (dev *Device) Unlock()
- func (dev *Device) VfReset(pdfid uint16) error
- type DeviceGfmsEvent
- type DumpEpPortAttachedDeviceFunction
- type DumpEpPortAttachmentHeader
- type DumpEpPortDevice
- type DumpEpPortEp
- type DumpEpPortHeader
- type DumpEpPortNone
- type DumpEpPortSwitch
- type DumpSectionHeader
- type EpPortType
- type EpTunnelStatus
- type EpTunnelSubCommand
- type Event
- type EventBit
- type EventDef
- type EventFlags
- type EventId
- type EventOptions
- type EventType
- type Events
- type FirmwareMetadata
- type FirmwarePartitionId
- type FlashInfo
- type FlashPartInfo
- type GfmsEvent
- type GfmsEventInterface
- func NewAerGfmsEvent(e GfmsEvent) GfmsEventInterface
- func NewBindGfmsEvent(e GfmsEvent) GfmsEventInterface
- func NewDeviceGfmsEvent(e GfmsEvent) GfmsEventInterface
- func NewHostGfmsEvent(e GfmsEvent) GfmsEventInterface
- func NewHvdGfmsEvent(e GfmsEvent) GfmsEventInterface
- func NewPortGfmsEvent(e GfmsEvent) GfmsEventInterface
- type HostGfmsEvent
- type HvdGfmsEvent
- type IoctlEventCtl
- type IoctlEventSummary
- type IoctlPffPort
- type PortGfmsEvent
- type PortId
- type PortIds
- type PortLinkStat
- type PortLinkState
- type SerialNumberSecurityVersionInfo
- type SubCommand
Constants ¶
const ( Invalid_EventType EventType = -1 Global_EventType = 0 Partition_EventType = 1 Port_EventType = 2 )
const ( StackError_EventId EventId = 0 PpuError_EventId = 1 IspError_EventId = 2 SysReset_EventId = 3 FwExc_EventId = 4 FwNmi_EventId = 5 FwNonFatal_EventId = 6 FwFatal_EventId = 7 TwiMrpcComp_EventId = 8 TwiMrpcCompAsync_EventId = 9 CliMrpcComp_EventId = 10 CliMrpcCompAsync_EventId = 11 GpioInt_EventId = 12 PartionReset_EventId = 13 MrpcComp_EventId = 14 MrpcCompAsync_EventId = 15 DynPartBindComp_EventId = 16 AerInP2p_EventId = 17 AerInVep_EventId = 18 Dpc_EventId = 19 Cts_EventId = 20 Hotplug_EventId = 21 Ier_EventId = 22 Thresh_EventId = 23 PowerMgmt_EventId = 24 TlpThrottling_EventId = 25 ForceSpeed_EventId = 26 CreditTimeout_EventId = 27 LinkState_EventId = 28 Gfms_EventId = 29 Uec_EventId = 31 MaxEventId = 31 InvalidEventId = -1 )
const ( LocalPartitionIndex = -1 IndexAll = -2 )
const ( Clear_EventFlag EventFlags = (1 << 0) EnablePoll_EventFlag = (1 << 1) EnableLog_EventFlag = (1 << 2) EnableCli_EventFlag = (1 << 3) EnableFatal_EventFlag = (1 << 4) DisablePoll_EventFlag = (1 << 5) DisableLog_EventFlag = (1 << 6) DisableCli_EventFlag = (1 << 7) DisableFatal_EventFlag = (1 << 8) )
const ( HostLinkUp_GfmsEvent = iota HostLinkDown_GfmsEvent DeviceAdd_GfmsEvent DeviceDelete_GfmsEvent FabricLinkUp_GfmsEvent FabricLinkDown_GfmsEvent Bind_GfmsEvent Unbind_GfmsEvent DatabaseChanged_GfmsEvent HvdInstEnable_GfmsEvent HvdInstDisable_GfmsEvent EpPortRemove_GfmsEvent EpPortAdd_GfmsEvent Aer_GfmsEvent Max_GfmsEvent )
const ( PAXIDMask = 0x1f PAXIdShift = 18 )
const (
MaxBandwidthCounterPorts = uint8((maxDataLength - int(unsafe.Sizeof(BandwidthCounterCommand{}))) / int(unsafe.Sizeof(BandwidthCounter{})))
)
const (
MaxSupportedTransferRates = 6
)
const (
MrpcPayloadSize = 1024
)
const (
NvmeAdminPassthruMaxDataLength = 4096 + 16*4
)
const (
PffVep int = 100
)
const (
UnboundPort uint8 = math.MaxUint8
)
Variables ¶
var ( MrpcInterruptedError = errors.New("MRPC Status Interrupted") MrpcIoError = errors.New("MRPC I/O Error") )
var ( SwitchtecIoctlEventSummary uintptr SwitchtecIoctlEventCtl uintptr SwitchtecIoctlPffToPort uintptr SwitchtecIoctlPortToPff uintptr )
var ( PciGenDataRateGTps = [MaxSupportedTransferRates]float64{0, 2.5, 5, 8, 16, 32} PciGenDataRateGBps = [MaxSupportedTransferRates]float64{0, 250, 500, 985, 1969, 3938} )
var (
EpPortNotDevice = errors.New("End-point is not a device")
)
Functions ¶
func GetDataRateGBps ¶
func NewCommandController ¶
func NewCommandController() *commandController
Types ¶
type AerGfmsEvent ¶
type AerGfmsEvent struct {
PhysPortId uint16
Handle uint8
Reserved uint8
CeUeErrSts uint32
AerErrLogTimeStampHigh uint32
AerErrLogTimeStampLow uint32
AerHeaderLog [4]uint32
}
Event Data for Switchtec GFMS AER Event
func (*AerGfmsEvent) CeUe ¶
func (event *AerGfmsEvent) CeUe() int
func (*AerGfmsEvent) Dpc ¶
func (event *AerGfmsEvent) Dpc() int
func (*AerGfmsEvent) Log ¶
func (event *AerGfmsEvent) Log() bool
func (*AerGfmsEvent) Print ¶
func (event *AerGfmsEvent) Print()
type BandwidthCounter ¶
type BandwidthCounter struct {
TimeInMicroseconds uint64
Egress BandwidthCounterDirectional
Ingress BandwidthCounterDirectional
}
func (*BandwidthCounter) Subtract ¶
func (from *BandwidthCounter) Subtract(c *BandwidthCounter)
type BandwidthCounterCommand ¶
type BandwidthCounterCommand struct {
SubCmd uint8
Count uint8 `structex:"countOf='Ports'"`
Ports [maxPorts]BandwidthCounterPort `structex:"truncate"`
}
type BandwidthCounterDirectional ¶
func (*BandwidthCounterDirectional) Total ¶
func (d *BandwidthCounterDirectional) Total() uint64
type BandwidthCounterPort ¶
type BandwidthType ¶
type BandwidthType int
const ( Raw_BandwidthType BandwidthType = 0 Payload_BandwidthType = 1 )
type BindGfmsEvent ¶
type BindGfmsEvent struct {
HostSwIdx uint8
HostPhysPortId uint8
LogPortId uint8
Reserved uint8
PDFID uint16
}
Event Data for Switchtec GFMS Bind / Unbind Event
func (*BindGfmsEvent) Print ¶
func (event *BindGfmsEvent) Print()
type Command ¶
type Command uint32
A Command describes the executable command sent to the device.
const ( PerformanceMonitorCommand Command = 7 // Global Address Space commands LinkStatCommand Command = 28 GASReadCommand Command = 0x29 // 41 PartitionInfo Command = 0x2B // 43 GASWriteCommand Command = 0x34 // 52 EchoCommand Command = 0x41 // 65 GetPaxIDCommand Command = 0x81 // 129 // Global Fabric Management Service commands DumpCommand Command = 0x83 BindUnbindCommand Command = 0x84 DeviceManageCommand Command = 0x85 // Obsolete - See NvmeAdminPassthru PortConfigCommand Command = 0x88 GfmsEventCommand Command = 0x89 PortControlCommand Command = 0x8D EpResourceAccessCommand Command = 0x8E EpTunnelConfigCommand Command = 0x8F NvmeAdminPassthruCommand Command = 0x91 GetDeviceInfo Command = 0x100 SerialNumberSecVersion Command = 0x109 )
The supported command set for a device.
type CommandError ¶
type CommandError struct {
// contains filtered or unexported fields
}
func (*CommandError) Error ¶
func (e *CommandError) Error() string
func (*CommandError) Unwrap ¶
func (e *CommandError) Unwrap() error
type Device ¶
type Device struct {
Path string
// contains filtered or unexported fields
}
Device describing the switchtec device
func (*Device) BandwidthCounterAll ¶
func (dev *Device) BandwidthCounterAll(clear bool) ([]PortId, []BandwidthCounter, error)
func (*Device) BandwidthCounterMany ¶
func (dev *Device) BandwidthCounterMany(physPortIds []uint8, clear bool) ([]BandwidthCounter, error)
func (*Device) BandwidthCounterSetAll ¶
func (dev *Device) BandwidthCounterSetAll(bwType BandwidthType) error
Set Bandwidth Type performance monitor for all ports in the system
func (*Device) BandwidthCounterSetMany ¶
func (dev *Device) BandwidthCounterSetMany(physPortIds []int, bwType BandwidthType) error
Set Bandwidth Type for particular physical ports in the system
func (*Device) Bind ¶
func (dev *Device) Bind(hostSwIdx uint8, hostPhysPortID uint8, hostLogPortID uint8, pdfid uint16) error
Bind does some stuff
func (*Device) ClearGfmsEvents ¶
func (*Device) CsrWrite16 ¶
func (*Device) CsrWrite32 ¶
func (*Device) Echo ¶
Echo will send a pattern to the device and expect to receive its inverse, confirming that the device is functioning properly.
func (*Device) EndPointTunnelDisable ¶
func (*Device) EndPointTunnelEnable ¶
func (*Device) EndPointTunnelStatus ¶
func (dev *Device) EndPointTunnelStatus(pdfid uint16) (EpTunnelStatus, error)
func (*Device) EventCheck ¶
func (dev *Device) EventCheck(chk *IoctlEventSummary) (*IoctlEventSummary, error)
func (*Device) EventSummary ¶
func (dev *Device) EventSummary() (*IoctlEventSummary, error)
func (*Device) EventWaitFor ¶
EventWaitFor will wait for the the occurrence of the EventId at the location specified by Index or a timeout to occur. The Event summary is returned, empty on timeout or with the value of the event otherwise. timeout = -1 is infinite wait.
func (*Device) GetFirmwareInfoMetadata ¶
func (dev *Device) GetFirmwareInfoMetadata(partitionId FirmwarePartitionId) (*FirmwareMetadata, error)
func (*Device) GetFirmwareVersion ¶
GetFirmwareVersion -
func (*Device) GetGfmsEvents ¶
func (*Device) GetSerialNumber ¶
GetSerialNumber -
func (*Device) GfmsEpPortDeviceEnumerate ¶
func (dev *Device) GfmsEpPortDeviceEnumerate(pid uint8, f func(*DumpEpPortDevice) error) error
func (*Device) GfmsEpPortFinish ¶
func (*Device) GfmsEpPortGet ¶
func (*Device) LinkStat ¶
func (dev *Device) LinkStat() ([]PortLinkStat, error)
Link Stat will get the status of all the ports on a switchtec device
func (*Device) MapResource ¶
func (*Device) NvmeAdminPassthru ¶
NvmeAdminPassthru will send an ADMIN PASSTHRU command to device and get reply `pdfid` is the Physical Device Function Identifier `data` is payload transmitted to the device `expRspLen` is the expected response length from the command
func (*Device) OpenUart ¶
OpenUart will open a UART device and configure the device for UART operations.
func (*Device) RunCommand ¶
RunCommand takes a command parameter and payload to send to the device. Optionally can take a response to return data back to the caller. Payload and response can be any structex annotated structure.
func (*Device) RunCommandRawBytes ¶
RunCommandRawBytes function will run the command on the device
type DeviceGfmsEvent ¶
Event Data for Switchtec GFMS Device Add / Delete Event
func (*DeviceGfmsEvent) Print ¶
func (event *DeviceGfmsEvent) Print()
type DumpEpPortAttachedDeviceFunction ¶
type DumpEpPortAttachedDeviceFunction struct {
FunctionID uint16
PDFID uint16
SRIOVCapPF uint8
VFNum uint8
Rsvd uint16
Bound uint8
BoundPAXID uint8
BoundHVDPhyPID uint8
BoundHVDLogPID uint8
VID uint16
DID uint16
SubSysVID uint16
SubSysDID uint16
DeviceClass uint32 `bitfield:"24"`
BARNumber uint32 `bitfield:"8"`
BAR [6]struct {
Typ uint8
Size uint8
}
}
type DumpEpPortDevice ¶
type DumpEpPortDevice struct {
Section DumpSectionHeader
Hdr DumpEpPortHeader
Ep DumpEpPortEp
}
DumpEpPortDevice is returned when DumpEpPortHeader.Type is DeviceEpPortType
type DumpEpPortEp ¶
type DumpEpPortEp struct {
Hdr DumpEpPortAttachmentHeader
Functions []DumpEpPortAttachedDeviceFunction
}
DumpEpPortDevice is returned after a DumpSectionHeader of type Device(0)
type DumpEpPortHeader ¶
type DumpEpPortHeader struct {
Typ uint8
PhysicalPort uint8
Count uint16
Size uint32 `bitfield:"24"`
Rsvd uint32 `bitfield:"8,reserved"`
}
DumpEpPortHeader is returned as part of a Ep Port Dump
type DumpEpPortNone ¶
type DumpEpPortNone struct {
Section DumpSectionHeader
Hdr DumpEpPortHeader
}
DumpEpPortNone is returned when DumpEpPortHeader.Type is NoneEpPortType
type DumpEpPortSwitch ¶
type DumpEpPortSwitch struct {
}
DumpEpPortSwitch is returned when DumpEpPortHeader.Type is SwitchEpPortType
type DumpSectionHeader ¶
type DumpSectionHeader struct {
SectionClass uint8
PAXIndex uint8
SoftwareFID uint16
ResponseSize uint32
Rsvd uint32
} // 12 bytes
DumpSectionHeader is returned as part of every dump section
type EpPortType ¶
type EpPortType uint8
EpPortType describes the type of return data for an GFMS EP Dump
const ( DeviceEpPortType EpPortType = 0 SwitchEpPortType EpPortType = 1 NoneEpPortType EpPortType = 2 )
type EpTunnelStatus ¶
type EpTunnelStatus uint8
const ( DisabledEpTunnelStatus EpTunnelStatus = 0 EnabledEpTunnelStatus EpTunnelStatus = 1 UnknownEpTunnelStatus EpTunnelStatus = 2 )
type EpTunnelSubCommand ¶
type EpTunnelSubCommand uint16
const ( EnableEpTunnelSubCommand EpTunnelSubCommand = 0 DisableEpTunnelSubCommand EpTunnelSubCommand = 1 StatusEpTunnelSubCommand EpTunnelSubCommand = 2 )
type EventDef ¶
type EventDef struct {
Type EventType
Id EventId
Options EventOptions
Bit int
Description string
}
type EventFlags ¶
type EventFlags int32
type FirmwareMetadata ¶
type FirmwareMetadata struct {
Magic [4]uint8
SubMagic [4]uint8
HeaderVersion uint32
SecureVersion uint32
HeaderLength uint32
MetadataLength int32
ImageLength uint32
Type uint32
Reserved uint32
Version uint32
Sequence uint32
Reserved1 uint32
DateStr [8]uint8
TimeStr [8]uint8
ImageStr [16]uint8
Reserved2 [4]uint8
ImageCrc uint32
PublicKeyModules [512]uint8
PublicKeyExponent [4]uint8
UartPort uint8
UartRate uint8
BistEnable uint8
BistGpioPinCfg uint8
BistGpioLevelCfg uint8
Reserved3 [3]uint8
XmlVersion uint32
RealocatableImgLen uint32
LinkAddr uint32
HeaderCrc uint32
}
type FirmwarePartitionId ¶
type FirmwarePartitionId uint8
const ( Map0FirmwarePartitionId FirmwarePartitionId = 0x0 Map1FirmwarePartitionId FirmwarePartitionId = 0x1 Key0FirmwarePartitionId FirmwarePartitionId = 0x2 Key1FirmwarePartitionId FirmwarePartitionId = 0x3 BL20FirmwarePartitionId FirmwarePartitionId = 0x4 BL21FirmwarePartitionId FirmwarePartitionId = 0x5 Cfg0FirmwarePartitionId FirmwarePartitionId = 0x6 Cfg1FirmwarePartitionId FirmwarePartitionId = 0x7 Img0FirmwarePartitionId FirmwarePartitionId = 0x8 Img1FirmwarePartitionId FirmwarePartitionId = 0x9 NvlogFirmwarePartitionId FirmwarePartitionId = 0xA SEEPROMFirmwarePartitionId FirmwarePartitionId = 0xFE InvalidFirmwarePartitionId FirmwarePartitionId = 0xFF )
type FlashInfo ¶
type FlashInfo struct {
FirmwareVersion uint32
FlashSize uint32
DeviceId uint16
EccEnable uint8
Reserved0 uint8
RunningBL2Flag uint8
RunningCfgFlag uint8
RunningImgFlag uint8
RunningKeyFlag uint8
RedundancyKeyFlag uint8
RedundancyBL2Flag uint8
RedundancyCfgFlag uint8
RedundancyImgFlag uint8
Reserved1 [11]uint32
Map0 FlashPartInfo
Map1 FlashPartInfo
KeyMan0 FlashPartInfo
KeyMan1 FlashPartInfo
BL20 FlashPartInfo
BL21 FlashPartInfo
Cfg0 FlashPartInfo
Cfg1 FlashPartInfo
Img0 FlashPartInfo
Img1 FlashPartInfo
NVLog FlashPartInfo
Vendor [8]FlashPartInfo
}
type FlashPartInfo ¶
type GfmsEventInterface ¶
type GfmsEventInterface interface {
Print()
}
func NewAerGfmsEvent ¶
func NewAerGfmsEvent(e GfmsEvent) GfmsEventInterface
func NewBindGfmsEvent ¶
func NewBindGfmsEvent(e GfmsEvent) GfmsEventInterface
func NewDeviceGfmsEvent ¶
func NewDeviceGfmsEvent(e GfmsEvent) GfmsEventInterface
func NewHostGfmsEvent ¶
func NewHostGfmsEvent(e GfmsEvent) GfmsEventInterface
func NewHvdGfmsEvent ¶
func NewHvdGfmsEvent(e GfmsEvent) GfmsEventInterface
func NewPortGfmsEvent ¶
func NewPortGfmsEvent(e GfmsEvent) GfmsEventInterface
type HostGfmsEvent ¶
type HostGfmsEvent struct {
PhysPortId uint16
}
Event Data for Switchtec GFMS Host Link Up / Down Event
func (*HostGfmsEvent) Print ¶
func (event *HostGfmsEvent) Print()
type HvdGfmsEvent ¶
Event Data for Switchtec GFMS HVD Instance Enable / Disable Event
func (*HvdGfmsEvent) Print ¶
func (event *HvdGfmsEvent) Print()
type IoctlEventCtl ¶
type IoctlEventSummary ¶
type IoctlEventSummary struct {
// contains filtered or unexported fields
}
TODO: Source from switchtec-user
type IoctlPffPort ¶
type PortGfmsEvent ¶
type PortGfmsEvent struct {
PhysPortId uint8
}
Event Data for Switchtec GFMS EP Port Add / Remove Event
func (*PortGfmsEvent) Print ¶
func (event *PortGfmsEvent) Print()
type PortId ¶
type PortId struct {
Partition uint8
Stack uint8
Upstream uint8
StackId uint8
PhysPortId uint8
LogPortId uint8
}
Port Identification
type PortLinkStat ¶
type PortLinkStat struct {
Partition uint8
Stack uint8
StackId uint8
Upstream uint8
PhysPortId uint8
LogPortId uint8
CfgLinkWidth uint8
NegLinkWidth uint8
LinkUp bool
LinkGen uint8
LinkState PortLinkState
CurLinkRateGBps float64
}
PortLinkStat -
type PortLinkState ¶
type PortLinkState uint16
const ( PortLinkState_Detect PortLinkState = 0x0000 PortLinkState_Polling PortLinkState = 0x0001 PortLinkState_Config PortLinkState = 0x0002 PortLinkState_L0 PortLinkState = 0x0003 PortLinkState_Recovery PortLinkState = 0x0004 PortLinkState_Disable PortLinkState = 0x0005 PortLinkState_LoopBack PortLinkState = 0x0006 PortLinkState_HotReset PortLinkState = 0x0007 PortLinkState_TxL0s PortLinkState = 0x0008 PortLinkState_L1 PortLinkState = 0x0009 PortLinkState_L2 PortLinkState = 0x000A PortLinkState_Unknown PortLinkState = 0x00FF )
type SubCommand ¶
type SubCommand uint8
SubCommand -
const ( SetupEventCounterSubCommand SubCommand = 0 GetBandwidthCounterSubCommand SubCommand = 1 GetEventCounterSubCommand SubCommand = 2 GetEventCounterSetupSubCommand SubCommand = 3 SetupLatencyCounterSubCommand SubCommand = 4 GetLatencyCounterSetupSubCommand SubCommand = 5 GetLatencyCounterSubCommand SubCommand = 6 SetBandwidthCounterSubCommand SubCommand = 12 PortBindSubCommand SubCommand = 1 PortUnbindSubCommand SubCommand = 2 PartitionInfoGetAllInfoSubCommand SubCommand = 0 PartitionInfoGetMetadataSubCommand SubCommand = 1 TopologyInfoDumpStartSubCommand SubCommand = 1 TopologyInfoDumpStatusGetSubCommand SubCommand = 2 TopologyInfoDumpDataGetSubCommand SubCommand = 3 TopologyInfoDumpFinishSubCommand SubCommand = 4 GfmsDumpStartSubCommand = 1 GfmsDumpGetSubCommand = 2 GfmsDumpFinishSubCommand = 3 NvmeAdminPassthruStart SubCommand = 1 NvmeAdminPassthruData SubCommand = 2 NvmeAdminPassthruEnd SubCommand = 3 ClearGfmsEventsSubCommand SubCommand = 0 GetGfmsEventsSubCommand SubCommand = 1 )