1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 00:10:24 +08:00
Files
gozel/sysm_fabric.go
2026-03-24 00:49:26 +08:00

452 lines
23 KiB
Go

// Code generated by cmd/gen. DO NOT EDIT.
/*
*
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file zes_api.h
* @version v1.15-r1.15.31
*
*/
package gozel
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZES_MAX_FABRIC_PORT_MODEL_SIZE Maximum Fabric port model string size
const ZES_MAX_FABRIC_PORT_MODEL_SIZE = 256
// ZES_MAX_FABRIC_LINK_TYPE_SIZE Maximum size of the buffer that will return information about link
/// types
const ZES_MAX_FABRIC_LINK_TYPE_SIZE = 256
// ZesFabricPortStatus (zes_fabric_port_status_t) Fabric port status
type ZesFabricPortStatus uintptr
const (
ZES_FABRIC_PORT_STATUS_UNKNOWN ZesFabricPortStatus = 0 // ZES_FABRIC_PORT_STATUS_UNKNOWN The port status cannot be determined
ZES_FABRIC_PORT_STATUS_HEALTHY ZesFabricPortStatus = 1 // ZES_FABRIC_PORT_STATUS_HEALTHY The port is up and operating as expected
ZES_FABRIC_PORT_STATUS_DEGRADED ZesFabricPortStatus = 2 // ZES_FABRIC_PORT_STATUS_DEGRADED The port is up but has quality and/or speed degradation
ZES_FABRIC_PORT_STATUS_FAILED ZesFabricPortStatus = 3 // ZES_FABRIC_PORT_STATUS_FAILED Port connection instabilities are preventing workloads making forward
///< progress
ZES_FABRIC_PORT_STATUS_DISABLED ZesFabricPortStatus = 4 // ZES_FABRIC_PORT_STATUS_DISABLED The port is configured down
ZES_FABRIC_PORT_STATUS_FORCE_UINT32 ZesFabricPortStatus = 0x7fffffff // ZES_FABRIC_PORT_STATUS_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_STATUS_* ENUMs
)
// ZesFabricPortQualIssueFlags (zes_fabric_port_qual_issue_flags_t) Fabric port quality degradation reasons
type ZesFabricPortQualIssueFlags uint32
const (
ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS ZesFabricPortQualIssueFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS Excessive link errors are occurring
ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED ZesFabricPortQualIssueFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED There is a degradation in the bitrate and/or width of the link
ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 ZesFabricPortQualIssueFlags = 0x7fffffff // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_* ENUMs
)
// ZesFabricPortFailureFlags (zes_fabric_port_failure_flags_t) Fabric port failure reasons
type ZesFabricPortFailureFlags uint32
const (
ZES_FABRIC_PORT_FAILURE_FLAG_FAILED ZesFabricPortFailureFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_FABRIC_PORT_FAILURE_FLAG_FAILED A previously operating link has failed. Hardware will automatically
///< retrain this port. This state will persist until either the physical
///< connection is removed or the link trains successfully.
ZES_FABRIC_PORT_FAILURE_FLAG_TRAINING_TIMEOUT ZesFabricPortFailureFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_FABRIC_PORT_FAILURE_FLAG_TRAINING_TIMEOUT A connection has not been established within an expected time.
///< Hardware will continue to attempt port training. This status will
///< persist until either the physical connection is removed or the link
///< successfully trains.
ZES_FABRIC_PORT_FAILURE_FLAG_FLAPPING ZesFabricPortFailureFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZES_FABRIC_PORT_FAILURE_FLAG_FLAPPING Port has excessively trained and then transitioned down for some
///< period of time. Driver will allow port to continue to train, but will
///< not enable the port for use until the port has been disabled and
///< subsequently re-enabled using ::zesFabricPortSetConfig().
ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 ZesFabricPortFailureFlags = 0x7fffffff // ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_FAILURE_FLAG_* ENUMs
)
// ZesFabricPortId (zes_fabric_port_id_t) Unique identifier for a fabric port
///
/// @details
/// - This not a universal identifier. The identified is garanteed to be
/// unique for the current hardware configuration of the system. Changes
/// in the hardware may result in a different identifier for a given port.
/// - The main purpose of this identifier to build up an instantaneous
/// topology map of system connectivity. An application should enumerate
/// all fabric ports and match the `remotePortId` member of
/// ::zes_fabric_port_state_t to the `portId` member of
/// ::zes_fabric_port_properties_t.
type ZesFabricPortId struct {
Fabricid uint32 // Fabricid [out] Unique identifier for the fabric end-point
Attachid uint32 // Attachid [out] Unique identifier for the device attachment point
Portnumber uint8 // Portnumber [out] The logical port number (this is typically marked somewhere on the physical device)
}
// ZesFabricPortSpeed (zes_fabric_port_speed_t) Fabric port speed in one direction
type ZesFabricPortSpeed struct {
Bitrate int64 // Bitrate [out] Bits/sec that the link is operating at. A value of -1 means that this property is unknown.
Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown.
}
// ZesFabricPortProperties (zes_fabric_port_properties_t) Fabric port properties
type ZesFabricPortProperties struct {
Stype ZesStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Model [ZES_MAX_FABRIC_PORT_MODEL_SIZE]byte // Model [out] Description of port technology. Will be set to the string "unkown" if this cannot be determined for this port.
Onsubdevice ZeBool // Onsubdevice [out] True if the port is located on a sub-device; false means that the port is on the device of the calling Sysman handle
Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device
Portid ZesFabricPortId // Portid [out] The unique port identifier
Maxrxspeed ZesFabricPortSpeed // Maxrxspeed [out] Maximum speed supported by the receive side of the port (sum of all lanes)
Maxtxspeed ZesFabricPortSpeed // Maxtxspeed [out] Maximum speed supported by the transmit side of the port (sum of all lanes)
}
// ZesFabricLinkType (zes_fabric_link_type_t) Provides information about the fabric link attached to a port
type ZesFabricLinkType struct {
Desc [ZES_MAX_FABRIC_LINK_TYPE_SIZE]byte // Desc [out] Description of link technology. Will be set to the string "unkown" if this cannot be determined for this link.
}
// ZesFabricPortConfig (zes_fabric_port_config_t) Fabric port configuration
type ZesFabricPortConfig struct {
Stype ZesStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Enabled ZeBool // Enabled [in,out] Port is configured up/down
Beaconing ZeBool // Beaconing [in,out] Beaconing is configured on/off
}
// ZesFabricPortState (zes_fabric_port_state_t) Fabric port state
type ZesFabricPortState struct {
Stype ZesStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Status ZesFabricPortStatus // Status [out] The current status of the port
Qualityissues ZesFabricPortQualIssueFlags // Qualityissues [out] If status is ::ZES_FABRIC_PORT_STATUS_DEGRADED, then this gives a combination of ::zes_fabric_port_qual_issue_flag_t for quality issues that have been detected; otherwise, 0 indicates there are no quality issues with the link at this time.
Failurereasons ZesFabricPortFailureFlags // Failurereasons [out] If status is ::ZES_FABRIC_PORT_STATUS_FAILED, then this gives a combination of ::zes_fabric_port_failure_flag_t for reasons for the connection instability; otherwise, 0 indicates there are no connection stability issues at this time.
Remoteportid ZesFabricPortId // Remoteportid [out] The unique port identifier for the remote connection point if status is ::ZES_FABRIC_PORT_STATUS_HEALTHY, ::ZES_FABRIC_PORT_STATUS_DEGRADED or ::ZES_FABRIC_PORT_STATUS_FAILED
Rxspeed ZesFabricPortSpeed // Rxspeed [out] Current maximum receive speed (sum of all lanes)
Txspeed ZesFabricPortSpeed // Txspeed [out] Current maximum transmit speed (sum of all lanes)
}
// ZesFabricPortThroughput (zes_fabric_port_throughput_t) Fabric port throughput.
type ZesFabricPortThroughput struct {
Timestamp uint64 // Timestamp [out] Monotonic timestamp counter in microseconds when the measurement was made. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution.
Rxcounter uint64 // Rxcounter [out] Monotonic counter for the number of bytes received (sum of all lanes). This includes all protocol overhead, not only the GPU traffic.
Txcounter uint64 // Txcounter [out] Monotonic counter for the number of bytes transmitted (sum of all lanes). This includes all protocol overhead, not only the GPU traffic.
}
// ZesFabricPortErrorCounters (zes_fabric_port_error_counters_t) Fabric Port Error Counters
type ZesFabricPortErrorCounters struct {
Stype ZesStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Linkfailurecount uint64 // Linkfailurecount [out] Link Failure Error Count reported per port
Fwcommerrorcount uint64 // Fwcommerrorcount [out] Firmware Communication Error Count reported per device
Fwerrorcount uint64 // Fwerrorcount [out] Firmware reported Error Count reported per device
Linkdegradecount uint64 // Linkdegradecount [out] Link Degrade Error Count reported per port
}
// ZesDeviceEnumFabricPorts Get handle of Fabric ports in a device
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZesDeviceEnumFabricPorts(
hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device.
pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components.
phPort *ZesFabricPortHandle, // phPort [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesDeviceEnumFabricPorts", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phPort)))
}
// ZesFabricPortGetProperties Get Fabric port properties
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hPort`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pProperties`
func ZesFabricPortGetProperties(
hPort ZesFabricPortHandle, // hPort [in] Handle for the component.
pProperties *ZesFabricPortProperties, // pProperties [in,out] Will contain properties of the Fabric Port.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortGetProperties", uintptr(hPort), uintptr(unsafe.Pointer(pProperties)))
}
// ZesFabricPortGetLinkType Get Fabric port link type
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hPort`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pLinkType`
func ZesFabricPortGetLinkType(
hPort ZesFabricPortHandle, // hPort [in] Handle for the component.
pLinkType *ZesFabricLinkType, // pLinkType [in,out] Will contain details about the link attached to the Fabric port.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortGetLinkType", uintptr(hPort), uintptr(unsafe.Pointer(pLinkType)))
}
// ZesFabricPortGetConfig Get Fabric port configuration
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hPort`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pConfig`
func ZesFabricPortGetConfig(
hPort ZesFabricPortHandle, // hPort [in] Handle for the component.
pConfig *ZesFabricPortConfig, // pConfig [in,out] Will contain configuration of the Fabric Port.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortGetConfig", uintptr(hPort), uintptr(unsafe.Pointer(pConfig)))
}
// ZesFabricPortSetConfig Set Fabric port configuration
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hPort`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pConfig`
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// + User does not have permissions to make these modifications.
func ZesFabricPortSetConfig(
hPort ZesFabricPortHandle, // hPort [in] Handle for the component.
pConfig *ZesFabricPortConfig, // pConfig [in] Contains new configuration of the Fabric Port.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortSetConfig", uintptr(hPort), uintptr(unsafe.Pointer(pConfig)))
}
// ZesFabricPortGetState Get Fabric port state - status (health/degraded/failed/disabled),
/// reasons for link degradation or instability, current rx/tx speed
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hPort`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pState`
func ZesFabricPortGetState(
hPort ZesFabricPortHandle, // hPort [in] Handle for the component.
pState *ZesFabricPortState, // pState [in,out] Will contain the current state of the Fabric Port
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortGetState", uintptr(hPort), uintptr(unsafe.Pointer(pState)))
}
// ZesFabricPortGetThroughput Get Fabric port throughput
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hPort`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pThroughput`
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// + User does not have permissions to query this telemetry.
func ZesFabricPortGetThroughput(
hPort ZesFabricPortHandle, // hPort [in] Handle for the component.
pThroughput *ZesFabricPortThroughput, // pThroughput [in,out] Will contain the Fabric port throughput counters.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortGetThroughput", uintptr(hPort), uintptr(unsafe.Pointer(pThroughput)))
}
// ZesFabricPortGetFabricErrorCounters Get Fabric Port Error Counters
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
/// - The memory backing the arrays for phPorts and ppThroughputs must be
/// allocated in system memory by the user who is also responsible for
/// releasing them when they are no longer needed.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hPort`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pErrors`
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// + User does not have permissions to query this telemetry.
func ZesFabricPortGetFabricErrorCounters(
hPort ZesFabricPortHandle, // hPort [in] Handle for the component.
pErrors *ZesFabricPortErrorCounters, // pErrors [in,out] Will contain the Fabric port Error counters.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortGetFabricErrorCounters", uintptr(hPort), uintptr(unsafe.Pointer(pErrors)))
}
// ZesFabricPortGetMultiPortThroughput Get Fabric port throughput from multiple ports in a single call
///
/// @details
/// - The application may call this function from simultaneous threads.
/// - The implementation of this function should be lock-free.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
/// - ::ZE_RESULT_ERROR_UNKNOWN
/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
/// + `nullptr == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phPort`
/// + `nullptr == pThroughput`
func ZesFabricPortGetMultiPortThroughput(
hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device.
numPorts uint32, // numPorts [in] Number of ports enumerated in function ::zesDeviceEnumFabricPorts
phPort *ZesFabricPortHandle, // phPort [in][range(0, numPorts)] array of fabric port handles provided by user to gather throughput values.
pThroughput **ZesFabricPortThroughput, // pThroughput [out][range(0, numPorts)] array of fabric port throughput counters from multiple ports of type ::zes_fabric_port_throughput_t.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zesFabricPortGetMultiPortThroughput", uintptr(hDevice), uintptr(numPorts), uintptr(unsafe.Pointer(phPort)), uintptr(unsafe.Pointer(pThroughput)))
}