SAI Metadata
|
Classes | |
struct | _sai_fdb_entry_t |
FDB entry key. More... | |
struct | _sai_fdb_event_notification_data_t |
Notification data format received from SAI FDB callback. More... | |
struct | _sai_fdb_api_t |
FDB method table retrieved with sai_api_query() More... | |
Typedefs | |
typedef enum _sai_fdb_entry_type_t | sai_fdb_entry_type_t |
FDB entry type. | |
typedef struct _sai_fdb_entry_t | sai_fdb_entry_t |
FDB entry key. | |
typedef enum _sai_fdb_event_t | sai_fdb_event_t |
FDB event type. | |
typedef enum _sai_fdb_entry_attr_t | sai_fdb_entry_attr_t |
Attribute Id for FDB entry. | |
typedef enum _sai_fdb_flush_entry_type_t | sai_fdb_flush_entry_type_t |
FDB Flush entry type. | |
typedef enum _sai_fdb_flush_attr_t | sai_fdb_flush_attr_t |
Attribute for FDB flush API to specify the type of FDB entries being flushed. | |
typedef struct _sai_fdb_event_notification_data_t | sai_fdb_event_notification_data_t |
Notification data format received from SAI FDB callback. | |
typedef sai_status_t(* | sai_create_fdb_entry_fn) (_In_ const sai_fdb_entry_t *fdb_entry, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list) |
Create FDB entry. | |
typedef sai_status_t(* | sai_remove_fdb_entry_fn) (_In_ const sai_fdb_entry_t *fdb_entry) |
Remove FDB entry. | |
typedef sai_status_t(* | sai_set_fdb_entry_attribute_fn) (_In_ const sai_fdb_entry_t *fdb_entry, _In_ const sai_attribute_t *attr) |
Set FDB entry attribute value. | |
typedef sai_status_t(* | sai_get_fdb_entry_attribute_fn) (_In_ const sai_fdb_entry_t *fdb_entry, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list) |
Get FDB entry attribute value. | |
typedef sai_status_t(* | sai_flush_fdb_entries_fn) (_In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list) |
Remove all FDB entries by attribute set in sai_fdb_flush_attr. | |
typedef void(* | sai_fdb_event_notification_fn) (_In_ uint32_t count, _In_ const sai_fdb_event_notification_data_t *data) |
FDB notifications. | |
typedef sai_status_t(* | sai_bulk_create_fdb_entry_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ const uint32_t *attr_count, _In_ const sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk create FDB entry. | |
typedef sai_status_t(* | sai_bulk_remove_fdb_entry_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk remove FDB entry. | |
typedef sai_status_t(* | sai_bulk_set_fdb_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ const sai_attribute_t *attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk set attribute on FDB entry. | |
typedef sai_status_t(* | sai_bulk_get_fdb_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ const uint32_t *attr_count, _Inout_ sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk get attribute on FDB entry. | |
typedef struct _sai_fdb_api_t | sai_fdb_api_t |
FDB method table retrieved with sai_api_query() | |
typedef sai_status_t(* sai_bulk_create_fdb_entry_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ const uint32_t *attr_count, _In_ const sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk create FDB entry.
[in] | object_count | Number of objects to create |
[in] | fdb_entry | List of object to create |
[in] | attr_count | List of attr_count. Caller passes the number of attribute for each object to create. |
[in] | attr_list | List of attributes for every object. |
[in] | mode | Bulk operation error handling mode. |
[out] | object_statuses | List of status for every object. Caller needs to allocate the buffer |
typedef sai_status_t(* sai_bulk_get_fdb_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ const uint32_t *attr_count, _Inout_ sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk get attribute on FDB entry.
[in] | object_count | Number of objects to get attribute |
[in] | fdb_entry | List of objects to get attribute |
[in] | attr_count | List of attr_count. Caller passes the number of attribute for each object to get |
[in,out] | attr_list | List of attributes to get on objects, one attribute per object |
[in] | mode | Bulk operation error handling mode |
[out] | object_statuses | List of status for every object. Caller needs to allocate the buffer |
typedef sai_status_t(* sai_bulk_remove_fdb_entry_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk remove FDB entry.
[in] | object_count | Number of objects to remove |
[in] | fdb_entry | List of objects to remove |
[in] | mode | Bulk operation error handling mode. |
[out] | object_statuses | List of status for every object. Caller needs to allocate the buffer |
typedef sai_status_t(* sai_bulk_set_fdb_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_fdb_entry_t *fdb_entry, _In_ const sai_attribute_t *attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses) |
Bulk set attribute on FDB entry.
[in] | object_count | Number of objects to set attribute |
[in] | fdb_entry | List of objects to set attribute |
[in] | attr_list | List of attributes to set on objects, one attribute per object |
[in] | mode | Bulk operation error handling mode. |
[out] | object_statuses | List of status for every object. Caller needs to allocate the buffer |
typedef sai_status_t(* sai_create_fdb_entry_fn) (_In_ const sai_fdb_entry_t *fdb_entry, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list) |
Create FDB entry.
[in] | fdb_entry | FDB entry |
[in] | attr_count | Number of attributes |
[in] | attr_list | Array of attributes |
Notification data format received from SAI FDB callback.
When FDB flush API is called (for example with no parameters) and switch learned a lot of MAC addresses, then calling this API can cause to generate a lot of notifications.
Vendor can decide whether in that case send notifications 1 by 1 and populating all the data for sai_fdb_event_notification_data_t or to send consolidated event notification which will indicate that FDB flush operation was performed.
Consolidated flush event will:
Set data.fdb_entry.mac_address to 00:00:00:00:00:00.
Set data.fdb_event to SAI_FDB_EVENT_FLUSHED.
Add SAI_FDB_ENTRY_ATTR_TYPE to data.attr list and value set to SAI_FDB_FLUSH_ATTR_ENTRY_TYPE, if SAI_FDB_FLUSH_ATTR_ENTRY_TYPE was not provided to flush API, then 2 notifications will be sent (or 1 notification with 2 data entries) where data.attr will contain SAI_FDB_ENTRY_ATTR_TYPE set accordingly for specific entry types.
Set data.fdb_entry.bv_id to SAI_FDB_FLUSH_ATTR_BV_ID value if attribute was provided to flush API.
Add SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID to data.attr list and value set to SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID if that attribute was provided to flush API.
All other attributes in consolidated FDB event notification are irrelevant and should be zero.
typedef void(* sai_fdb_event_notification_fn) (_In_ uint32_t count, _In_ const sai_fdb_event_notification_data_t *data) |
typedef enum _sai_fdb_flush_attr_t sai_fdb_flush_attr_t |
Attribute for FDB flush API to specify the type of FDB entries being flushed.
For example, if you want to flush all static entries, set SAI_FDB_FLUSH_ATTR_ENTRY_TYPE = SAI_FDB_FLUSH_ENTRY_TYPE_STATIC. If you want to flush both static and dynamic entries, then set SAI_FDB_FLUSH_ATTR_ENTRY_TYPE = SAI_FDB_FLUSH_ENTRY_TYPE_ALL. The API uses AND operation when multiple attributes are specified.
For example:
1) Flush all dynamic entries in FDB table - Do not specify any attribute 2) Flush dynamic entries by bridge port - Set SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID 3) Flush dynamic entries by VLAN - Set SAI_FDB_FLUSH_ATTR_BV_ID with object id as vlan object 3) Flush dynamic entries by bridge - Set SAI_FDB_FLUSH_ATTR_BV_ID with object id as bridge object 4) Flush dynamic entries by bridge port and VLAN - Set SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID and SAI_FDB_FLUSH_ATTR_BV_ID 5) Flush all static entries by bridge port and VLAN - Set SAI_FDB_FLUSH_ATTR_ENTRY_TYPE, SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID, and SAI_FDB_FLUSH_ATTR_BV_ID
typedef sai_status_t(* sai_flush_fdb_entries_fn) (_In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list) |
Remove all FDB entries by attribute set in sai_fdb_flush_attr.
[in] | switch_id | Switch object id |
[in] | attr_count | Number of attributes |
[in] | attr_list | Array of attributes |
typedef sai_status_t(* sai_get_fdb_entry_attribute_fn) (_In_ const sai_fdb_entry_t *fdb_entry, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list) |
Get FDB entry attribute value.
[in] | fdb_entry | FDB entry |
[in] | attr_count | Number of attributes |
[in,out] | attr_list | Array of attributes |
typedef sai_status_t(* sai_remove_fdb_entry_fn) (_In_ const sai_fdb_entry_t *fdb_entry) |
Remove FDB entry.
[in] | fdb_entry | FDB entry |
typedef sai_status_t(* sai_set_fdb_entry_attribute_fn) (_In_ const sai_fdb_entry_t *fdb_entry, _In_ const sai_attribute_t *attr) |
Set FDB entry attribute value.
[in] | fdb_entry | FDB entry |
[in] | attr | Attribute |
Attribute Id for FDB entry.
Enumerator | |
---|---|
SAI_FDB_ENTRY_ATTR_START | Start of attributes. |
SAI_FDB_ENTRY_ATTR_TYPE | FDB entry type.
|
SAI_FDB_ENTRY_ATTR_PACKET_ACTION | FDB entry packet action.
|
SAI_FDB_ENTRY_ATTR_USER_TRAP_ID | Generate User Defined Trap ID for trap/log actions. When it is SAI_NULL_OBJECT_ID, then packet will not be trapped.
|
SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID | FDB entry bridge port id. The port id is only effective when the packet action is one of the following: FORWARD, COPY, LOG, TRANSIT When it is SAI_NULL_OBJECT_ID, then packet will be dropped.
|
SAI_FDB_ENTRY_ATTR_META_DATA | User based Meta Data. Value Range SAI_SWITCH_ATTR_FDB_DST_USER_META_DATA_RANGE
|
SAI_FDB_ENTRY_ATTR_ENDPOINT_IP | Tunnel Endpoint IP. valid for SAI_BRIDGE_PORT_TYPE_TUNNEL.
|
SAI_FDB_ENTRY_ATTR_COUNTER_ID | Attach a counter. When it is empty, then packet hits won't be counted
|
SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE | Specifies whether a MAC move is allowed When MAC_MOVE is explicitly disabled for a static MAC entry via this attribute, the trap introduced in #696 would also not be generated.
|
SAI_FDB_ENTRY_ATTR_END | End of attributes. |
SAI_FDB_ENTRY_ATTR_CUSTOM_RANGE_START | Start of custom range base value |
SAI_FDB_ENTRY_ATTR_CUSTOM_RANGE_END | End of custom range |
enum _sai_fdb_event_t |
Attribute for FDB flush API to specify the type of FDB entries being flushed.
For example, if you want to flush all static entries, set SAI_FDB_FLUSH_ATTR_ENTRY_TYPE = SAI_FDB_FLUSH_ENTRY_TYPE_STATIC. If you want to flush both static and dynamic entries, then set SAI_FDB_FLUSH_ATTR_ENTRY_TYPE = SAI_FDB_FLUSH_ENTRY_TYPE_ALL. The API uses AND operation when multiple attributes are specified.
For example:
1) Flush all dynamic entries in FDB table - Do not specify any attribute 2) Flush dynamic entries by bridge port - Set SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID 3) Flush dynamic entries by VLAN - Set SAI_FDB_FLUSH_ATTR_BV_ID with object id as vlan object 3) Flush dynamic entries by bridge - Set SAI_FDB_FLUSH_ATTR_BV_ID with object id as bridge object 4) Flush dynamic entries by bridge port and VLAN - Set SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID and SAI_FDB_FLUSH_ATTR_BV_ID 5) Flush all static entries by bridge port and VLAN - Set SAI_FDB_FLUSH_ATTR_ENTRY_TYPE, SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID, and SAI_FDB_FLUSH_ATTR_BV_ID