SAI Metadata
Loading...
Searching...
No Matches
SAI - Status codes definitions

Macros

#define SAI_STATUS_CODE(_S_)   (-(_S_))
 Any mapping schema from S to error codes convenient on *nix can be used.
 
#define SAI_STATUS_SUCCESS   0x00000000L
 Status success.
 
#define SAI_STATUS_FAILURE   SAI_STATUS_CODE(0x00000001L)
 General failure.
 
#define SAI_STATUS_NOT_SUPPORTED   SAI_STATUS_CODE(0x00000002L)
 The request is not supported.
 
#define SAI_STATUS_NO_MEMORY   SAI_STATUS_CODE(0x00000003L)
 Not enough memory to complete the operation.
 
#define SAI_STATUS_INSUFFICIENT_RESOURCES   SAI_STATUS_CODE(0x00000004L)
 Insufficient system resources exist to complete the operation.
 
#define SAI_STATUS_INVALID_PARAMETER   SAI_STATUS_CODE(0x00000005L)
 An invalid parameter was passed to a function.
 
#define SAI_STATUS_ITEM_ALREADY_EXISTS   SAI_STATUS_CODE(0x00000006L)
 An item already exists. For example, create a route which already exists.
 
#define SAI_STATUS_ITEM_NOT_FOUND   SAI_STATUS_CODE(0x00000007L)
 An item was not found. For example, remove a route which does not exist.
 
#define SAI_STATUS_BUFFER_OVERFLOW   SAI_STATUS_CODE(0x00000008L)
 The data was too large to fit into the specified buffer.
 
#define SAI_STATUS_INVALID_PORT_NUMBER   SAI_STATUS_CODE(0x00000009L)
 Invalid port number.
 
#define SAI_STATUS_INVALID_PORT_MEMBER   SAI_STATUS_CODE(0x0000000AL)
 Invalid port member.
 
#define SAI_STATUS_INVALID_VLAN_ID   SAI_STATUS_CODE(0x0000000BL)
 Invalid VLAN id.
 
#define SAI_STATUS_UNINITIALIZED   SAI_STATUS_CODE(0x0000000CL)
 Object is uninitialized.
 
#define SAI_STATUS_TABLE_FULL   SAI_STATUS_CODE(0x0000000DL)
 Table is full.
 
#define SAI_STATUS_MANDATORY_ATTRIBUTE_MISSING   SAI_STATUS_CODE(0x0000000EL)
 Mandatory attribute is missing.
 
#define SAI_STATUS_NOT_IMPLEMENTED   SAI_STATUS_CODE(0x0000000FL)
 Function is not implemented.
 
#define SAI_STATUS_ADDR_NOT_FOUND   SAI_STATUS_CODE(0x00000010L)
 Address not found.
 
#define SAI_STATUS_OBJECT_IN_USE   SAI_STATUS_CODE(0x00000011L)
 SAI Object is in use.
 
#define SAI_STATUS_INVALID_OBJECT_TYPE   SAI_STATUS_CODE(0x00000012L)
 Invalid SAI Object type passed to a function.
 
#define SAI_STATUS_INVALID_OBJECT_ID   SAI_STATUS_CODE(0x00000013L)
 Invalid SAI Object ID passed to a function.
 
#define SAI_STATUS_INVALID_NV_STORAGE   SAI_STATUS_CODE(0x00000014L)
 The NV storage used is either invalid or corrupt. (rv for initialize_switch())
 
#define SAI_STATUS_NV_STORAGE_FULL   SAI_STATUS_CODE(0x00000015L)
 The NV storage is full. (rv for shutdown_switch())
 
#define SAI_STATUS_SW_UPGRADE_VERSION_MISMATCH   SAI_STATUS_CODE(0x00000016L)
 Version mismatch in case of Inservice upgrade (rv for initialize_switch())
 
#define SAI_STATUS_NOT_EXECUTED   SAI_STATUS_CODE(0x00000017L)
 Operation not executed.
 
#define SAI_STATUS_STAGE_MISMATCH   SAI_STATUS_CODE(0x00000018L)
 Object pipeline stage mismatch.
 
#define SAI_STATUS_INVALID_ATTRIBUTE_0   SAI_STATUS_CODE(0x00010000L)
 Attribute is invalid.
 
#define SAI_STATUS_INVALID_ATTRIBUTE_MAX   SAI_STATUS_CODE(0x0001FFFFL)
 End of invalid attribute range.
 
#define SAI_STATUS_INVALID_ATTR_VALUE_0   SAI_STATUS_CODE(0x00020000L)
 Invalid attribute value.
 
#define SAI_STATUS_INVALID_ATTR_VALUE_MAX   SAI_STATUS_CODE(0x0002FFFFL)
 End of invalid attribute value range.
 
#define SAI_STATUS_ATTR_NOT_IMPLEMENTED_0   SAI_STATUS_CODE(0x00030000L)
 Attribute is not implemented.
 
#define SAI_STATUS_ATTR_NOT_IMPLEMENTED_MAX   SAI_STATUS_CODE(0x0003FFFFL)
 End of not implemented range.
 
#define SAI_STATUS_UNKNOWN_ATTRIBUTE_0   SAI_STATUS_CODE(0x00040000L)
 Attribute is unknown.
 
#define SAI_STATUS_UNKNOWN_ATTRIBUTE_MAX   SAI_STATUS_CODE(0x0004FFFFL)
 End of unknown attribute range.
 
#define SAI_STATUS_ATTR_NOT_SUPPORTED_0   SAI_STATUS_CODE(0x00050000L)
 Attribute is not supported.
 
#define SAI_STATUS_ATTR_NOT_SUPPORTED_MAX   SAI_STATUS_CODE(0x0005FFFFL)
 End of attribute not supported range.
 
#define SAI_STATUS_IS_INVALID_ATTRIBUTE(x)   (((x) & (~0xFFFF)) == SAI_STATUS_INVALID_ATTRIBUTE_0)
 Is invalid attribute helper.
 
#define SAI_STATUS_IS_INVALID_ATTR_VALUE(x)   (((x) & (~0xFFFF)) == SAI_STATUS_INVALID_ATTR_VALUE_0)
 Is invalid attribute value helper.
 
#define SAI_STATUS_IS_ATTR_NOT_IMPLEMENTED(x)   (((x) & (~0xFFFF)) == SAI_STATUS_ATTR_NOT_IMPLEMENTED_0)
 Is attribute not implemented helper.
 
#define SAI_STATUS_IS_UNKNOWN_ATTRIBUTE(x)   (((x) & (~0xFFFF)) == SAI_STATUS_INVALID_ATTRIBUTE_0)
 Is unknown attribute helper.
 
#define SAI_STATUS_IS_ATTR_NOT_SUPPORTED(x)   (((x) & (~0xFFFF)) == SAI_STATUS_ATTR_NOT_SUPPORTED_0)
 Is attribute not supported helper.
 

Detailed Description

Macro Definition Documentation

◆ SAI_STATUS_ADDR_NOT_FOUND

#define SAI_STATUS_ADDR_NOT_FOUND   SAI_STATUS_CODE(0x00000010L)

Address not found.

Definition at line 132 of file saistatus.h.

◆ SAI_STATUS_ATTR_NOT_IMPLEMENTED_0

#define SAI_STATUS_ATTR_NOT_IMPLEMENTED_0   SAI_STATUS_CODE(0x00030000L)

Attribute is not implemented.

Range from 0x00030000L to 0x003FFFFL.

Return this when the attribute is supported but not implemented on the platform.

Definition at line 223 of file saistatus.h.

◆ SAI_STATUS_ATTR_NOT_IMPLEMENTED_MAX

#define SAI_STATUS_ATTR_NOT_IMPLEMENTED_MAX   SAI_STATUS_CODE(0x0003FFFFL)

End of not implemented range.

Definition at line 228 of file saistatus.h.

◆ SAI_STATUS_ATTR_NOT_SUPPORTED_0

#define SAI_STATUS_ATTR_NOT_SUPPORTED_0   SAI_STATUS_CODE(0x00050000L)

Attribute is not supported.

Range from 0x00050000L to 0x005FFFFL.

Return this when the platform does not have the capability to support this attribute.

Definition at line 253 of file saistatus.h.

◆ SAI_STATUS_ATTR_NOT_SUPPORTED_MAX

#define SAI_STATUS_ATTR_NOT_SUPPORTED_MAX   SAI_STATUS_CODE(0x0005FFFFL)

End of attribute not supported range.

Definition at line 258 of file saistatus.h.

◆ SAI_STATUS_BUFFER_OVERFLOW

#define SAI_STATUS_BUFFER_OVERFLOW   SAI_STATUS_CODE(0x00000008L)

The data was too large to fit into the specified buffer.

Definition at line 92 of file saistatus.h.

◆ SAI_STATUS_CODE

#define SAI_STATUS_CODE (   _S_)    (-(_S_))

Any mapping schema from S to error codes convenient on *nix can be used.

Definition at line 43 of file saistatus.h.

◆ SAI_STATUS_FAILURE

#define SAI_STATUS_FAILURE   SAI_STATUS_CODE(0x00000001L)

General failure.

Definition at line 55 of file saistatus.h.

◆ SAI_STATUS_INSUFFICIENT_RESOURCES

#define SAI_STATUS_INSUFFICIENT_RESOURCES   SAI_STATUS_CODE(0x00000004L)

Insufficient system resources exist to complete the operation.

Definition at line 70 of file saistatus.h.

◆ SAI_STATUS_INVALID_ATTR_VALUE_0

#define SAI_STATUS_INVALID_ATTR_VALUE_0   SAI_STATUS_CODE(0x00020000L)

Invalid attribute value.

Range from 0x00020000L to 0x0002FFFFL.

Definition at line 208 of file saistatus.h.

◆ SAI_STATUS_INVALID_ATTR_VALUE_MAX

#define SAI_STATUS_INVALID_ATTR_VALUE_MAX   SAI_STATUS_CODE(0x0002FFFFL)

End of invalid attribute value range.

Definition at line 213 of file saistatus.h.

◆ SAI_STATUS_INVALID_ATTRIBUTE_0

#define SAI_STATUS_INVALID_ATTRIBUTE_0   SAI_STATUS_CODE(0x00010000L)

Attribute is invalid.

Range from 0x00010000L to 0x0001FFFFL.

Return this when the property attached to the attribute does not match the API call.

For example:

  • When a READ_ONLY attribute is passed set_attribute or create call
  • When a CREATE_ONLY attribute is passed to set_attribute call

The offset from SAI_STATUS_INVALID_ATTRIBUTE_0 is the array index of the attribute list passed to the SAI API call.

Definition at line 196 of file saistatus.h.

◆ SAI_STATUS_INVALID_ATTRIBUTE_MAX

#define SAI_STATUS_INVALID_ATTRIBUTE_MAX   SAI_STATUS_CODE(0x0001FFFFL)

End of invalid attribute range.

Definition at line 201 of file saistatus.h.

◆ SAI_STATUS_INVALID_NV_STORAGE

#define SAI_STATUS_INVALID_NV_STORAGE   SAI_STATUS_CODE(0x00000014L)

The NV storage used is either invalid or corrupt. (rv for initialize_switch())

Definition at line 159 of file saistatus.h.

◆ SAI_STATUS_INVALID_OBJECT_ID

#define SAI_STATUS_INVALID_OBJECT_ID   SAI_STATUS_CODE(0x00000013L)

Invalid SAI Object ID passed to a function.

Return SAI_STATUS_INVALID_OBJECT_TYPE when the object type is invalid, otherwise return this SAI_STATUS_INVALID_OBJECT_ID. This can happen if the object id is already deleted.

Definition at line 154 of file saistatus.h.

◆ SAI_STATUS_INVALID_OBJECT_TYPE

#define SAI_STATUS_INVALID_OBJECT_TYPE   SAI_STATUS_CODE(0x00000012L)

Invalid SAI Object type passed to a function.

If the object id is passed as an attribute value in list, then SAI_STATUS_INVALID_ATTR_VALUE_0 status code should be used.

Definition at line 145 of file saistatus.h.

◆ SAI_STATUS_INVALID_PARAMETER

#define SAI_STATUS_INVALID_PARAMETER   SAI_STATUS_CODE(0x00000005L)

An invalid parameter was passed to a function.

Definition at line 75 of file saistatus.h.

◆ SAI_STATUS_INVALID_PORT_MEMBER

#define SAI_STATUS_INVALID_PORT_MEMBER   SAI_STATUS_CODE(0x0000000AL)

Invalid port member.

Definition at line 102 of file saistatus.h.

◆ SAI_STATUS_INVALID_PORT_NUMBER

#define SAI_STATUS_INVALID_PORT_NUMBER   SAI_STATUS_CODE(0x00000009L)

Invalid port number.

Definition at line 97 of file saistatus.h.

◆ SAI_STATUS_INVALID_VLAN_ID

#define SAI_STATUS_INVALID_VLAN_ID   SAI_STATUS_CODE(0x0000000BL)

Invalid VLAN id.

Definition at line 107 of file saistatus.h.

◆ SAI_STATUS_IS_ATTR_NOT_IMPLEMENTED

#define SAI_STATUS_IS_ATTR_NOT_IMPLEMENTED (   x)    (((x) & (~0xFFFF)) == SAI_STATUS_ATTR_NOT_IMPLEMENTED_0)

Is attribute not implemented helper.

Definition at line 277 of file saistatus.h.

◆ SAI_STATUS_IS_ATTR_NOT_SUPPORTED

#define SAI_STATUS_IS_ATTR_NOT_SUPPORTED (   x)    (((x) & (~0xFFFF)) == SAI_STATUS_ATTR_NOT_SUPPORTED_0)

Is attribute not supported helper.

Definition at line 287 of file saistatus.h.

◆ SAI_STATUS_IS_INVALID_ATTR_VALUE

#define SAI_STATUS_IS_INVALID_ATTR_VALUE (   x)    (((x) & (~0xFFFF)) == SAI_STATUS_INVALID_ATTR_VALUE_0)

Is invalid attribute value helper.

Definition at line 272 of file saistatus.h.

◆ SAI_STATUS_IS_INVALID_ATTRIBUTE

#define SAI_STATUS_IS_INVALID_ATTRIBUTE (   x)    (((x) & (~0xFFFF)) == SAI_STATUS_INVALID_ATTRIBUTE_0)

Is invalid attribute helper.

Definition at line 267 of file saistatus.h.

◆ SAI_STATUS_IS_UNKNOWN_ATTRIBUTE

#define SAI_STATUS_IS_UNKNOWN_ATTRIBUTE (   x)    (((x) & (~0xFFFF)) == SAI_STATUS_INVALID_ATTRIBUTE_0)

Is unknown attribute helper.

Definition at line 282 of file saistatus.h.

◆ SAI_STATUS_ITEM_ALREADY_EXISTS

#define SAI_STATUS_ITEM_ALREADY_EXISTS   SAI_STATUS_CODE(0x00000006L)

An item already exists. For example, create a route which already exists.

Definition at line 81 of file saistatus.h.

◆ SAI_STATUS_ITEM_NOT_FOUND

#define SAI_STATUS_ITEM_NOT_FOUND   SAI_STATUS_CODE(0x00000007L)

An item was not found. For example, remove a route which does not exist.

Definition at line 87 of file saistatus.h.

◆ SAI_STATUS_MANDATORY_ATTRIBUTE_MISSING

#define SAI_STATUS_MANDATORY_ATTRIBUTE_MISSING   SAI_STATUS_CODE(0x0000000EL)

Mandatory attribute is missing.

Definition at line 122 of file saistatus.h.

◆ SAI_STATUS_NO_MEMORY

#define SAI_STATUS_NO_MEMORY   SAI_STATUS_CODE(0x00000003L)

Not enough memory to complete the operation.

Definition at line 65 of file saistatus.h.

◆ SAI_STATUS_NOT_EXECUTED

#define SAI_STATUS_NOT_EXECUTED   SAI_STATUS_CODE(0x00000017L)

Operation not executed.

Definition at line 174 of file saistatus.h.

◆ SAI_STATUS_NOT_IMPLEMENTED

#define SAI_STATUS_NOT_IMPLEMENTED   SAI_STATUS_CODE(0x0000000FL)

Function is not implemented.

Definition at line 127 of file saistatus.h.

◆ SAI_STATUS_NOT_SUPPORTED

#define SAI_STATUS_NOT_SUPPORTED   SAI_STATUS_CODE(0x00000002L)

The request is not supported.

Definition at line 60 of file saistatus.h.

◆ SAI_STATUS_NV_STORAGE_FULL

#define SAI_STATUS_NV_STORAGE_FULL   SAI_STATUS_CODE(0x00000015L)

The NV storage is full. (rv for shutdown_switch())

Definition at line 164 of file saistatus.h.

◆ SAI_STATUS_OBJECT_IN_USE

#define SAI_STATUS_OBJECT_IN_USE   SAI_STATUS_CODE(0x00000011L)

SAI Object is in use.

Definition at line 137 of file saistatus.h.

◆ SAI_STATUS_STAGE_MISMATCH

#define SAI_STATUS_STAGE_MISMATCH   SAI_STATUS_CODE(0x00000018L)

Object pipeline stage mismatch.

Definition at line 179 of file saistatus.h.

◆ SAI_STATUS_SUCCESS

#define SAI_STATUS_SUCCESS   0x00000000L

Status success.

Definition at line 50 of file saistatus.h.

◆ SAI_STATUS_SW_UPGRADE_VERSION_MISMATCH

#define SAI_STATUS_SW_UPGRADE_VERSION_MISMATCH   SAI_STATUS_CODE(0x00000016L)

Version mismatch in case of Inservice upgrade (rv for initialize_switch())

Definition at line 169 of file saistatus.h.

◆ SAI_STATUS_TABLE_FULL

#define SAI_STATUS_TABLE_FULL   SAI_STATUS_CODE(0x0000000DL)

Table is full.

Definition at line 117 of file saistatus.h.

◆ SAI_STATUS_UNINITIALIZED

#define SAI_STATUS_UNINITIALIZED   SAI_STATUS_CODE(0x0000000CL)

Object is uninitialized.

Definition at line 112 of file saistatus.h.

◆ SAI_STATUS_UNKNOWN_ATTRIBUTE_0

#define SAI_STATUS_UNKNOWN_ATTRIBUTE_0   SAI_STATUS_CODE(0x00040000L)

Attribute is unknown.

Range from 0x00040000L to 0x004FFFFL.

Return this when the attribute is undefined, e.g., the attribute id is out of range.

Definition at line 238 of file saistatus.h.

◆ SAI_STATUS_UNKNOWN_ATTRIBUTE_MAX

#define SAI_STATUS_UNKNOWN_ATTRIBUTE_MAX   SAI_STATUS_CODE(0x0004FFFFL)

End of unknown attribute range.

Definition at line 243 of file saistatus.h.