Mellanox SwitchX SDK API Guide  4.3.2104
Functions
sx_api_fdb.h File Reference

Go to the source code of this file.

Functions

sx_status_t sx_api_fdb_log_verbosity_level_set (const sx_api_handle_t handle, const sx_log_verbosity_target_t verbosity_target, const sx_verbosity_level_t module_verbosity_level, const sx_verbosity_level_t api_verbosity_level)
 
sx_status_t sx_api_fdb_log_verbosity_level_get (const sx_api_handle_t handle, const sx_log_verbosity_target_t verbosity_target, sx_verbosity_level_t *module_verbosity_level_p, sx_verbosity_level_t *api_verbosity_level_p)
 
sx_status_t sx_api_fdb_age_time_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fdb_age_time_t age_time)
 
sx_status_t sx_api_fdb_age_time_get (const sx_api_handle_t handle, const sx_swid_t swid, sx_fdb_age_time_t *age_time_p)
 
sx_status_t sx_api_fdb_poll_set (const sx_api_handle_t handle, const sx_swid_t swid)
 
sx_status_t sx_api_fdb_polling_interval_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fdb_polling_interval_t interval)
 
sx_status_t sx_api_fdb_polling_interval_get (const sx_api_handle_t handle, const sx_swid_t swid, sx_fdb_polling_interval_t *interval)
 
sx_status_t sx_api_fdb_uc_mac_addr_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, sx_fdb_uc_mac_addr_params_t *mac_list_p, uint32_t *data_cnt_p)
 
sx_status_t sx_api_fdb_uc_mac_addr_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_access_cmd_t cmd, const sx_fdb_uc_mac_entry_type_t mac_type, const sx_fdb_uc_mac_addr_params_t *key_p, const sx_fdb_uc_key_filter_t *key_filter_p, sx_fdb_uc_mac_addr_params_t *mac_list_p, uint32_t *data_cnt_p)
 
sx_status_t sx_api_fdb_uc_count_get (const sx_api_handle_t handle, const sx_swid_t swid, uint32_t *data_cnt_p)
 
sx_status_t sx_api_fdb_uc_port_count_get (const sx_api_handle_t handle, const sx_port_log_id_t log_port, uint32_t *data_cnt_p)
 
sx_status_t sx_api_fdb_uc_fid_count_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid, uint32_t *data_cnt_p)
 
sx_status_t sx_api_fdb_uc_limit_port_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_port_log_id_t log_port, const uint32_t limit)
 
sx_status_t sx_api_fdb_uc_limit_port_get (const sx_api_handle_t handle, const sx_port_log_id_t log_port, uint32_t *limit_p)
 
sx_status_t sx_api_fdb_uc_limit_fid_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, const sx_fid_t fid, const uint32_t limit)
 
sx_status_t sx_api_fdb_uc_limit_fid_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid, uint32_t *limit_p)
 
sx_status_t sx_api_fdb_mc_mac_addr_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, const sx_vid_t vid, const sx_mac_addr_t group_addr, const sx_port_log_id_t *log_port_list_p, const uint32_t port_cnt)
 
sx_status_t sx_api_fdb_mc_mac_addr_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_vid_t vid, const sx_mac_addr_t group_addr, sx_port_log_id_t *log_port_list_p, uint32_t *port_cnt_p)
 
sx_status_t sx_api_fdb_mc_mac_addr_iter_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, const sx_fdb_mc_mac_key_t *key_p, const sx_fdb_mc_mac_filter_t *filter_p, sx_fdb_mc_mac_key_t *key_list_p, uint32_t *key_cnt_p)
 
sx_status_t sx_api_fdb_mc_mac_addr_group_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_fdb_mac_key_t *group_key, const sx_fdb_mac_data_t *data)
 
sx_status_t sx_api_fdb_mc_mac_addr_group_get (const sx_api_handle_t handle, const sx_fdb_mac_key_t *group_key, sx_fdb_mac_data_t *data_p)
 
sx_status_t sx_api_fdb_uc_flush_all_set (const sx_api_handle_t handle, const sx_swid_t swid)
 
sx_status_t sx_api_fdb_uc_flush_port_set (const sx_api_handle_t handle, const sx_port_log_id_t log_port)
 
sx_status_t sx_api_fdb_uc_flush_fid_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid)
 
sx_status_t sx_api_fdb_uc_flush_port_fid_set (const sx_api_handle_t handle, const sx_port_log_id_t log_port, const sx_fid_t fid)
 
sx_status_t sx_api_fdb_mc_flush_all_set (const sx_api_handle_t handle, const sx_swid_t swid)
 
sx_status_t sx_api_fdb_mc_flush_fid_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid)
 
sx_status_t sx_api_fdb_fid_vlan_member_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, const sx_fid_t fid, const sx_vid_t vid)
 
sx_status_t sx_api_fdb_global_params_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fdb_learn_ctrl_t learn_ctrl)
 
sx_status_t sx_api_fdb_global_params_get (const sx_api_handle_t handle, const sx_swid_t swid, sx_fdb_learn_ctrl_t *learn_ctrl_p)
 
sx_status_t sx_api_fdb_learn_mode_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fdb_learn_mode_t learn_mode)
 
sx_status_t sx_api_fdb_learn_mode_get (const sx_api_handle_t handle, const sx_swid_t swid, sx_fdb_learn_mode_t *learn_mode_p)
 
sx_status_t sx_api_fdb_fid_learn_mode_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid, const sx_fdb_learn_mode_t learn_mode)
 
sx_status_t sx_api_fdb_fid_learn_mode_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid, sx_fdb_learn_mode_t *learn_mode_p)
 
sx_status_t sx_api_fdb_port_learn_mode_set (const sx_api_handle_t handle, const sx_port_log_id_t log_port, const sx_fdb_learn_mode_t learn_mode)
 
sx_status_t sx_api_fdb_port_learn_mode_get (const sx_api_handle_t handle, const sx_port_log_id_t log_port, sx_fdb_learn_mode_t *learn_mode_p)
 
sx_status_t sx_api_fdb_notify_params_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fdb_notify_params_t *notify_params_p)
 
sx_status_t sx_api_fdb_notify_params_get (const sx_api_handle_t handle, const sx_swid_t swid, sx_fdb_notify_params_t *notify_params_p)
 
sx_status_t sx_api_fdb_flood_control_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, const sx_fid_t fid, sx_flood_control_type_t type, const uint16_t ports_count, const sx_port_log_id_t *const ports_list)
 
sx_status_t sx_api_fdb_flood_control_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid, sx_flood_control_type_t type, uint16_t *const ports_count, sx_port_log_id_t *const ports_list)
 
sx_status_t sx_api_fdb_flood_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, const sx_fid_t fid, const sx_mc_container_id_t flood_vector)
 
sx_status_t sx_api_fdb_flood_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_fid_t fid, sx_mc_container_id_t *flood_vector)
 
sx_status_t sx_api_fdb_flood_counter_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_swid_t swid, sx_flood_counters_t *const counters)
 
sx_status_t sx_api_fdb_flood_counter_clear (const sx_api_handle_t handle, const sx_swid_t swid)
 
sx_status_t sx_api_fdb_src_miss_protect_set (const sx_api_handle_t handle, const sx_port_log_id_t log_port, const boolean_t enable)
 
sx_status_t sx_api_fdb_src_miss_protect_get (const sx_api_handle_t handle, const sx_port_log_id_t log_port, boolean_t *enable_p)
 
sx_status_t sx_api_fdb_src_miss_protect_drop_cntr_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd)
 
sx_status_t sx_api_fdb_src_miss_protect_drop_cntr_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, uint64_t *dropped_pkts_cntr)
 
sx_status_t sx_api_fdb_igmpv3_state_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_fid_t fid, const sx_fdb_igmpv3_state_t fdb_igmpv3_snooping_state)
 
sx_status_t sx_api_fdb_igmpv3_state_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_fid_t fid, sx_fdb_igmpv3_state_t *fdb_igmpv3_snooping_state)
 
sx_status_t sx_api_fdb_mc_ip_addr_group_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_fdb_mc_ip_key_t *mc_fdb_mc_ip_key, const sx_fdb_mc_ip_action_t *fdb_mc_ip_action)
 
sx_status_t sx_api_fdb_mc_ip_addr_group_get (const sx_api_handle_t handle, const sx_fdb_mc_ip_key_t *mc_fdb_mc_ip_key, sx_fdb_mc_ip_action_t *fdb_mc_ip_action_p)
 
sx_status_t sx_api_fdb_mc_ip_addr_group_counter_bind_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_fdb_mc_ip_key_t *key_p, const sx_flow_counter_id_t counter_id)
 
sx_status_t sx_api_fdb_mc_ip_addr_group_counter_bind_get (const sx_api_handle_t handle, const sx_fdb_mc_ip_key_t *key_p, sx_flow_counter_id_t *counter_id_p)
 
sx_status_t sx_api_fdb_unreg_mc_flood_mode_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_vid_t vid, const sx_fdb_unreg_flood_mode_t urmc_flood_mode)
 
sx_status_t sx_api_fdb_unreg_mc_flood_mode_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_vid_t vid, sx_fdb_unreg_flood_mode_t *urmc_flood_mode_p)
 
sx_status_t sx_api_fdb_unreg_mc_flood_ports_set (const sx_api_handle_t handle, const sx_swid_t swid, const sx_vid_t vid, const sx_port_log_id_t *log_port_list_p, const uint32_t port_cnt)
 
sx_status_t sx_api_fdb_unreg_mc_flood_ports_get (const sx_api_handle_t handle, const sx_swid_t swid, const sx_vid_t vid, sx_port_log_id_t *log_port_list_p, uint32_t *port_cnt_p)
 
sx_status_t sx_api_fdb_mc_ip_addr_group_activity_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_fdb_mc_ip_key_t *key_p, boolean_t *activity_p)
 
sx_status_t sx_api_fdb_mc_ip_addr_group_activity_notify (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_fdb_mc_ip_filter_t *filter_p)
 

Function Documentation

◆ sx_api_fdb_log_verbosity_level_set()

sx_status_t sx_api_fdb_log_verbosity_level_set ( const sx_api_handle_t  handle,
const sx_log_verbosity_target_t  verbosity_target,
const sx_verbosity_level_t  module_verbosity_level,
const sx_verbosity_level_t  api_verbosity_level 
)

This API sets the log verbosity level of FDB MODULE.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]verbosity_target- set verbosity of : API / MODULE / BOTH
[in]module_verbosity_level- FDB module verbosity level
[in]api_verbosity_level- FDB API verbosity level
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_log_verbosity_level_get()

sx_status_t sx_api_fdb_log_verbosity_level_get ( const sx_api_handle_t  handle,
const sx_log_verbosity_target_t  verbosity_target,
sx_verbosity_level_t *  module_verbosity_level_p,
sx_verbosity_level_t *  api_verbosity_level_p 
)

This API gets the log verbosity level of FDB MODULE.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]verbosity_target- get verbosity of : API / MODULE / BOTH
[out]module_verbosity_level_p- FDB module verbosity level
[out]api_verbosity_level_p- FDB API verbosity level
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_age_time_set()

sx_status_t sx_api_fdb_age_time_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fdb_age_time_t  age_time 
)

This function sets the FDB age time in seconds. Age time is the time after which automatically learned addresses are deleted from the FDB if they receive no traffic.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- switch ID
[in]age_time- time in seconds
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_age_time_get()

sx_status_t sx_api_fdb_age_time_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
sx_fdb_age_time_t *  age_time_p 
)

This function retrieves the FDB age time in seconds. Age time is the time after which automatically learned addresses are deleted from the FDB if they receive no traffic.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- switch ID
[out]age_time_p- time in seconds
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_poll_set()

sx_status_t sx_api_fdb_poll_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid 
)

This function sets the FDB poll for MAC entries notifications.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_NO_RESOURCES if there is no place in the jobs buffer
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_polling_interval_set()

sx_status_t sx_api_fdb_polling_interval_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fdb_polling_interval_t  interval 
)

This function sets the FDB polling interval at 0.1 second granularity.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]interval- polling interval in 0.1 seconds
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_polling_interval_get()

sx_status_t sx_api_fdb_polling_interval_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
sx_fdb_polling_interval_t *  interval 
)

This function gets the FDB polling interval in 0.1 second granularity.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]interval- polling interval in 0.1 seconds
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error
SX_STATUS_PARAM_NULL if parameter is NULL.

◆ sx_api_fdb_uc_mac_addr_set()

sx_status_t sx_api_fdb_uc_mac_addr_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
sx_fdb_uc_mac_addr_params_t *  mac_list_p,
uint32_t *  data_cnt_p 
)

This function adds/deletes UC MAC and UC LAG MAC entries to/from the FDB. In case the operation fails on one entry (or more), an error is returned, mac_list_p stores those entries, and their quantity is stored in data_cnt. If the operation is completed successfully, SUCCESS is returned, and data_cnt_p and mac_list_p are not changed.

Supported devices: Spectrum, Spectrum2.

When in 802.1D mode, instead of providing a vid(Vlan ID) or fid (filtering ID) in mac_list_p->fid_vid, you should provide a bridge_id.

Parameters
[in]handle- SX-API handle
[in]cmd- ADD/DELETE
[in]swid- virtual switch partition ID
[in,out]mac_list_p- list of MAC record parameters. Upon deletion, entry_type is DONT_CARE
[in,out]data_cnt_p- number of MAC records to ADD/DELETE
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_NO_RESOURCES if the FDB hash bin is full
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_mac_addr_get()

sx_status_t sx_api_fdb_uc_mac_addr_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_access_cmd_t  cmd,
const sx_fdb_uc_mac_entry_type_t  mac_type,
const sx_fdb_uc_mac_addr_params_t *  key_p,
const sx_fdb_uc_key_filter_t *  key_filter_p,
sx_fdb_uc_mac_addr_params_t *  mac_list_p,
uint32_t *  data_cnt_p 
)

This function reads MAC entries from the SW FDB table, which is an exact copy of the HW DB on any device. The output supports up to SX_FDB_MAX_GET_ENTRIES entries whose default is 64.

The function can receive three types of input:

  • 1) get information for current MAC + vlan - you should insert MAC+VLAN data in the key variable. data_cnt_p should be equal to 1. cmd should be SX_ACCESS_CMD_GET.
  • 2) get a list of first n<=64 MACs - data_cnt_p should be equal to n. mac_type is the type you want to receive. key_filter_p is the filter type(s) you want to filter the results by. cmd should be SX_ACCESS_CMD_GET_FIRST.
  • 3) get a list of n<=64 MACs which comes after certain MAC record (it does not have to exist) you should insert MAC+VLAN data in the key variable. data_cnt_p should be equal to n. mac_type is the type you want to receive. key_filter_p is the filter type(s) you want to filter the results by. cmd should be SX_ACCESS_CMD_GETNEXT.

mac_list_p returns the records info and their quantity in data_cnt_p for all types of requests.

When in 802.1D mode, instead of providing a vid(Vlan ID) or fid (filtering ID) in key_p->fid_vid and fid in key_filter_p->fid, you should provide a bridge_id. bridge_id's will be stored in mac_list_p->fid_vid

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]cmd- get, get_next, get first
[in]mac_type- static, dynamic, all
[in]key_p- MAC entry with information for search (MAC+FID)
[in]key_filter_p- filter types used on the mac_list_p - FID/MAC/logical port
[out]mac_list_p- pointer to list
[in,out]data_cnt_p- number of entries to retrieve, also retrieved number of entries
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_count_get()

sx_status_t sx_api_fdb_uc_count_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
uint32_t *  data_cnt_p 
)

This function counts all MAC entries in the SW FDB table (static and dynamic).

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition id
[out]data_cnt_p- retrieved number of entries
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if the SWID is out of range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_port_count_get()

sx_status_t sx_api_fdb_uc_port_count_get ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port,
uint32_t *  data_cnt_p 
)

This function retrieves the amount of MACs learned on a port (static and dynamic).

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port ID
[out]data_cnt_p- retrieved number of entries
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_MESSAGE_SIZE_ZERO if message size is zero
SX_STATUS_MESSAGE_SIZE_EXCEEDS_LIMIT if message size exceeds limit
SX_STATUS_INVALID_HANDLE for an invalid handle
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_fid_count_get()

sx_status_t sx_api_fdb_uc_fid_count_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid,
uint32_t *  data_cnt_p 
)

This function retrieves the amount of MACs learned on an FID (static and dynamic).

When in 802.1D mode, instead of providing a fid (filtering ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]fid- filtering DB ID
[out]data_cnt_p- retrieved number of entries
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_MESSAGE_SIZE_ZERO if message size is zero
SX_STATUS_MESSAGE_SIZE_EXCEEDS_LIMIT if message size exceeds limit
SX_STATUS_INVALID_HANDLE for an invalid handle
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_PARAM_EXCEEDS_RANGE if FID/SWID is out of range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_limit_port_set()

sx_status_t sx_api_fdb_uc_limit_port_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_port_log_id_t  log_port,
const uint32_t  limit 
)

This function sets/removes the limit on the amount of dynamic MACs learned on a port.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- SET/DELETE
[in]log_port- logical port ID
[in]limit- when SET command is used, this is the new limit to set (between 0 and SX_FDB_MAX_ENTRIES)
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_MESSAGE_SIZE_ZERO if message size is zero
SX_STATUS_MESSAGE_SIZE_EXCEEDS_LIMIT if message size exceeds limit
SX_STATUS_INVALID_HANDLE for an invalid handle
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_PARAM_EXCEEDS_RANGE if limit is out of range
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_limit_port_get()

sx_status_t sx_api_fdb_uc_limit_port_get ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port,
uint32_t *  limit_p 
)

This function retrieves the maximum amount of dynamic MACs that can be learned on a port.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port ID
[out]limit_p- the result limit. If no limit is set SX_FDB_MAX_ENTRIES is returned.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_MESSAGE_SIZE_ZERO if message size is zero
SX_STATUS_MESSAGE_SIZE_EXCEEDS_LIMIT if message size exceeds limit
SX_STATUS_INVALID_HANDLE for an invalid handle
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_limit_fid_set()

sx_status_t sx_api_fdb_uc_limit_fid_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
const sx_fid_t  fid,
const uint32_t  limit 
)

This function sets/removes the limit on the amount of dynamic MACs learned on FID.

When in 802.1D mode, instead of providing a fid (filtering ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- SET/DELETE
[in]swid- virtual switch partition ID
[in]fid- filtering DB ID
[in]limit- when SET command is used, this is the new limit to set (between 0 and SX_FDB_MAX_ENTRIES)
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_MESSAGE_SIZE_ZERO if message size is zero
SX_STATUS_MESSAGE_SIZE_EXCEEDS_LIMIT if message size exceeds limit
SX_STATUS_INVALID_HANDLE for an invalid handle
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_PARAM_EXCEEDS_RANGE if the SWID/FID/limit is out of range
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_limit_fid_get()

sx_status_t sx_api_fdb_uc_limit_fid_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid,
uint32_t *  limit_p 
)

This function retrieves the maximum amount of dynamic MACs that can be learned on an FID.

When in 802.1D mode, instead of providing a fid (filtering ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]fid- filtering DB ID
[out]limit_p- the result limit. If no limit is set SX_FDB_MAX_ENTRIES is returned.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_MESSAGE_SIZE_ZERO if message size is zero
SX_STATUS_MESSAGE_SIZE_EXCEEDS_LIMIT if message size exceeds limit
SX_STATUS_INVALID_HANDLE for an invalid handle
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_PARAM_EXCEEDS_RANGE if the FID/SWID is out of range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_mac_addr_set()

sx_status_t sx_api_fdb_mc_mac_addr_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
const sx_vid_t  vid,
const sx_mac_addr_t  group_addr,
const sx_port_log_id_t *  log_port_list_p,
const uint32_t  port_cnt 
)
 This function adds/deletes MC MAC entries from the FDB.
 Note: MC entries cannot be created and associated with ports at the same time.

 Note: The log_port_list_p list should not contain the
        logical port items which are specified as an Ethernet
        port and which are members of a LAG port at same time.

 When the ADD command is requested this function performs the following:
 - checks a MC group is already created and returns FAILURE if yes;
 - allocates and stores the MC group;

 When the DELETE command is requested this function performs the following
 for each leaf device:
 - deletes MC FDB records
 - deletes FDB MC ID records
 - deletes SPGT record
 - deletes MC group from MCDB
 - returns pgi into the pool

 When Edit (add_port) command is requested this function performs
 the following:
 - updates the MC DB for adding logical ports and LAG ports
 - for each leaf device:
   - retrieves a list of LAG-member logical ports from LAGLib for
     all LAG logical ports which belong to this MC group
   - updates the SPGT record for adding the spine, MC members and
     LAGs member ports
   - adds local ports to FDB MC ID records (if FDB look-up
     by MC ID is allowed on leaf devices)

 When Edit (delete_port) command is requested this function performs
 the following:
 - updates MC DB for deleting logical ports and LAG ports
 - for each leaf device:
   - updates the SPGT record for deleting requested ports
     (if logical port is a LAG port then all LAG-member logical ports
     are removed);
   - removes local ports from FDB MC ID records
     (if FDB look up by MC ID is allowed on leaf devices)

 When in 802.1D mode, instead of providing a vid (Vlan ID),
 you should provide a bridge_id.

 Supported devices: Spectrum, Spectrum2.
Parameters
[in]handle- SX-API handle
[in]cmd- add/delete/add port/delete port/test
[in]swid- virtual switch partition ID
[in]vid- filtering DB ID
[in]group_addr- MAC group address
[in]log_port_list_p- a pointer to a port list
[in]port_cnt- size of port list
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_mac_addr_get()

sx_status_t sx_api_fdb_mc_mac_addr_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_vid_t  vid,
const sx_mac_addr_t  group_addr,
sx_port_log_id_t *  log_port_list_p,
uint32_t *  port_cnt_p 
)

This function retrieves MC MAC entries data. NOTE: The log_port_list_p list contains LAG-port IDs only and does not contain LAG members' logical-port IDs.

When in 802.1D mode, instead of providing a vid (Vlan ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]vid- filtering DB ID
[in]group_addr- MAC group address
[out]log_port_list_p- a pointer to a port list
[in,out]port_cnt_p- size of port list
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_mac_addr_iter_get()

sx_status_t sx_api_fdb_mc_mac_addr_iter_get ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
const sx_fdb_mc_mac_key_t *  key_p,
const sx_fdb_mc_mac_filter_t *  filter_p,
sx_fdb_mc_mac_key_t *  key_list_p,
uint32_t *  key_cnt_p 
)

This function retrieves a list of one or more MC MAC keys (VLAN ID + MC MAC address). When in 802.1D mode, instead of providing a vid (VLAN ID) in key_p->vid and filter_p->vid, you should provide a bridge_id. In 802.1D mode, returned bridge_id's will be stored in key_list_p->vid. The following use case scenarios apply with different input parameters X = don't-care

  • 1) cmd = SX_ACCESS_CMD_GET, swid = valid, key = X, filter = valid/invalid, key_list = X key_cnt = 0: In this case the API will return the total number of MC MAC keys filtered by the filter parameter if present.
  • 2) cmd = SX_ACCESS_CMD_GET, swid = valid, key = valid/invalid, filter = valid/invalid, key_list = valid, key_cnt = 1: The MC MAC key will be returned in the key_list along with a key_cnt of 1 in the following conditions: a) the key exists, a filter is provided and the key matches the filter b) the key exists, no filter is provided An empty list will be returned with key_cnt = 0 in the following conditions: a) the key doesn't exist b) the key exists, a filter is provided and the key doesn't match the filter A non-NULL key_list pointer must be provided in this case.
  • 3) cmd = SX_ACCESS_CMD_GET, swid = valid, key = valid/invalid, filter = valid/invalid, key_list = valid, key_cnt > 1: An key_cnt > 1 will be treated as a key_cnt of 1 and the behavior will be same as the earlier GET use cases.
  • 4) cmd = SX_ACCESS_CMD_GET_FIRST/SX_ACCESS_CMD_GETNEXT, swid = X, key = X, filter = X, key_list = NULL, key_cnt = 0: A zero key_cnt and an empty key_list will be returned.
  • 5) cmd = SX_ACCESS_CMD_GET_FIRST, swid = valid, key = X, filter = valid/invalid, key_list = valid, key_cnt > 0: In this case the API will return a list of MC MAC keys (max key_cnt) starting with first key of the internal DB and matching the filter if present. The input MC MAC key is ignored in this case. A non-NULL key_list pointer must be provided in this case.
  • 6) cmd = SX_ACCESS_CMD_GETNEXT, swid = valid, key = valid/invalid, filter = valid/invalid, key_list = valid, key_cnt > 0: In this case the API will return a list of MC MAC keys (max key_cnt) starting with the next key after the input key and matching the filter if present. A non-NULL key_list pointer must be provided in this case.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- GET/GET_FIRST/GET_NEXT
[in]swid- virtual switch partition ID
[in]key_p- MC MAC key (VLAN ID + MC MAC address)
[in]filter_p- specify a filter parameter
[out]key_list_p- return list of MC MAC keys
[in,out]key_cnt_p- [in] number of MC MAC keys to get
  • [out] number of MC MAC keys returned
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_mac_addr_group_set()

sx_status_t sx_api_fdb_mc_mac_addr_group_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_fdb_mac_key_t *  group_key,
const sx_fdb_mac_data_t *  data 
)

This function adds/deletes MC MAC entries from the FDB. using multicast container as destination.

When in 802.1D mode, instead of providing a vid (Vlan ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- add/delete
[in]group_key- {fid, mac} key for multicast
[in]data- fdb data including action and mc container id
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_mac_addr_group_get()

sx_status_t sx_api_fdb_mc_mac_addr_group_get ( const sx_api_handle_t  handle,
const sx_fdb_mac_key_t *  group_key,
sx_fdb_mac_data_t *  data_p 
)

This function get MC MAC entries from the FDB. using multicast container as destination.

When in 802.1D mode, instead of providing a vid (Vlan ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]group_key- {fid, mac} key for multicast
[out]data- fdb data including action and mc container id
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_flush_all_set()

sx_status_t sx_api_fdb_uc_flush_all_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid 
)

This function deletes all FDB table entries on a switch partition. Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition id
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_flush_port_set()

sx_status_t sx_api_fdb_uc_flush_port_set ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port 
)

This function deletes the FDB table entries that are related to a flushed port.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_flush_fid_set()

sx_status_t sx_api_fdb_uc_flush_fid_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid 
)

This function deletes all FDB table entries that were learned on the flushed FID.

When in 802.1D mode, instead of providing a fid (filtering ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]fid- filtering DB ID
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_uc_flush_port_fid_set()

sx_status_t sx_api_fdb_uc_flush_port_fid_set ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port,
const sx_fid_t  fid 
)

This function deletes all FDB table entries that were learned on the flushed FID and port.

When in 802.1D mode, instead of providing a fid (filtering ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port
[in]fid- filtering DB ID
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_flush_all_set()

sx_status_t sx_api_fdb_mc_flush_all_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid 
)

This function deletes all FDB MC tables on a switch partition.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_flush_fid_set()

sx_status_t sx_api_fdb_mc_flush_fid_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid 
)

This function deletes all FDB MC table entries that were learned on the flushed FID on a switch partition.

When in 802.1D mode, instead of providing a fid (filtering ID), you should provide a bridge_id.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]fid- filtering DB ID
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_fid_vlan_member_set()

sx_status_t sx_api_fdb_fid_vlan_member_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
const sx_fid_t  fid,
const sx_vid_t  vid 
)

This function maps VLANs to filtering databases for shared VLAN learning (SVL) between VLANs. If independent VLAN learning is desired, a single VLAN should be mapped to a single FID.

When cmd=add This function adds FID to VID mapping record to the selected SWID. When cmd=delete This function deletes FID to VID mapping record from the selected SWID. The DEF_FID value is added to the corresponding VLAN.

NOTE: This API performs FDB flushing by FID before FID to VID mapping changing

NOTE: Only independent learning is supported in the current release.

This function is only valid when in 802.1Q mode.

Supported devices: Not supported.

Parameters
[in]handle- SX-API handle
[in]cmd- add/delete
[in]swid- virtual switch partition ID
[in]fid- filtering DB ID
[in]vid- VLAN ID
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_global_params_set()

sx_status_t sx_api_fdb_global_params_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fdb_learn_ctrl_t  learn_ctrl 
)

This API sets the SWID's learning parameters into the system's DB.

NOTE: Only independent learning is supported in the current release.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- switch (virtual) ID (whose parameters to set)
[in]learn_ctrl- is independent/shared learning and is roaming enabled/disabled
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_global_params_get()

sx_status_t sx_api_fdb_global_params_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
sx_fdb_learn_ctrl_t *  learn_ctrl_p 
)

This API retrieves the SWID's learning parameters from the system's DB.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- Switch (virtual) ID (whose parameters to retrieve)
[out]learn_ctrl_p- Is independent/shared learning and is roaming enabled/disabled
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_learn_mode_set()

sx_status_t sx_api_fdb_learn_mode_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fdb_learn_mode_t  learn_mode 
)

This function sets the FDB learning mode per SWID affecting all ports and VLANs in the SWID.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]learn_mode- new SWID's learn mode
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_learn_mode_get()

sx_status_t sx_api_fdb_learn_mode_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
sx_fdb_learn_mode_t *  learn_mode_p 
)

This function retrieves the FDB learning mode per SWID.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[out]learn_mode_p- SWID's learn mode
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_fid_learn_mode_set()

sx_status_t sx_api_fdb_fid_learn_mode_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid,
const sx_fdb_learn_mode_t  learn_mode 
)

This function sets FID's learn mode.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- switch ID
[in]fid- filtering identifier
[in]learn_mode- FID's learn mode
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_SXD_RETURNED_NON_ZERO if SxD driver function fails
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_fid_learn_mode_get()

sx_status_t sx_api_fdb_fid_learn_mode_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid,
sx_fdb_learn_mode_t *  learn_mode_p 
)

This function gets fid's learn mode.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- switch ID
[in]fid- filtering identifier
[out]learn_mode_p- FID's learn mode
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_SXD_RETURNED_NON_ZERO if SxD driver function fails
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_port_learn_mode_set()

sx_status_t sx_api_fdb_port_learn_mode_set ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port,
const sx_fdb_learn_mode_t  learn_mode 
)

This function sets port's learn mode.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port number
[in]learn_mode- port's learn mode
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_SXD_RETURNED_NON_ZERO if SxD driver function fails
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_port_learn_mode_get()

sx_status_t sx_api_fdb_port_learn_mode_get ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port,
sx_fdb_learn_mode_t *  learn_mode_p 
)

This function gets port's learn mode.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port number
[out]learn_mode_p- port's learn mode
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_SXD_RETURNED_NON_ZERO if SxD driver function fails
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_notify_params_set()

sx_status_t sx_api_fdb_notify_params_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fdb_notify_params_t *  notify_params_p 
)

This function sets FDB notify parameters. Note: Only takes effect when controlled learn mode is set.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]notify_params_p- new notify params
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_notify_params_get()

sx_status_t sx_api_fdb_notify_params_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
sx_fdb_notify_params_t *  notify_params_p 
)

This function gets FDB notify parameters.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition id
[out]notify_params_p- swid's notify params
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_flood_control_set()

sx_status_t sx_api_fdb_flood_control_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
const sx_fid_t  fid,
sx_flood_control_type_t  type,
const uint16_t  ports_count,
const sx_port_log_id_t *const  ports_list 
)

This function is used to block ports from flooding of selected FID.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- ADD_PORTS / DELETE_PORTS / DELETE_ALL_PORTS
[in]swid- virtual switch partition id
[in]fid- VID/Bridge-ID to apply blocking list
[in]type- Flood type to control.
[in]ports_count- Number of items in ports_list array
[in]ports_list- Array of logical ports
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_PARAM_NULL if ports_list is null and cmd is not DELETE_ALL_PORTS
SX_STATUS_UNSUPPORTED if flood control is not supported in the switch.
SX_STATUS_CMD_UNSUPPORTED Command provided is not supported.
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_flood_control_get()

sx_status_t sx_api_fdb_flood_control_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid,
sx_flood_control_type_t  type,
uint16_t *const  ports_count,
sx_port_log_id_t *const  ports_list 
)

This function is used to retrieve blocked ports from flooding of selected FID. ports count will be updated with the number of blocked ports. passing ports_count 0 and ports_list NULL, will return the number of ports in ports_count.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition id
[in]fid- VID/Bridge-ID to apply blocking list
[in]type- Flood type to control.
[in,out]ports_count- Number of items in ports_list array, returned as number of actual ports
[out]ports_list- (Optional) Array to fill blocked logical ports.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_UNSUPPORTED if flood control is not supported in the switch.
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_PARAM_NULL if ports_list is null and ports_count is not 0.
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_flood_set()

sx_status_t sx_api_fdb_flood_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
const sx_fid_t  fid,
const sx_mc_container_id_t  flood_vector 
)

This API is used to manage flood control for tunnels. Configuration from this API extends config from sx_api_fdb_flood_control_set for tunnel support. For each tunnel, you can add or remove flooding for specified bridge.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- ADD / DELETE / SET
[in]swid- virtual switch partition id
[in]fid- FID
[in]flood_vector- MC Container contains Flooding vector as ecmp object for head replication.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if tunnel or fid doesn't exists.
SX_STATUS_ENTRY_ALREADY_BOUND if fid already have flooding vector.
SX_STATUS_UNSUPPORTED if api is not supported for this device
SX_STATUS_ERROR general error

◆ sx_api_fdb_flood_get()

sx_status_t sx_api_fdb_flood_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_fid_t  fid,
sx_mc_container_id_t *  flood_vector 
)

This API is used to get flood control settings for a tunnel.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition id
[in]fid- FID
[out]flood_vector- MC Container contains Flooding vector as ecmp object for head replication.
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if flooding vector not set
SX_STATUS_UNSUPPORTED if api is not supported for this device
SX_STATUS_ERROR general error

◆ sx_api_fdb_flood_counter_get()

sx_status_t sx_api_fdb_flood_counter_get ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_swid_t  swid,
sx_flood_counters_t *const  counters 
)

This function is used to retrieve flooding counters of the switch.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- READ / READ_CLEAR
[in]swid- virtual switch partition id
[out]counters- counters struct to retrieve information to
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_UNSUPPORTED if flooding counters are not supported in the switch.
SX_STATUS_CMD_UNSUPPORTED if command provided is not supported.
SX_STATUS_PARAM_NULL if counters is null
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_flood_counter_clear()

sx_status_t sx_api_fdb_flood_counter_clear ( const sx_api_handle_t  handle,
const sx_swid_t  swid 
)

This function is used to clear flooding counters of the switch.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition id
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_UNSUPPORTED if flooding counters are not supported in the switch.

◆ sx_api_fdb_src_miss_protect_set()

sx_status_t sx_api_fdb_src_miss_protect_set ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port,
const boolean_t  enable 
)

This function sets port's fdb miss protect mode.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port number
[in]enable- enable smac miss port protection
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_SXD_RETURNED_NON_ZERO if SxD driver function fails
SX_STATUS_ERROR for a general error
SX_STATUS_PARAM_ERROR if an input parameter is invalid

◆ sx_api_fdb_src_miss_protect_get()

sx_status_t sx_api_fdb_src_miss_protect_get ( const sx_api_handle_t  handle,
const sx_port_log_id_t  log_port,
boolean_t *  enable_p 
)

This function gets port's fdb miss protect mode.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]log_port- logical port number
[out]enable_p- port's fdb miss protection enabled
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error
SX_STATUS_PARAM_ERROR if an input parameter is invalid

◆ sx_api_fdb_src_miss_protect_drop_cntr_set()

sx_status_t sx_api_fdb_src_miss_protect_drop_cntr_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd 
)

This function sets port's source miss protection drop counter.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- CREATE / DESTROY
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_SXD_RETURNED_NON_ZERO if SxD driver function fails
SX_STATUS_ERROR for a general error
SX_STATUS_PARAM_ERROR if an input parameter is invalid

◆ sx_api_fdb_src_miss_protect_drop_cntr_get()

sx_status_t sx_api_fdb_src_miss_protect_drop_cntr_get ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
uint64_t *  dropped_pkts_cntr 
)

This function gets port's source miss protection drop counter.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- GET / GET_AND_CLEAR
[out]dropped_pkts_cntr- port's source miss protection
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_SXD_RETURNED_NON_ZERO if SxD driver function fails
SX_STATUS_ERROR for a general error
SX_STATUS_PARAM_ERROR if an input parameter is invalid

◆ sx_api_fdb_igmpv3_state_set()

sx_status_t sx_api_fdb_igmpv3_state_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_fid_t  fid,
const sx_fdb_igmpv3_state_t  fdb_igmpv3_snooping_state 
)

This function set the IGMP v3 state.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- Command: Set
[in]fid- FID
[in]fdb_igmpv3_snooping_state- Enable/ Disable
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_igmpv3_state_get()

sx_status_t sx_api_fdb_igmpv3_state_get ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_fid_t  fid,
sx_fdb_igmpv3_state_t *  fdb_igmpv3_snooping_state 
)

This function get the IGMP v3 state.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- Command: Get
[in]fid- FID
[out]fdb_igmpv3_snooping_state-Pointer to the IGMP v3 state
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_ip_addr_group_set()

sx_status_t sx_api_fdb_mc_ip_addr_group_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_fdb_mc_ip_key_t *  mc_fdb_mc_ip_key,
const sx_fdb_mc_ip_action_t *  fdb_mc_ip_action 
)

This function set MC IP entries. using multicast container as destination.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]cmd- add/delete/delete_all
[in]mc_fdb_mc_ip_key- Structure contained the FID/SIP/DIP of the MC group
[in]fdb_mc_ip_action- Structure contained Action/Container ID/ Trap
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_ip_addr_group_get()

sx_status_t sx_api_fdb_mc_ip_addr_group_get ( const sx_api_handle_t  handle,
const sx_fdb_mc_ip_key_t *  mc_fdb_mc_ip_key,
sx_fdb_mc_ip_action_t *  fdb_mc_ip_action_p 
)

This function get MC IP entries. using multicast container as destination.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]mc_fdb_mc_ip_key- Structure contained the FID/SIP/DIP of the MC group
[out]fdb_mc_ip_action- Pointer to a Structure contained Action/Container ID/ Trap
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_ip_addr_group_counter_bind_set()

sx_status_t sx_api_fdb_mc_ip_addr_group_counter_bind_set ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_fdb_mc_ip_key_t *  key_p,
const sx_flow_counter_id_t  counter_id 
)

This function set bind counter to MC IP entry.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]key_p- Structure contained the FID/SIP/DIP of the MC group
[in]cmd- Command: SX_ACCESS_CMD_ADD/SX_ACCESS_CMD_DELETE
[in]counter_id- counter id for adding/deleting from rule
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_ip_addr_group_counter_bind_get()

sx_status_t sx_api_fdb_mc_ip_addr_group_counter_bind_get ( const sx_api_handle_t  handle,
const sx_fdb_mc_ip_key_t *  key_p,
sx_flow_counter_id_t *  counter_id_p 
)

This function get bound counter to MC IP entry.

Supported devices: Spectrum, Spectrum2.

Parameters
[in]handle- SX-API handle
[in]key_p- Structure contained the FID/SIP/DIP of the MC group
[out]counter_id- Pinter to counter
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_INVALID_HANDLE if a NULL handle is received
SX_STATUS_CMD_UNSUPPORTED if command is not supported
SX_STATUS_PARAM_EXCEEDS_RANGE if a parameter exceeds its range
SX_STATUS_PARAM_NULL if a parameter is NULL
SX_STATUS_NO_MEMORY if memory allocation fails
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ENTRY_ALREADY_EXISTS if group_addr is already added
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_unreg_mc_flood_mode_set()

sx_status_t sx_api_fdb_unreg_mc_flood_mode_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_vid_t  vid,
const sx_fdb_unreg_flood_mode_t  urmc_flood_mode 
)

This API sets unregistered MC flood mode.

Supported devices: Spectrum, Spectrum2.

When in 802.1D mode, instead of providing a vid(Vlan ID), you should provide a bridge_id.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]vid- VLAN ID
[in]urmc_flood_mode- unregistered MC flood mode: FLOOD / PRUNE
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_unreg_mc_flood_mode_get()

sx_status_t sx_api_fdb_unreg_mc_flood_mode_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_vid_t  vid,
sx_fdb_unreg_flood_mode_t *  urmc_flood_mode_p 
)

This API retrieves unregistered MC flood mode.

Supported devices: Spectrum, Spectrum2.

When in 802.1D mode, instead of providing a vid(Vlan ID), you should provide a bridge_id.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]vid- VLAN ID
[out]urmc_flood_mode_p- unregister MC flood mode: FLOOD / PRUNE
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_unreg_mc_flood_ports_set()

sx_status_t sx_api_fdb_unreg_mc_flood_ports_set ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_vid_t  vid,
const sx_port_log_id_t *  log_port_list_p,
const uint32_t  port_cnt 
)

This API sets unregistered MC flood ports.

Supported devices: Spectrum, Spectrum2.

When in 802.1D mode, instead of providing a vid(Vlan ID), you should provide a bridge_id.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]vid- VLAN ID
[in]log_port_list_p- a pointer to a port list, port may be a LAG or physical port
[in]port_cnt- size of port list
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_unreg_mc_flood_ports_get()

sx_status_t sx_api_fdb_unreg_mc_flood_ports_get ( const sx_api_handle_t  handle,
const sx_swid_t  swid,
const sx_vid_t  vid,
sx_port_log_id_t *  log_port_list_p,
uint32_t *  port_cnt_p 
)

This API retrieves unregistered MC flood ports.

Supported devices: Spectrum, Spectrum2.

When in 802.1D mode, instead of providing a vid(Vlan ID), you should provide a bridge_id.

Parameters
[in]handle- SX-API handle
[in]swid- virtual switch partition ID
[in]vid- VLAN ID
[out]log_port_list_p- a pointer to a port list, port can be LAG or physical port
[in,out]port_cnt_p- size of port list
Returns
SX_STATUS_SUCCESS if operation completes successfully
SX_STATUS_PARAM_ERROR if an input parameter is invalid
SX_STATUS_ENTRY_NOT_FOUND if requested element is not found in the DB
SX_STATUS_ERROR for a general error

◆ sx_api_fdb_mc_ip_addr_group_activity_get()

sx_status_t sx_api_fdb_mc_ip_addr_group_activity_get ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_fdb_mc_ip_key_t *  key_p,
boolean_t *  activity_p 
)

This function reads and clears multicast entry activity.

Supported devices: Spectrum, Spectrum2

Parameters
[in]handle- SX-API handle.
[in]cmd- READ\READ_CLEAR
[in]fdb_mc_key_p- mc entry key {fid, source IP address, group address}
[out]activity_p- activity state.
Returns
SX_STATUS_SUCCESS if operation completes successfully.
SX_STATUS_PARAM_EXCEEDS_RANGE if parameters exceed
SX_STATUS_NOT_FOUND if mc route is not found
SX_STATUS_ERROR general error

◆ sx_api_fdb_mc_ip_addr_group_activity_notify()

sx_status_t sx_api_fdb_mc_ip_addr_group_activity_notify ( const sx_api_handle_t  handle,
const sx_access_cmd_t  cmd,
const sx_fdb_mc_ip_filter_t *  filter_p 
)

This function initiates a notification regarding active mc fdb entries in the system.

Supported devices: Spectrum, Spectrum2

Parameters
[in]handle- SX-API handle
[in]cmd- READ\READ_CLEAR
[in]filter_p- activity notifier filter
Returns
SX_STATUS_SUCCESS if operation completes successfully.
SX_STATUS_PARAM_ERROR if parameter is invalid.
SX_STATUS_RESOURCE_IN_USE if a notification procedure is already running.
SX_STATUS_ERROR general error.