40 #ifndef OPENAPI_BST_H_INCLUDED
41 #define OPENAPI_BST_H_INCLUDED
51 #define OPEN_ASIC_ICOS_MAX_PORTS 300
52 #define OPEN_ASIC_MAX_PORTS OPEN_ASIC_ICOS_MAX_PORTS
55 #define OPEN_ASIC_ICOS_BST_MAX_PORTS 300
56 #define OPEN_ASIC_BST_MAX_PORTS OPEN_ASIC_ICOS_BST_MAX_PORTS
58 #define OPEN_ASIC_MAX_UC_QUEUES 16384
60 #define OPEN_ASIC_MAX_UC_QUEUE_GROUPS 4096
62 #define OPEN_ASIC_MAX_MC_QUEUES 1040
64 #define OPEN_ASIC_MAX_SERVICE_POOLS 4
66 #define OPEN_ASIC_MAX_COMMON_POOLS 1
68 #define OPEN_ASIC_MAX_CPU_QUEUES 8
70 #define OPEN_ASIC_MAX_RQE_QUEUES 11
72 #define OPEN_ASIC_MAX_RQE_QUEUE_POOLS 4
74 #define OPEN_ASIC_MAX_PRIORITY_GROUPS 8
76 #define OPEN_SYSTEM_NUM_COS_PORT 8
79 #define OPEN_ASIC_MAX_INGRESS_SERVICE_POOLS \
80 (OPEN_ASIC_MAX_SERVICE_POOLS + OPEN_ASIC_MAX_COMMON_POOLS)
82 #define OPEN_ASIC_MAX_UC_MC_QUEUES (OPEN_ASIC_MAX_UC_QUEUES + OPEN_ASIC_MAX_MC_QUEUES)
84 #define OPEN_BST_INVALID_THRESHOLD_FIELD_32 0xFFFFFFFF
85 #define OPEN_BST_INVALID_THRESHOLD_FIELD 0xFFFFFFFFFFFFFFFFLL
124 uint64_t bufferCount;
132 uint32_t umShareBufferCount;
133 uint32_t umHeadroomBufferCount;
143 uint32_t umShareBufferCount;
153 uint64_t umShareBufferCount;
163 uint32_t ucShareBufferCount;
164 uint32_t umShareBufferCount;
165 uint32_t mcShareBufferCount;
166 uint32_t mcShareQueueEntries;
176 uint64_t umShareBufferCount;
177 uint64_t mcShareBufferCount;
178 uint64_t mcShareQueueEntries;
188 uint64_t ucBufferCount;
190 } data[OPEN_ASIC_MAX_UC_MC_QUEUES];
199 uint64_t ucBufferCount;
209 uint64_t mcBufferCount;
210 uint64_t mcQueueEntries;
212 } data[OPEN_ASIC_MAX_UC_MC_QUEUES];
221 uint64_t cpuBufferCount;
222 uint64_t cpuQueueEntries;
232 uint64_t rqeBufferCount;
233 uint64_t rqeQueueEntries;
285 OPEN_BST_MODE_CURRENT = 1,
286 OPEN_BST_MODE_PEAK = 2
297 bool enableIngressStatsMonitoring;
298 bool enableEgressStatsMonitoring;
308 OPEN_BST_TRIGGER_DEVICE = 1,
309 OPEN_BST_TRIGGER_INGRESS = 2,
310 OPEN_BST_TRIGGER_EGRESS = 4
313 #define BVIEW_MAX_STRING_NAME_LEN 256
317 char realm[BVIEW_MAX_STRING_NAME_LEN];
318 char counter[BVIEW_MAX_STRING_NAME_LEN];
326 uint64_t ucShareThreshold;
327 uint64_t umShareThreshold;
328 uint64_t mcShareThreshold;
329 uint64_t mcShareQueueEntriesThreshold;
341 uint64_t umShareThreshold;
342 uint64_t umHeadroomThreshold;
348 uint64_t umShareThreshold;
354 uint64_t umShareThreshold;
360 uint64_t umShareThreshold;
361 uint64_t mcShareThreshold;
367 uint64_t ucBufferThreshold;
373 uint64_t ucBufferThreshold;
379 uint64_t mcBufferThreshold;
380 uint64_t mcQueueThreshold;
386 uint64_t cpuBufferThreshold;
387 uint64_t cpuQueueThreshold;
393 uint64_t rqeBufferThreshold;
394 uint64_t rqeQueueThreshold;
414 OPEN_BST_DEVICE_THRESHOLD = 1,
415 OPEN_BST_EGRESS_PORT_SP_THRESHOLD,
416 OPEN_BST_EGRESS_SP_THRESHOLD,
417 OPEN_BST_EGRESS_UC_QUEUE_THRESHOLD,
418 OPEN_BST_EGRESS_UC_QUEUEGROUPS_THRESHOLD,
419 OPEN_BST_EGRESS_MC_QUEUE_THRESHOLD,
420 OPEN_BST_EGRESS_CPU_QUEUE_THRESHOLD,
421 OPEN_BST_EGRESS_RQE_QUEUE_THRESHOLD,
422 OPEN_BST_INGRESS_PORT_PG_THRESHOLD,
423 OPEN_BST_INGRESS_PORT_SP_THRESHOLD,
424 OPEN_BST_INGRESS_SP_THRESHOLD
821 int asic,
int port,
int pg,
841 int asic,
int port,
int sp,
889 int asic,
int port,
int sp,
934 int asic,
int ucQueue,
961 int asic,
int ucQueueGrp,
980 int asic,
int mcQueue,
999 int asic,
int cpuQueue,
1018 int asic,
int rqeQueue,
1196 int asic,
int port,
int queue,
1197 uint64_t *dropCount);
1216 int asic,
int port,
int queue,
1217 uint64_t *dropCount);
1235 uint64_t *dropCount);
1274 int asic,
int realmMask,
1310 int asic,
int realmMask,
open_error_t openapiBstThresholdsClear(openapiClientHandle_t *clientHandle, int asic)
Restore threshold configuration.
int numPorts
Number of ports of Asic.
open_error_t openapiClearInstruConfig(openapiClientHandle_t *clientHandle, int asic)
Clear all persistent instrumentation related configurations from fastpath.
open_error_t openapiBstEucqDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_EGRESS_UC_QUEUE_DATA_t *data, time_t *time)
Obtain Egress Unicast Queues Statistics.
open_error_t openapiBstDefaultSnapshotGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_ASIC_SNAPSHOT_DATA_t *data1, OPEN_BST_EGRESS_UC_QUEUE_DATA_t *data2, OPEN_BST_EGRESS_MC_QUEUE_DATA_t *data3)
Obtain Complete ASIC Default Statistics Report.
#define OPEN_SYSTEM_NUM_COS_PORT
Number of maximum COS queue per port.
Profile configuration for CPU Queues.
Buffer Count for Ingress Port + Service Pools.
Buffer Count for Ingress Service Pools.
open_error_t openapiBstConfigGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_CONFIG_t *bstCfg)
BST feature configuration get function.
Structure of cosq H/W queue map version 2.
bool enableStatsMonitoring
enable the feature
open_error_t openapiBstTriggerEnable(openapiClientHandle_t *clientHandle, int asic, int enable, int pid, int *clientId)
Enable BST trigger event in network operating system.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiBstIpspThresholdSet(openapiClientHandle_t *clientHandle, int asic, int port, int sp, OPEN_BST_INGRESS_PORT_SP_THRESHOLD_t *thre)
Set profile configuration for Ingress Port + Service Pools Statistics.
open_error_t openapiBstMultiRealmThresholdSet(openapiClientHandle_t *clientHandle, int asic, int realmMask, open_buffdesc *compSnapshot, OPEN_BST_ERROR_DATA_t *errorData)
Set threshold configurations for multiple realms.
open_error_t openapiBstEmcqThresholdSet(openapiClientHandle_t *clientHandle, int asic, int mcQueue, OPEN_BST_EGRESS_MC_QUEUE_THRESHOLD_t *thre)
Set profile configuration for Egress Multicast Queues Statistics.
int cellToByteConv
MMU Cell to BYTE conversion.
enum _open_bst_threshold_realm_ OPEN_BST_THRESHOLD_TYPE_t
Threshold types enum.
#define OPEN_ASIC_MAX_SERVICE_POOLS
Number of maximum common pools.
A Complete Data set for a 'snapshot'.
Structure of port-cosq-hwqueue map version 2.
_open_bst_threshold_realm_
Threshold types enum.
open_error_t openapiBstEucqThresholdSet(openapiClientHandle_t *clientHandle, int asic, int ucQueue, OPEN_BST_EGRESS_UC_QUEUE_THRESHOLD_t *thre)
Set profile configuration for Egress Unicast Queues Statistics.
open_error_t openapiBstEucqgDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_EGRESS_UC_QUEUEGROUPS_DATA_t *data, time_t *time)
Obtain Egress Unicast Queue Groups Statistics.
bool support1588
can this ASIC provide accurate time ?
open_error_t openapiBstCgsnDropCtrsClear(openapiClientHandle_t *clientHandle, int asic)
Clear congestion drop counters.
open_error_t openapiBstEmcqDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_EGRESS_MC_QUEUE_DATA_t *data, time_t *time)
Obtain Egress Multicast Queues Statistics.
Profile configuration for Ingress Service Pools.
open_error_t openapiBstRqeqDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_EGRESS_RQE_QUEUE_DATA_t *data, time_t *time)
Obtain RQE Queues Statistics.
Profile configuration for RQE Queues.
Structure of cosq H/W queue map.
int numUnicastQueueGroups
Number of unicast queue groups.
open_error_t openapiBstTriggerDeRegister(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_TRIGGER_CALLBACK_t openCallback, void *context)
DeRegister BST trigger callback.
open_error_t openapiBstStatsClear(openapiClientHandle_t *clientHandle, int asic)
Clear stats.
open_error_t openapiBstIppgDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_INGRESS_PORT_PG_DATA_t *data, time_t *time)
Obtain Ingress Port + Priority Groups Statistics.
Buffer Count for RQE Queues.
open_error_t openapiBstConfigSet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_CONFIG_t *bstCfg)
BST feature configuration set function.
OPEN_BST_EGRESS_PORT_SP_DATA_t ePortSp
Egress Section.
open_error_t openapiBstIppgThresholdSet(openapiClientHandle_t *clientHandle, int asic, int port, int pg, OPEN_BST_INGRESS_PORT_PG_THRESHOLD_t *thre)
Set profile configuration for Ingress Port + Priority Groups Statistics.
int numRqeQueuePools
Number of RQE queue pools.
Profile configuration for Egress Service Pools.
#define OPEN_ASIC_MAX_INGRESS_SERVICE_POOLS
Number of maximum total service pools.
Profile configuration for Egress Unicast Queue Groups.
#define OPEN_ASIC_MAX_RQE_QUEUES
Number of maximum RQE queues.
open_error_t openapiPortMappingGet(openapiClientHandle_t *clientHandle, int asic, OPEN_ASIC_PORT_MAP_t *data)
Get port map data for bcm to front panel port conversion.
open_error_t openapiBstSnapshotGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_ASIC_SNAPSHOT_DATA_t *data1, OPEN_BST_EGRESS_UC_QUEUE_DATA_t *data2, OPEN_BST_EGRESS_MC_QUEUE_DATA_t *data3, time_t *time)
Obtain Complete ASIC Statistics Report.
int numMulticastQueues
Number of multicast queues.
#define OPEN_ASIC_MAX_CPU_QUEUES
Number of maximum CPU queues.
open_error_t openapiBstTriggerRegister(openapiClientHandle_t *clientHandle, int asic, int clientId, OPEN_BST_TRIGGER_CALLBACK_t openCallback, void *context)
Register BST trigger callback.
open_error_t openapiBstPortTotalCgsDropGet(openapiClientHandle_t *clientHandle, int asic, int port, uint64_t *dropCount)
Get total congestion drop counter.
open_error_t openapiBstIspThresholdSet(openapiClientHandle_t *clientHandle, int asic, int sp, OPEN_BST_INGRESS_SP_THRESHOLD_t *thre)
Set profile configuration for Ingress Service Pools Statistics.
open_error_t openapiBstCpuqDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_EGRESS_CPU_QUEUE_DATA_t *data, time_t *time)
Obtain CPU Queues Statistics.
struct _open_bst_error_data_ OPEN_BST_ERROR_DATA_t
Structure to hold error info during multi threshold set.
Profile configuration for Egress Unicast Queues.
Buffer Count for the device.
bool enableDeviceStatsMonitoring
For enabling selectively.
OPEN_BST_COLLECTION_MODE
Statistics collection mode.
OPEN_BST_DEVICE_DATA_t device
Device Section.
int numRqeQueues
Number of RQE queues.
int numUnicastQueues
Number of unicast queues.
open_error_t openapiBstSnapshotCompressedGet(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *compSnapshot, time_t *time)
Obtain compressed complete ASIC Statistics Report.
open_error_t openapiBstPortUcastCgsDropGet(openapiClientHandle_t *clientHandle, int asic, int port, int queue, uint64_t *dropCount)
Get Unicast congestion drop counter of a particular port-queue combination.
open_error_t openapiBstDeviceThresholdSet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_DEVICE_THRESHOLD_t *thre)
Set profile configuration for Device Statistics.
Buffer Count for Egress Service Pools.
Buffer Count for Ingress Port + Priority Groups.
Profile configuration for Ingress Port + Priority Groups.
open_error_t openapiBstThresholdGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_ASIC_SNAPSHOT_DATA_t *thre1, OPEN_BST_EGRESS_UC_QUEUE_DATA_t *thre2, OPEN_BST_EGRESS_MC_QUEUE_DATA_t *thre3, time_t *time)
Get snapshot of all thresholds configured.
OPEN_BST_INGRESS_PORT_PG_DATA_t iPortPg
Ingress Section.
#define OPEN_ASIC_MAX_PRIORITY_GROUPS
Number of maximum priority groups.
open_error_t openapiBstIspDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_INGRESS_SP_DATA_t *data, time_t *time)
Obtain Ingress Service Pools Statistics.
int numCpuQueues
Number of CPU queues.
Buffer Count for Egress Unicast Queues.
open_error_t openapiBstPortMcastCgsDropGet(openapiClientHandle_t *clientHandle, int asic, int port, int queue, uint64_t *dropCount)
Get Multicast congestion drop counter of a particular port-queue combination.
open_error_t openapiBstMultiThresholdSet(openapiClientHandle_t *clientHandle, int asic, int realmMask, open_buffdesc *compSnapshot)
Set threshold configurations for multiple realms.
#define OPEN_ASIC_ICOS_MAX_PORTS
OPEN_ASIC_ICOS_MAX_PORTS may be deprecated in the future, use OPEN_ASIC_MAX_PORTS.
#define OPEN_ASIC_MAX_UC_QUEUE_GROUPS
Number of maximum unicast queue groups.
open_error_t openapiBstRqeqThresholdSet(openapiClientHandle_t *clientHandle, int asic, int rqeQueue, OPEN_BST_EGRESS_RQE_QUEUE_THRESHOLD_t *thre)
Set profile configuration for Egress RQE Queues Statistics.
OPEN_BST_INGRESS_PORT_PG_DATA_t iPortPg
Ingress Section.
OPEN_BST_COLLECTION_MODE mode
Statistics collection mode.
open_error_t(* OPEN_BST_TRIGGER_CALLBACK_t)(int asic, void *handle, OPEN_BST_TRIGGER_INFO_t *info)
Callback to be invoked when a configured threshold is breached.
Structure of port-cosq-hwqueue map.
open_error_t openapiBstIpspDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_INGRESS_PORT_SP_DATA_t *data, time_t *time)
Obtain Ingress Port + Service Pools Statistics.
OPEN_BST_TRIGGER_TYPE
Trigger Type.
Profile configuration for the device level buffers.
Profile configuration for Ingress Port + Service Pools.
open_error_t openapiBstDeviceDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_DEVICE_DATA_t *data, time_t *time)
Obtain Device Statistics.
open_error_t openapiBstEpspThresholdSet(openapiClientHandle_t *clientHandle, int asic, int port, int sp, OPEN_BST_EGRESS_PORT_SP_THRESHOLD_t *thre)
Set Profile configuration for Egress Port + Service Pools Statistics.
Structure to hold error info during multi threshold set.
OPEN_BST_EGRESS_PORT_SP_DATA_t ePortSp
Egress Section.
Buffer Count for Egress Multicast Queues.
open_error_t openapiBstEucqgThresholdSet(openapiClientHandle_t *clientHandle, int asic, int ucQueueGrp, OPEN_BST_EGRESS_UC_QUEUEGROUPS_THRESHOLD_t *thre)
Set profile configuration for Egress Unicast Queue Groups Statistics.
open_error_t openapiBstEspDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_EGRESS_SP_DATA_t *data, time_t *time)
Obtain Egress Service Pools Statistics.
Profile configuration for Egress Port + Service Pools.
Buffer Count for Egress Port + Service Pools.
Buffer Count for CPU Queues.
Buffer Count for Egress Unicast Queue Groups.
int numPriorityGroups
Number of priority groups.
open_error_t openapiBstCpuqThresholdSet(openapiClientHandle_t *clientHandle, int asic, int cpuQueue, OPEN_BST_EGRESS_CPU_QUEUE_THRESHOLD_t *thre)
Set profile configuration for Egress CPU Queues Statistics.
open_error_t openapiBstAsicCapabilityGet(openapiClientHandle_t *clientHandle, int asic, OPEN_ASIC_CAPABILITIES_t *asicCap)
BST feature configuration get function.
open_error_t openapiBstEspThresholdSet(openapiClientHandle_t *clientHandle, int asic, int sp, OPEN_BST_EGRESS_SP_THRESHOLD_t *thre)
Set profile configuration for Egress Service Pools Statistics.
Profile configuration for Egress Multicast Queues.
open_error_t openapiBstThresholdCompressedGet(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *compSnapshot, time_t *time)
Get compressed snapshot of all thresholds configured.
OPEN_BST_DEVICE_DATA_t device
Device Section.
int numCommonPools
Number of common pools.
int numServicePools
Number of service pools.
open_error_t openapiBstEpspDataGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_EGRESS_PORT_SP_DATA_t *data, time_t *time)
Obtain Egress Service Pools Statistics.
A Complete Data set for a 'snapshot'.