SAI Metadata
Loading...
Searching...
No Matches
SAI - Debug counter specific API definitions

Classes

struct  _sai_debug_counter_api_t
 Counter methods table retrieved with sai_api_query() More...
 

Typedefs

typedef enum _sai_debug_counter_type_t sai_debug_counter_type_t
 Debug counter type.
 
typedef enum _sai_debug_counter_bind_method_t sai_debug_counter_bind_method_t
 Debug counter bind method.
 
typedef enum _sai_in_drop_reason_t sai_in_drop_reason_t
 Attribute data for in drop reasons.
 
typedef enum _sai_out_drop_reason_t sai_out_drop_reason_t
 Attribute data for out drop reasons.
 
typedef enum _sai_debug_counter_attr_t sai_debug_counter_attr_t
 Attribute Id in sai_set_counter_attribute() and sai_get_counter_attribute() calls.
 
typedef sai_status_t(* sai_create_debug_counter_fn) (_Out_ sai_object_id_t *debug_counter_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create debug counter.
 
typedef sai_status_t(* sai_remove_debug_counter_fn) (_In_ sai_object_id_t debug_counter_id)
 Remove debug counter.
 
typedef sai_status_t(* sai_set_debug_counter_attribute_fn) (_In_ sai_object_id_t debug_counter_id, _In_ const sai_attribute_t *attr)
 Set debug counter attribute Value.
 
typedef sai_status_t(* sai_get_debug_counter_attribute_fn) (_In_ sai_object_id_t debug_counter_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get debug counter attribute Value.
 
typedef struct _sai_debug_counter_api_t sai_debug_counter_api_t
 Counter methods table retrieved with sai_api_query()
 

Enumerations

enum  _sai_debug_counter_type_t { SAI_DEBUG_COUNTER_TYPE_PORT_IN_DROP_REASONS , SAI_DEBUG_COUNTER_TYPE_PORT_OUT_DROP_REASONS , SAI_DEBUG_COUNTER_TYPE_SWITCH_IN_DROP_REASONS , SAI_DEBUG_COUNTER_TYPE_SWITCH_OUT_DROP_REASONS }
 Debug counter type. More...
 
enum  _sai_debug_counter_bind_method_t { SAI_DEBUG_COUNTER_BIND_METHOD_AUTOMATIC }
 Debug counter bind method. More...
 
enum  _sai_in_drop_reason_t {
  SAI_IN_DROP_REASON_START , SAI_IN_DROP_REASON_L2_ANY = SAI_IN_DROP_REASON_START , SAI_IN_DROP_REASON_SMAC_MULTICAST , SAI_IN_DROP_REASON_SMAC_EQUALS_DMAC ,
  SAI_IN_DROP_REASON_DMAC_RESERVED , SAI_IN_DROP_REASON_VLAN_TAG_NOT_ALLOWED , SAI_IN_DROP_REASON_INGRESS_VLAN_FILTER , SAI_IN_DROP_REASON_INGRESS_STP_FILTER ,
  SAI_IN_DROP_REASON_FDB_UC_DISCARD , SAI_IN_DROP_REASON_FDB_MC_DISCARD , SAI_IN_DROP_REASON_L2_LOOPBACK_FILTER , SAI_IN_DROP_REASON_EXCEEDS_L2_MTU ,
  SAI_IN_DROP_REASON_L3_ANY , SAI_IN_DROP_REASON_EXCEEDS_L3_MTU , SAI_IN_DROP_REASON_TTL , SAI_IN_DROP_REASON_L3_LOOPBACK_FILTER ,
  SAI_IN_DROP_REASON_NON_ROUTABLE , SAI_IN_DROP_REASON_NO_L3_HEADER , SAI_IN_DROP_REASON_IP_HEADER_ERROR , SAI_IN_DROP_REASON_UC_DIP_MC_DMAC ,
  SAI_IN_DROP_REASON_DIP_LOOPBACK , SAI_IN_DROP_REASON_SIP_LOOPBACK , SAI_IN_DROP_REASON_SIP_MC , SAI_IN_DROP_REASON_SIP_CLASS_E ,
  SAI_IN_DROP_REASON_SIP_UNSPECIFIED , SAI_IN_DROP_REASON_MC_DMAC_MISMATCH , SAI_IN_DROP_REASON_SIP_EQUALS_DIP , SAI_IN_DROP_REASON_SIP_BC ,
  SAI_IN_DROP_REASON_DIP_LOCAL , SAI_IN_DROP_REASON_DIP_LINK_LOCAL , SAI_IN_DROP_REASON_SIP_LINK_LOCAL , SAI_IN_DROP_REASON_IPV6_MC_SCOPE0 ,
  SAI_IN_DROP_REASON_IPV6_MC_SCOPE1 , SAI_IN_DROP_REASON_IRIF_DISABLED , SAI_IN_DROP_REASON_ERIF_DISABLED , SAI_IN_DROP_REASON_LPM4_MISS ,
  SAI_IN_DROP_REASON_LPM6_MISS , SAI_IN_DROP_REASON_BLACKHOLE_ROUTE , SAI_IN_DROP_REASON_BLACKHOLE_ARP , SAI_IN_DROP_REASON_UNRESOLVED_NEXT_HOP ,
  SAI_IN_DROP_REASON_L3_EGRESS_LINK_DOWN , SAI_IN_DROP_REASON_DECAP_ERROR , SAI_IN_DROP_REASON_ACL_ANY , SAI_IN_DROP_REASON_ACL_INGRESS_PORT ,
  SAI_IN_DROP_REASON_ACL_INGRESS_LAG , SAI_IN_DROP_REASON_ACL_INGRESS_VLAN , SAI_IN_DROP_REASON_ACL_INGRESS_RIF , SAI_IN_DROP_REASON_ACL_INGRESS_SWITCH ,
  SAI_IN_DROP_REASON_ACL_EGRESS_PORT , SAI_IN_DROP_REASON_ACL_EGRESS_LAG , SAI_IN_DROP_REASON_ACL_EGRESS_VLAN , SAI_IN_DROP_REASON_ACL_EGRESS_RIF ,
  SAI_IN_DROP_REASON_ACL_EGRESS_SWITCH , SAI_IN_DROP_REASON_FDB_AND_BLACKHOLE_DISCARDS , SAI_IN_DROP_REASON_MPLS_MISS , SAI_IN_DROP_REASON_SRV6_LOCAL_SID_DROP ,
  SAI_IN_DROP_REASON_END , SAI_IN_DROP_REASON_CUSTOM_RANGE_BASE = 0x10000000 , SAI_IN_DROP_REASON_CUSTOM_RANGE_END
}
 Attribute data for in drop reasons. More...
 
enum  _sai_out_drop_reason_t {
  SAI_OUT_DROP_REASON_START , SAI_OUT_DROP_REASON_L2_ANY = SAI_OUT_DROP_REASON_START , SAI_OUT_DROP_REASON_EGRESS_VLAN_FILTER , SAI_OUT_DROP_REASON_L3_ANY ,
  SAI_OUT_DROP_REASON_L3_EGRESS_LINK_DOWN , SAI_OUT_DROP_REASON_TUNNEL_LOOPBACK_PACKET_DROP , SAI_OUT_DROP_REASON_END , SAI_OUT_DROP_REASON_CUSTOM_RANGE_BASE = 0x10000000 ,
  SAI_OUT_DROP_REASON_CUSTOM_RANGE_END
}
 Attribute data for out drop reasons. More...
 
enum  _sai_debug_counter_attr_t {
  SAI_DEBUG_COUNTER_ATTR_START , SAI_DEBUG_COUNTER_ATTR_INDEX = SAI_DEBUG_COUNTER_ATTR_START , SAI_DEBUG_COUNTER_ATTR_TYPE , SAI_DEBUG_COUNTER_ATTR_BIND_METHOD ,
  SAI_DEBUG_COUNTER_ATTR_IN_DROP_REASON_LIST , SAI_DEBUG_COUNTER_ATTR_OUT_DROP_REASON_LIST , SAI_DEBUG_COUNTER_ATTR_END , SAI_DEBUG_COUNTER_ATTR_CUSTOM_RANGE_START = 0x10000000 ,
  SAI_DEBUG_COUNTER_ATTR_CUSTOM_RANGE_END
}
 Attribute Id in sai_set_counter_attribute() and sai_get_counter_attribute() calls. More...
 

Detailed Description

Typedef Documentation

◆ sai_create_debug_counter_fn

typedef sai_status_t(* sai_create_debug_counter_fn) (_Out_ sai_object_id_t *debug_counter_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create debug counter.

Parameters
[out]debug_counter_idDebug counter id
[in]switch_idSwitch id
[in]attr_countNumber of attributes
[in]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success

Definition at line 467 of file saidebugcounter.h.

◆ sai_get_debug_counter_attribute_fn

typedef sai_status_t(* sai_get_debug_counter_attribute_fn) (_In_ sai_object_id_t debug_counter_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get debug counter attribute Value.

Parameters
[in]debug_counter_idDebug counter id
[in]attr_countNumber of attributes
[in,out]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 504 of file saidebugcounter.h.

◆ sai_remove_debug_counter_fn

typedef sai_status_t(* sai_remove_debug_counter_fn) (_In_ sai_object_id_t debug_counter_id)

Remove debug counter.

Parameters
[in]debug_counter_idDebug counter id
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 480 of file saidebugcounter.h.

◆ sai_set_debug_counter_attribute_fn

typedef sai_status_t(* sai_set_debug_counter_attribute_fn) (_In_ sai_object_id_t debug_counter_id, _In_ const sai_attribute_t *attr)

Set debug counter attribute Value.

Parameters
[in]debug_counter_idDebug counter id
[in]attrAttribute
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 491 of file saidebugcounter.h.

Enumeration Type Documentation

◆ _sai_debug_counter_attr_t

Attribute Id in sai_set_counter_attribute() and sai_get_counter_attribute() calls.

Enumerator
SAI_DEBUG_COUNTER_ATTR_START 

Start of attributes.

SAI_DEBUG_COUNTER_ATTR_INDEX 

Object stat index Index is added to base start.

Value Type:
sai_uint32_t
Flags:
READ_ONLY
SAI_DEBUG_COUNTER_ATTR_TYPE 

Debug counter type.

Value Type:
sai_debug_counter_type_t
Flags:
MANDATORY_ON_CREATE | CREATE_ONLY
IsResourceType:
true
SAI_DEBUG_COUNTER_ATTR_BIND_METHOD 

Bind method to base object.

Value Type:
sai_debug_counter_bind_method_t
Flags:
CREATE_ONLY
Default value:
SAI_DEBUG_COUNTER_BIND_METHOD_AUTOMATIC
SAI_DEBUG_COUNTER_ATTR_IN_DROP_REASON_LIST 

List of in drop reasons that will be counted.

Value Type:
sai_s32_list_t sai_in_drop_reason_t
Flags:
CREATE_AND_SET
Default value:
empty
Valid only when:
SAI_DEBUG_COUNTER_ATTR_TYPE == SAI_DEBUG_COUNTER_TYPE_PORT_IN_DROP_REASONS or SAI_DEBUG_COUNTER_ATTR_TYPE == SAI_DEBUG_COUNTER_TYPE_SWITCH_IN_DROP_REASONS
SAI_DEBUG_COUNTER_ATTR_OUT_DROP_REASON_LIST 

List of out drop reasons that will be counted.

Value Type:
sai_s32_list_t sai_out_drop_reason_t
Flags:
CREATE_AND_SET
Default value:
empty
Valid only when:
SAI_DEBUG_COUNTER_ATTR_TYPE == SAI_DEBUG_COUNTER_TYPE_PORT_OUT_DROP_REASONS or SAI_DEBUG_COUNTER_ATTR_TYPE == SAI_DEBUG_COUNTER_TYPE_SWITCH_OUT_DROP_REASONS
SAI_DEBUG_COUNTER_ATTR_END 

End of attributes.

SAI_DEBUG_COUNTER_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_DEBUG_COUNTER_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 386 of file saidebugcounter.h.

◆ _sai_debug_counter_bind_method_t

Debug counter bind method.

Enumerator
SAI_DEBUG_COUNTER_BIND_METHOD_AUTOMATIC 

Bind automatically to all instances of base object

Definition at line 72 of file saidebugcounter.h.

◆ _sai_debug_counter_type_t

Debug counter type.

Enumerator
SAI_DEBUG_COUNTER_TYPE_PORT_IN_DROP_REASONS 

Port in drop reasons. Base object: SAI_OBJECT_TYPE_PORT

SAI_DEBUG_COUNTER_TYPE_PORT_OUT_DROP_REASONS 

Port out drop reasons. Base object: SAI_OBJECT_TYPE_PORT

SAI_DEBUG_COUNTER_TYPE_SWITCH_IN_DROP_REASONS 

Switch in drop reasons.

Base object: SAI_OBJECT_TYPE_SWITCH. Values for all ports in the switch are summed up by switch counter

SAI_DEBUG_COUNTER_TYPE_SWITCH_OUT_DROP_REASONS 

Switch out drop reasons.

Base object: SAI_OBJECT_TYPE_SWITCH. Values for all ports in the switch are summed up by switch counter

Definition at line 43 of file saidebugcounter.h.

◆ _sai_in_drop_reason_t

Attribute data for in drop reasons.

Enumerator
SAI_IN_DROP_REASON_START 

Start of in drop reasons

SAI_IN_DROP_REASON_L2_ANY 

Any L2 pipeline drop

SAI_IN_DROP_REASON_SMAC_MULTICAST 

Source MAC is multicast

SAI_IN_DROP_REASON_SMAC_EQUALS_DMAC 

Source MAC equals destination MAC

SAI_IN_DROP_REASON_DMAC_RESERVED 

Destination MAC is Reserved (Destination MAC=01-80-C2-00-00-0x)

SAI_IN_DROP_REASON_VLAN_TAG_NOT_ALLOWED 

VLAN tag not allowed.

Frame tagged when port is dropping tagged, or untagged when dropping untagged

SAI_IN_DROP_REASON_INGRESS_VLAN_FILTER 

Ingress VLAN filter

SAI_IN_DROP_REASON_INGRESS_STP_FILTER 

Ingress STP filter

SAI_IN_DROP_REASON_FDB_UC_DISCARD 

Unicast FDB table action discard

SAI_IN_DROP_REASON_FDB_MC_DISCARD 

Multicast FDB table empty tx list

SAI_IN_DROP_REASON_L2_LOOPBACK_FILTER 

Port L2 loopback filter (packet egressing on the same port+VLAN as ingressing)

SAI_IN_DROP_REASON_EXCEEDS_L2_MTU 

Packet size is larger than the L2 (Port) MTU

SAI_IN_DROP_REASON_L3_ANY 

Any L3 pipeline drop

SAI_IN_DROP_REASON_EXCEEDS_L3_MTU 

Packet size is larger than the L3 (Router Interface) MTU

SAI_IN_DROP_REASON_TTL 

TTL expired

SAI_IN_DROP_REASON_L3_LOOPBACK_FILTER 

RIF L3 loopback filter (packet egressing on the same RIF as ingressing)

SAI_IN_DROP_REASON_NON_ROUTABLE 

Non routable packet.

IGMP v1 v2 v3 membership query IGMP v1 membership report IGMP v2 membership report IGMP v2 leave group IGMP v3 membership report

SAI_IN_DROP_REASON_NO_L3_HEADER 

Destination MAC is the router MAC, however packet is not routable (isn't IP or MPLS)

SAI_IN_DROP_REASON_IP_HEADER_ERROR 

IP Header error.

Due to header checksum or bad IP version or IPv4 IHL too short

SAI_IN_DROP_REASON_UC_DIP_MC_DMAC 

Unicast destination IP with non unicast (multicast or broadcast) destination MAC

SAI_IN_DROP_REASON_DIP_LOOPBACK 

Destination IP is loopback address.

for IPv4: Destination IP=127.0.0.0/8 for IPv6: Destination IP=::1/128 OR Destination IP=0:0:0:0:0:ffff:7f00:0/104

SAI_IN_DROP_REASON_SIP_LOOPBACK 

Source IP is loopback address.

for IPv4: Source IP=127.0.0.0/8 for IPv6: Source IP=::1/128

SAI_IN_DROP_REASON_SIP_MC 

Source IP is multicast address.

for IPv4: Source IP=224.0.0.0/4 for IPv6: Source IP=FF00::/8

SAI_IN_DROP_REASON_SIP_CLASS_E 

Source IP is in class E.

IPv4 AND Source IP=240.0.0.0/4 AND Source IP!=255.255.255.255

SAI_IN_DROP_REASON_SIP_UNSPECIFIED 

Source IP unspecified.

for IPv4: Source IP=0.0.0.0/32 for IPv6: Source IP=::0

SAI_IN_DROP_REASON_MC_DMAC_MISMATCH 

Destination IP is multicast but destination MAC isn't.

Destination IP is multicast AND for IPv4: Destination MAC!={01-00-5E-0 (25 bits), dip[22:0]} for IPv6: Destination MAC!={33-33, DIP[31:0]}

SAI_IN_DROP_REASON_SIP_EQUALS_DIP 

Source IP equals destination IP

SAI_IN_DROP_REASON_SIP_BC 

IPv4 source IP is limited broadcast (Source IP=255.255.255.255)

SAI_IN_DROP_REASON_DIP_LOCAL 

IPv4 destination IP is local network (Destination IP=0.0.0.0/8)

SAI_IN_DROP_REASON_DIP_LINK_LOCAL 

IPv4 unicast destination IP is link local (Destination IP=169.254.0.0/16)

SAI_IN_DROP_REASON_SIP_LINK_LOCAL 

IPv4 Source IP is link local (Source IP=169.254.0.0/16)

SAI_IN_DROP_REASON_IPV6_MC_SCOPE0 

IPv6 destination in multicast scope 0 reserved (Destination IP=ff:x0:/16)

SAI_IN_DROP_REASON_IPV6_MC_SCOPE1 

IPv6 destination in multicast scope 1 interface-local (Destination IP=ff:x1:/16)

SAI_IN_DROP_REASON_IRIF_DISABLED 

Ingress RIF is disabled

SAI_IN_DROP_REASON_ERIF_DISABLED 

Egress RIF is disabled

SAI_IN_DROP_REASON_LPM4_MISS 

IPv4 Routing table (LPM) unicast miss

SAI_IN_DROP_REASON_LPM6_MISS 

IPv6 Routing table (LPM) unicast miss

SAI_IN_DROP_REASON_BLACKHOLE_ROUTE 

Black hole route (discard by route entry)

SAI_IN_DROP_REASON_BLACKHOLE_ARP 

Black hole ARP/Neighbor (discard by ARP or neighbor entries)

SAI_IN_DROP_REASON_UNRESOLVED_NEXT_HOP 

Unresolved next hop (missing ARP entry)

SAI_IN_DROP_REASON_L3_EGRESS_LINK_DOWN 

Packet is destined for neighboring device but neighbor device link is down.

Counted on ingress link

SAI_IN_DROP_REASON_DECAP_ERROR 

Packet decapsulation failed.

e.g.: need to decap too many bytes, remaining packet is too short, UDP port out of defined range

SAI_IN_DROP_REASON_ACL_ANY 

Packet is dropped due to configured ACL rules, all stages/bind points combinations

SAI_IN_DROP_REASON_ACL_INGRESS_PORT 

Packet is dropped due to configured ACL rules, ingress stage, port binding

SAI_IN_DROP_REASON_ACL_INGRESS_LAG 

Packet is dropped due to configured ACL rules, ingress stage, LAG binding

SAI_IN_DROP_REASON_ACL_INGRESS_VLAN 

Packet is dropped due to configured ACL rules, ingress stage, VLAN binding

SAI_IN_DROP_REASON_ACL_INGRESS_RIF 

Packet is dropped due to configured ACL rules, ingress stage, RIF binding

SAI_IN_DROP_REASON_ACL_INGRESS_SWITCH 

Packet is dropped due to configured ACL rules, ingress stage, switch binding

SAI_IN_DROP_REASON_ACL_EGRESS_PORT 

Packet is dropped due to configured ACL rules, egress stage, port binding

SAI_IN_DROP_REASON_ACL_EGRESS_LAG 

Packet is dropped due to configured ACL rules, egress stage, LAG binding

SAI_IN_DROP_REASON_ACL_EGRESS_VLAN 

Packet is dropped due to configured ACL rules, egress stage, VLAN binding

SAI_IN_DROP_REASON_ACL_EGRESS_RIF 

Packet is dropped due to configured ACL rules, egress stage, RIF binding

SAI_IN_DROP_REASON_ACL_EGRESS_SWITCH 

Packet is dropped due to configured ACL rules, egress stage, switch binding

SAI_IN_DROP_REASON_FDB_AND_BLACKHOLE_DISCARDS 

Packet is dropped due to FDB action discards or route discards (black hole route)

SAI_IN_DROP_REASON_MPLS_MISS 

MPLS Routing table lookup miss

SAI_IN_DROP_REASON_SRV6_LOCAL_SID_DROP 

SRV6 local SID drop.

Packet is dropped due to local SID configuration or incorrect value in SRV6 packet header e.g.: Local SID packet action is set to SAI_PACKET_ACTION_DROP Next Header is SRH and Segments Left value is 0 for End, End.X, End.T, End.B* endpoint types Next Header is not SRH while local SID is configured for packet DA Segments Left value is not 0 when received packet is destined to S and S is a local SID of type End.D*

SAI_IN_DROP_REASON_END 

End of in drop reasons

SAI_IN_DROP_REASON_CUSTOM_RANGE_BASE 

Custom range base value

SAI_IN_DROP_REASON_CUSTOM_RANGE_END 

End of custom range

Definition at line 82 of file saidebugcounter.h.

◆ _sai_out_drop_reason_t

Attribute data for out drop reasons.

Enumerator
SAI_OUT_DROP_REASON_START 

Start of out drop reasons

SAI_OUT_DROP_REASON_L2_ANY 

Any L2 pipeline drop

SAI_OUT_DROP_REASON_EGRESS_VLAN_FILTER 

Egress VLAN filter

SAI_OUT_DROP_REASON_L3_ANY 

Any L3 pipeline drop

SAI_OUT_DROP_REASON_L3_EGRESS_LINK_DOWN 

Packet is destined for neighboring device but neighbor device link is down.

Counted on egress link

SAI_OUT_DROP_REASON_TUNNEL_LOOPBACK_PACKET_DROP 

Tunnel packets dropped if going back to the incoming tunnel.

SAI_OUT_DROP_REASON_END 

End of out drop reasons

SAI_OUT_DROP_REASON_CUSTOM_RANGE_BASE 

Custom range base value

SAI_OUT_DROP_REASON_CUSTOM_RANGE_END 

End of custom range

Definition at line 339 of file saidebugcounter.h.