|
Mellanox SwitchX SDK API Guide
4.3.2104
|
Go to the source code of this file.
Functions | |
| sx_status_t | sx_api_router_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_router_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_router_ecmp_hash_params_set (const sx_api_handle_t handle, const sx_router_ecmp_hash_params_t *ecmp_hash_params_p) |
| sx_status_t | sx_api_router_ecmp_port_hash_params_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_port_log_id_t log_port, const sx_router_ecmp_port_hash_params_t *ecmp_hash_params_p, const sx_router_ecmp_hash_field_enable_t *hash_field_enable_list_p, const uint32_t hash_field_enable_list_cnt, const sx_router_ecmp_hash_field_t *hash_field_list_p, const uint32_t hash_field_list_cnt) |
| sx_status_t | sx_api_router_ecmp_hash_params_get (const sx_api_handle_t handle, sx_router_ecmp_hash_params_t *ecmp_hash_params_p) |
| sx_status_t | sx_api_router_ecmp_port_hash_params_get (const sx_api_handle_t handle, const sx_port_log_id_t log_port, sx_router_ecmp_port_hash_params_t *ecmp_hash_params_p, sx_router_ecmp_hash_field_enable_t *hash_field_enable_list_p, uint32_t *hash_field_enable_list_cnt_p, sx_router_ecmp_hash_field_t *hash_field_list_p, uint32_t *hash_field_list_cnt_p) |
| sx_status_t | sx_api_router_init_set (const sx_api_handle_t handle, const sx_router_general_param_t *general_params_p, const sx_router_resources_param_t *router_resource_p) |
| sx_status_t | sx_api_router_deinit_set (const sx_api_handle_t handle) |
| sx_status_t | sx_api_router_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_attributes_t *router_attr, sx_router_id_t *vrid) |
| sx_status_t | sx_api_router_get (const sx_api_handle_t handle, const sx_router_id_t vrid, sx_router_attributes_t *router_attr) |
| sx_status_t | sx_api_router_vrid_iter_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid_key, const sx_vrid_filter_t *vrid_filter_p, sx_router_id_t *vrid_list_p, uint32_t *vrid_cnt_p) |
| sx_status_t | sx_api_router_interface_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_router_interface_param_t *ifc_p, const sx_interface_attributes_t *ifc_attr_p, sx_router_interface_t *rif_p) |
| sx_status_t | sx_api_router_interface_get (const sx_api_handle_t handle, const sx_router_interface_t rif, sx_router_id_t *vrid_p, sx_router_interface_param_t *ifc_p, sx_interface_attributes_t *ifc_attr_p) |
| sx_status_t | sx_api_router_interface_iter_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_interface_t *rif_key_p, const sx_rif_filter_t *filter_p, sx_router_interface_t *rif_list_p, uint32_t *rif_cnt_p) |
| sx_status_t | sx_api_router_interface_state_set (const sx_api_handle_t handle, const sx_router_interface_t rif, const sx_router_interface_state_t *rif_state_p) |
| sx_status_t | sx_api_router_interface_state_get (const sx_api_handle_t handle, const sx_router_interface_t rif, sx_router_interface_state_t *rif_state_p) |
| sx_status_t | sx_api_router_interface_mac_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_interface_t rif, const sx_mac_addr_t *mac_addr_list_p, const uint32_t mac_addr_cnt) |
| sx_status_t | sx_api_router_interface_mac_get (const sx_api_handle_t handle, const sx_router_interface_t rif, sx_mac_addr_t *mac_addr_list_p, uint32_t *mac_addr_cnt_p) |
| sx_status_t | sx_api_router_neigh_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_interface_t rif, const sx_ip_addr_t *ip_addr_p, const sx_neigh_data_t *neigh_data_p) |
| sx_status_t | sx_api_router_neigh_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_interface_t rif, const sx_ip_addr_t *neigh_key_p, const sx_neigh_filter_t *filter_p, sx_neigh_get_entry_t *neigh_entry_list_p, uint32_t *neigh_entry_cnt_p) |
| sx_status_t | sx_api_router_neigh_activity_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_interface_t rif, const sx_ip_addr_t *ip_addr_p, boolean_t *activity_p) |
| sx_status_t | sx_api_router_uc_route_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_ip_prefix_t *network_addr, sx_uc_route_data_t *uc_route_data_p) |
| sx_status_t | sx_api_router_uc_route_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_ip_prefix_t *network_addr, sx_uc_route_key_filter_t *filter_p, sx_uc_route_get_entry_t *uc_route_get_entries_list_p, uint32_t *uc_route_get_entries_cnt_p) |
| sx_status_t | sx_api_router_uc_route_operational_ecmp_get (const sx_api_handle_t handle, const sx_router_id_t vrid, const sx_ip_prefix_t *network_addr_p, sx_uc_route_get_entry_t *oper_uc_route_entries_p) |
| sx_status_t | sx_api_router_uc_route_counter_bind_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_ip_prefix_t *network_addr_p, const sx_flow_counter_id_t counter_id) |
| sx_status_t | sx_api_router_uc_route_counter_bind_get (const sx_api_handle_t handle, const sx_router_id_t vrid, const sx_ip_prefix_t *network_addr_p, sx_flow_counter_id_t *counter_id_p) |
| sx_status_t | sx_api_router_counter_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, sx_router_counter_id_t *counter_p) |
| sx_status_t | sx_api_router_counter_extended_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_counter_attributes_t cntr_attributes, sx_router_counter_id_t *counter_p) |
| sx_status_t | sx_api_router_interface_counter_bind_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_counter_id_t counter, const sx_router_interface_t rif) |
| sx_status_t | sx_api_router_interface_counter_bind_get (const sx_api_handle_t handle, const sx_router_counter_id_t counter, sx_router_interface_t *rif_p) |
| sx_status_t | sx_api_router_counter_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_counter_id_t counter, sx_router_counter_set_t *counter_set_p) |
| sx_status_t | sx_api_router_counter_extended_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_counter_id_t counter_id, sx_router_counter_set_extended_t *counter_data_p) |
| sx_status_t | sx_api_router_counter_clear_set (const sx_api_handle_t handle, const sx_router_counter_id_t counter, const boolean_t all) |
| sx_status_t | sx_api_router_mc_route_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_mc_route_key_t *mc_route_key_p, const sx_mc_route_attributes_t *mc_route_attr_p, const sx_mc_route_data_t *mc_route_data_p) |
| sx_status_t | sx_api_router_mc_route_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_mc_route_key_t *mc_route_key_p, sx_mc_route_key_filter_t *filter_p, sx_mc_route_get_entry_t *mc_route_get_entries_list_p, uint32_t *mc_route_get_entries_cnt_p) |
| sx_status_t | sx_api_router_mc_route_activity_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_mc_route_key_t *mc_route_key_p, boolean_t *activity_p) |
| sx_status_t | sx_api_router_mc_route_activity_notify (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_mc_route_activity_notify_filter_t *filter_p) |
| sx_status_t | sx_api_router_mc_egress_rif_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_mc_route_key_t *mc_route_key_p, const sx_router_interface_t *egress_rif_list_p, const uint32_t egress_rif_cnt) |
| sx_status_t | sx_api_router_mc_egress_rif_get (const sx_api_handle_t handle, const sx_router_id_t vrid, const sx_mc_route_key_t *mc_route_key_p, sx_router_interface_t *egress_rif_list_p, uint32_t *egress_rif_cnt) |
| sx_status_t | sx_api_router_cos_rewrite_pcpdei_enable_set (const sx_api_handle_t handle, const sx_cos_pcp_dei_rewrite_e rewrite_pcp_dei) |
| sx_status_t | sx_api_router_cos_rewrite_pcpdei_enable_get (const sx_api_handle_t handle, sx_cos_pcp_dei_rewrite_e *rewrite_pcp_dei_p) |
| sx_status_t | sx_api_router_cos_prio_update_enable_set (const sx_api_handle_t handle, const boolean_t update_priority_color) |
| sx_status_t | sx_api_router_cos_prio_update_enable_get (const sx_api_handle_t handle, boolean_t *update_priority_color_p) |
| sx_status_t | sx_api_router_cos_dscp_to_prio_set (const sx_api_handle_t handle, const sx_cos_dscp_t *dscp_p, const sx_cos_priority_color_t *priority_color_p, const uint32_t element_cnt) |
| sx_status_t | sx_api_router_cos_dscp_to_prio_get (const sx_api_handle_t handle, sx_cos_dscp_t *dscp_p, sx_cos_priority_color_t *priority_color_p, uint32_t *element_cnt_p) |
| sx_status_t | sx_api_router_ecmp_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, sx_ecmp_id_t *ecmp_id_p, sx_next_hop_t *next_hop_list_p, uint32_t *next_hop_cnt_p) |
| sx_status_t | sx_api_router_ecmp_get (const sx_api_handle_t handle, const sx_ecmp_id_t ecmp_id, sx_next_hop_t *next_hop_list_p, uint32_t *next_hop_cnt_p) |
| sx_status_t | sx_api_router_ecmp_iter_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_ecmp_id_t ecmp_id, const sx_ecmp_filter_t *filter_p, sx_ecmp_id_t *ecmp_list_p, uint32_t *ecmp_cnt_p) |
| sx_status_t | sx_api_router_operational_ecmp_get (const sx_api_handle_t handle, const sx_ecmp_id_t ecmp_id, sx_next_hop_t *next_hop_list_p, uint32_t *next_hop_cnt_p) |
| sx_status_t | sx_api_router_ecmp_counter_bind_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_ecmp_id_t ecmp_id, const sx_flow_counter_id_t *counter_id_list_p, const uint32_t *offset_list_p, const uint32_t elements_cnt) |
| sx_status_t | sx_api_router_ecmp_fine_grain_counter_bind_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_ecmp_id_t ecmp_id, const sx_flow_counter_id_t counter_id, const uint32_t *offset_list_p, const uint32_t elements_cnt) |
| sx_status_t | sx_api_router_neigh_activity_notify (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_neigh_activity_filter_t *filter_p) |
| sx_status_t | sx_api_router_ecmp_attributes_set (const sx_api_handle_t handle, const sx_ecmp_id_t ecmp_id, const sx_ecmp_attributes_t *attr_p) |
| sx_status_t | sx_api_router_ecmp_attributes_get (const sx_api_handle_t handle, const sx_ecmp_id_t ecmp_id, sx_ecmp_attributes_t *attr_p) |
| sx_status_t | sx_api_router_ecmp_clone_set (const sx_api_handle_t handle, const sx_ecmp_id_t old_ecmp_id, sx_ecmp_id_t *new_ecmp_id_p) |
| sx_status_t | sx_api_router_mc_rpf_group_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, sx_rpf_group_id_t *rpf_group_id_p, sx_router_vinterface_t *rpf_vif_list_p, uint32_t rpf_vif_cnt) |
| sx_status_t | sx_api_router_mc_rpf_group_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, sx_rpf_group_id_t *rpf_group_id_p, sx_router_vinterface_t *rpf_vif_list_p, uint32_t *rpf_vif_cnt_p) |
| sx_status_t | sx_api_router_mc_route_counter_bind_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_router_id_t vrid, const sx_mc_route_key_t *mc_route_key_p, const sx_flow_counter_id_t counter_id) |
| sx_status_t | sx_api_router_mc_route_counter_bind_get (const sx_api_handle_t handle, const sx_router_id_t vrid, const sx_mc_route_key_t *mc_route_key_p, sx_flow_counter_id_t *counter_id_p) |
| sx_status_t sx_api_router_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 ROUTER MODULE. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | verbosity_target | - set verbosity of : API / MODULE / BOTH |
| [in] | module_verbosity_level | - ROUTER module verbosity level |
| [in] | api_verbosity_level | - ROUTER API verbosity level |
| sx_status_t sx_api_router_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 ROUTER MODULE. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | verbosity_target | - get verbosity of : API / MODULE / BOTH |
| [out] | module_verbosity_level_p | - ROUTER module verbosity level |
| [out] | api_verbosity_level_p | - ROUTER API verbosity level |
| sx_status_t sx_api_router_ecmp_hash_params_set | ( | const sx_api_handle_t | handle, |
| const sx_router_ecmp_hash_params_t * | ecmp_hash_params_p | ||
| ) |
This function sets the ECMP hash function configuration parameters. If ecmp_hash_params_p->symmetric_hash is TRUE, enabling bits in ecmp_hash_params_p->ecmp_hash This API is disabled once sx_api_router_ecmp_port_hash_params_set is called. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | ecmp_hash_param_p | - ECMP hash configuration parameters. |
| sx_status_t sx_api_router_ecmp_port_hash_params_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_port_log_id_t | log_port, | ||
| const sx_router_ecmp_port_hash_params_t * | ecmp_hash_params_p, | ||
| const sx_router_ecmp_hash_field_enable_t * | hash_field_enable_list_p, | ||
| const uint32_t | hash_field_enable_list_cnt, | ||
| const sx_router_ecmp_hash_field_t * | hash_field_list_p, | ||
| const uint32_t | hash_field_list_cnt | ||
| ) |
This function sets the ECMP port hash function configuration parameters. Once this API is called sx_api_router_ecmp_hash_params_set is disabled.
Each element in hash_field_enable_list_p enables a specific layer field to be included in the hash calculation according to the de-facto fields of the parsed packet. Each element in hash_field_list_p represents a different field to be included in the hash calculation, subject to the enables which are given in hash_field_enable_list_p.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - SET/ ADD/ DELETE. |
| [in] | log_port | - log port ID |
| [in] | ecmp_hash_params_p | - ECMP hash configuration parameters. |
| [in] | hash_field_enable_list_p | - Array of enables to be included in the hash calculation (may be NULL if empty) |
| [in] | hash_field_enable_list_cnt | - Number of elements in hash_field_enable_list_p |
| [in] | hash_field_list_p | - Array of fields to be included in the hash calculation (may be NULL if empty) |
| [in] | hash_field_list_cnt | - Number of elements in hash_field_list_p |
| sx_status_t sx_api_router_ecmp_hash_params_get | ( | const sx_api_handle_t | handle, |
| sx_router_ecmp_hash_params_t * | ecmp_hash_params_p | ||
| ) |
This function gets the ECMP hash function configuration parameters. This API is disabled once sx_api_router_ecmp_port_hash_params_set is called. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [out] | ecmp_hash_params_p | - ECMP hash configuration parameters. |
| sx_status_t sx_api_router_ecmp_port_hash_params_get | ( | const sx_api_handle_t | handle, |
| const sx_port_log_id_t | log_port, | ||
| sx_router_ecmp_port_hash_params_t * | ecmp_hash_params_p, | ||
| sx_router_ecmp_hash_field_enable_t * | hash_field_enable_list_p, | ||
| uint32_t * | hash_field_enable_list_cnt_p, | ||
| sx_router_ecmp_hash_field_t * | hash_field_list_p, | ||
| uint32_t * | hash_field_list_cnt_p | ||
| ) |
This function gets the ECMP hash function configuration parameters. if the given number of fields / fields enables is 0, the API will only return number of fields / enables.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | log_port | - local port |
| [out] | ecmp_hash_params_p | - ECMP hash configuration parameters. |
| [out] | hash_field_enable_list_p | - array of enables used in the hash calculation |
| [in/out] | hash_field_enable_list_cnt_p - number of objects in hash_field_list_p | |
| [out] | hash_field_list_p | - array of fields used in the hash calculation |
| [in/out] | hash_field_list_cnt_p - number of objects in hash_field_list_p |
| sx_status_t sx_api_router_init_set | ( | const sx_api_handle_t | handle, |
| const sx_router_general_param_t * | general_params_p, | ||
| const sx_router_resources_param_t * | router_resource_p | ||
| ) |
This function Initiates the router module in SDK. uc_params->ipv4_num requires a value larger than 30. mc_params->mc_routes->ipv4_num requires a value larger than
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | general_params_p | - general router parameters. |
| [in] | router_resource_p- | router resource parameter. |
In router_resource_p, max_vlan_router_interfaces is deprecated and will be removed in the future.
In router_resource_p, max_port_router_interfaces is deprecated and will be removed in the future.
| sx_status_t sx_api_router_deinit_set | ( | const sx_api_handle_t | handle | ) |
This api deinitializes the router block in the sdk. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| sx_status_t sx_api_router_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_attributes_t * | router_attr, | ||
| sx_router_id_t * | vrid | ||
| ) |
This function adds/deletes/edits a virtual router. The router ID is allocated and returned to the caller when cmd is ADD, otherwise it is given by the caller. All interfaces and routes associated with a router must be deleted before the router can be deleted as well.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - ADD/DELETE/EDIT. |
| [in] | router_attr | - Router attributes. |
| [in,out] | vrid | - Virtual router ID |
| sx_status_t sx_api_router_get | ( | const sx_api_handle_t | handle, |
| const sx_router_id_t | vrid, | ||
| sx_router_attributes_t * | router_attr | ||
| ) |
This function gets a virtual router information. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | vrid | - Virtual Router ID. |
| [out] | router_attr | - Router attributes. |
| sx_status_t sx_api_router_vrid_iter_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid_key, | ||
| const sx_vrid_filter_t * | vrid_filter_p, | ||
| sx_router_id_t * | vrid_list_p, | ||
| uint32_t * | vrid_cnt_p | ||
| ) |
This function gets a list of valid VRIDs. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | GET/GET_NEXT/GET_FIRST |
| [in] | vrid_key | - Virtual Router ID. |
| [in] | vrid_filter_p | - Filter to use (not supported yet) |
| [out] | vrid_list_p | - pointer to the list of valid VRIDs returned. |
| [in,out] | vrid_cnt_p | [in] number of entries to retrieve (max: 254).; [out] retrieved number of entries. |
Input/Output types
| sx_status_t sx_api_router_interface_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_router_interface_param_t * | ifc_p, | ||
| const sx_interface_attributes_t * | ifc_attr_p, | ||
| sx_router_interface_t * | rif_p | ||
| ) |
This function adds/modifies/deletes/delete_all a router interface. A router interface is associated with L2 interface. Supported devices: Spectrum, Spectrum2.
When in 802.1D mode, if ifc_p of type SX_L2_INTERFACE_TYPE_VLAN is provided, instead of providing ifc.vlan.vlan you should provide a bridge_id.
On Spectrum/Spectrum2 with command EDIT:
On Spectrum/Spectrum2 with command DELETE/DELETE_ALL:
On Spectrum/Spectrum2 the mac field in ifc_attr_p, is made from 38 bits of common base and only the last 10 bits can be different from one rif to another
On Spectrum/Spectrum2 the qos_mode field in ifc_attr_p is redundant, instead use the global router qos configuration. the rif must be aligned with the router global qos mode configured using sx_api_router_cos_prio_update_enable_set, or use SX_ROUTER_QOS_MODE_NOP to use the router global configured qos mode.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - ADD/EDIT/DELETE/DELETE ALL. |
| [in] | vrid | - Virtual Router ID. |
| [in] | ifc_p | - Interface type and parameters . |
| [in] | ifc_attr_p | -Interface attributes. |
| [in,out] | rif | - Router Interface ID. |
| sx_status_t sx_api_router_interface_get | ( | const sx_api_handle_t | handle, |
| const sx_router_interface_t | rif, | ||
| sx_router_id_t * | vrid_p, | ||
| sx_router_interface_param_t * | ifc_p, | ||
| sx_interface_attributes_t * | ifc_attr_p | ||
| ) |
This function gets a router interface information. Supported devices: Spectrum, Spectrum2.
When in 802.1D mode, if ifc_p of type SX_L2_INTERFACE_TYPE_VLAN is returned, instead of receiving a vlan ID on ifc.vlan.vlan, a bridge ID is provided.
| [in] | handle | - SX-API handle. |
| [in] | rif | - Router Interface ID. |
| [out] | vrid_p | - Virtual Router ID. |
| [out] | ifc_p | - Interface type and parameters . |
| [out] | ifc_attr_p | -Interface attributes. |
| sx_status_t sx_api_router_interface_iter_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_interface_t * | rif_key_p, | ||
| const sx_rif_filter_t * | filter_p, | ||
| sx_router_interface_t * | rif_list_p, | ||
| uint32_t * | rif_cnt_p | ||
| ) |
This function returns a list of one or more router interface identifiers. The following use case scenarios apply with different input parameters X = don't-care
Supported devices: Spectrum, Spectrum2.
| [in] | handle | : SX API handle |
| [in] | cmd | : GET/GET_FIRST/GET_NEXT |
| [in] | rif_key_p | : specify a rif key |
| [in] | filter | : specify a filter parameter |
| [out] | rif_list_p | : return list of rif ids |
| [in,out] | rif_cnt_p | : [in] number of rifs to get. max 400 : [out] number of rifs returned |
| sx_status_t sx_api_router_interface_state_set | ( | const sx_api_handle_t | handle, |
| const sx_router_interface_t | rif, | ||
| const sx_router_interface_state_t * | rif_state_p | ||
| ) |
This function sets admin state of a router interface. Admin state is set per IP protocol. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | rif | - Router Interface ID. |
| [in] | rif_state_p | - Admin state for unicast routing and multicast routing . |
| sx_status_t sx_api_router_interface_state_get | ( | const sx_api_handle_t | handle, |
| const sx_router_interface_t | rif, | ||
| sx_router_interface_state_t * | rif_state_p | ||
| ) |
This function gets admin state of a router interface. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | rif | - Router Interface ID. |
| [in] | rif_state_p | - Admin state for unicast routing and multicast routing . |
| sx_status_t sx_api_router_interface_mac_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_interface_t | rif, | ||
| const sx_mac_addr_t * | mac_addr_list_p, | ||
| const uint32_t | mac_addr_cnt | ||
| ) |
This function adds/deletes a MAC address from a router interface. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - ADD/DELETE/DELETE_ALL. |
| [in] | rif | - Router Interface ID. |
| [in] | mac_addr_list_p | - MAC addresses array. |
| [in] | mac_addr_cnt | - MAC addresses array size. |
| sx_status_t sx_api_router_interface_mac_get | ( | const sx_api_handle_t | handle, |
| const sx_router_interface_t | rif, | ||
| sx_mac_addr_t * | mac_addr_list_p, | ||
| uint32_t * | mac_addr_cnt_p | ||
| ) |
This function gets MAC address of a router interface. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | rif | - Router Interface ID. |
| [out] | mac_addr_list_p | - MAC addresses array. |
| [in,out] | mac_addr_cnt_p | - MAC addresses array size. |
| sx_status_t sx_api_router_neigh_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_interface_t | rif, | ||
| const sx_ip_addr_t * | ip_addr_p, | ||
| const sx_neigh_data_t * | neigh_data_p | ||
| ) |
This function adds/deletes/delete_all a neighbor information. The neighbor's information associates an IP address to a MAC address. The neighbor's IP addresses are learned via ARP/ND discovery at the control protocols layer. The interface that the neighbors are associated with is derived from the IP interface configuration.
When cmd = DELETE_ALL, all neighbors which match the ip_addr_p->version and the rif, will be deleted. In case rif is rm_resource_global.router_rifs_dontcare, all neighbors, on all rifs, corresponding with the ip_addr_p->version will be deleted. If ip_addr_p->version = SX_IP_VERSION_NONE then only IPv4 neighbors will be deleted.
In case action is SX_ROUTER_ACTION_TRAP_FORWARD/SX_ROUTER_ACTION_TRAP, trap ID will be set to SXD_TRAP_ID_RTR_EGRESS0 if trap priority is BEST EFFORT, LOW or MED, and SXD_TRAP_ID_RTR_EGRESS1 otherwise.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - ADD/DELETE/DELETE_ALL. |
| [in] | rif | - Router Interface Id |
| [in] | ip_addr | - IP address. |
| [in] | neigh_data_p | - Neighbors information. |
| sx_status_t sx_api_router_neigh_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_interface_t | rif, | ||
| const sx_ip_addr_t * | neigh_key_p, | ||
| const sx_neigh_filter_t * | filter_p, | ||
| sx_neigh_get_entry_t * | neigh_entry_list_p, | ||
| uint32_t * | neigh_entry_cnt_p | ||
| ) |
This function gets the neighbor's information.
The function can receive three types of input:
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - GET/GET_FIRST/ GET_NEXT. |
| [in] | rif | - Router Interface Id. |
| [in] | neigh_key_p | - neigh key. |
| [in] | filter_p | - neigh key_filter. |
| [out] | neigh_entry_list_p | - found neigh entries arr |
| [in,out] | neigh_entry_cnt_p | - found neigh entries num |
| sx_status_t sx_api_router_neigh_activity_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_interface_t | rif, | ||
| const sx_ip_addr_t * | ip_addr_p, | ||
| boolean_t * | activity_p | ||
| ) |
This function reads and cleans the neighbor's activity information. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - READ / READ_CLEAR |
| [in] | rif | - Router Interface Id. |
| [in] | ip_addr_p | - neigh IP address. |
| [out] | activity_p | - activity . |
| sx_status_t sx_api_router_uc_route_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_ip_prefix_t * | network_addr, | ||
| sx_uc_route_data_t * | uc_route_data_p | ||
| ) |
This function modifies unicast routes in the routing table. A route may have one of several types: IP2ME, LOCAL, or NEXT_HOP IP2ME routes trap traffic with the specified destination IP of the router host. Such traffic will have trap ID of IP2ME. Local routes allow IP forwarding to neighbors, and also trap traffic to unknown neighbors within the subnet. Such traffic will have trap ID of ARP-cache miss. Next-hop routes allow IP forwarding to next hop router(s) Next-hop routes must be defined with an ECMP container ID. ADD creates a new route and DELETE deletes an existing route. Command SET may be used to replace an existing route. This includes optionally changing its type. If a flow-counter is bound to the route, it stays bound. Command DELETE_ALL deletes all of the unicast routes of the specified virtual router, the specified route type in uc_route_data_p->type, and the IP protocol(s) in network_addr->version. If uc_route_data_p is NULL, then routes of type NEXT_HOP are deleted. If network_addr is NULL or network_addr->version is SX_IP_VERSION_NONE then all IPv4 routes of the specified type are deleted. For routes with action TRAP or TRAP_FORWARD, the trapped traffic will have Trap ID of SX_TRAP_ID_L3_UC_IP_BASE for trap priority BEST_EFFORT, LOW or MEDIUM, or (SX_TRAP_ID_L3_UC_IP_BASE+3) for higher trap priorities.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - ADD/SET/SOFT_ADD/DELETE/DELETE_ALL |
| [in] | vrid | - Virtual Router ID. |
| [in] | network_addr_p | - IP network address. |
| [in,out] | uc_route_data_p | - route data {ecmp id,action} |
| sx_status_t sx_api_router_uc_route_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_ip_prefix_t * | network_addr, | ||
| sx_uc_route_key_filter_t * | filter_p, | ||
| sx_uc_route_get_entry_t * | uc_route_get_entries_list_p, | ||
| uint32_t * | uc_route_get_entries_cnt_p | ||
| ) |
This function gets unicast route information from the routing table. The function can receive four types of input:
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - GET /GET_FIRST/ GETNEXT. |
| [in] | vrid | - Virtual Router ID. |
| [in] | network_addr | - IP network address |
| [in] | filter_p | - UC route key_filter. |
| [out] |
| sx_status_t sx_api_router_uc_route_operational_ecmp_get | ( | const sx_api_handle_t | handle, |
| const sx_router_id_t | vrid, | ||
| const sx_ip_prefix_t * | network_addr_p, | ||
| sx_uc_route_get_entry_t * | oper_uc_route_entries_p | ||
| ) |
This function retrieves active unicast ECMP route information from the routing table. When using oper_uc_route_entries_p->route_data.next_hop_cnt=0 only the number of next hops will be returned. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | vrid | - Virtual Router ID. |
| [in] | network_addr | - IP network address. |
| [out] | oper_uc_route_entries_p | - found uc route entry. |
| sx_status_t sx_api_router_uc_route_counter_bind_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_ip_prefix_t * | network_addr_p, | ||
| const sx_flow_counter_id_t | counter_id | ||
| ) |
Binds or un-binds a flow counter to an existing unicast route Note: A route may be created via a call to sx_api_router_uc_route_set() A flow counter may be created via a call to sx_api_flow_counter_set() Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | cmd | - BIND/UNBIND |
| [in] | vrid | - Virtual Router ID |
| [in] | network_addr_p | - Network prefix of a unicast route |
| [in] | counter_id | - A flow counter identifier. Applicable only for command BIND |
| sx_status_t sx_api_router_uc_route_counter_bind_get | ( | const sx_api_handle_t | handle, |
| const sx_router_id_t | vrid, | ||
| const sx_ip_prefix_t * | network_addr_p, | ||
| sx_flow_counter_id_t * | counter_id_p | ||
| ) |
Retrieves the flow counter currently bound to a specified unicast route Notes: A flow counter may be bound to a route via a call to sx_api_router_uc_route_counter_bind_set() If no counter if bound to the specified route, this function returns SUCCESS, and sets *counter_id_p to SX_FLOW_COUNTER_ID_INVALID Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | vrid | - Virtual Router ID |
| [in] | network_addr_p | - Network prefix of a unicast route |
| [out] | counter_id_p | - Returns the flow counter ID bound to the specified route |
| sx_status_t sx_api_router_counter_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| sx_router_counter_id_t * | counter_p | ||
| ) |
This function creates/destroys a router counter. A router counter should be bound later to a router interface. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - CREATE/DESTROY. |
| [in,out] | counter_p | - Router counter ID. |
| sx_status_t sx_api_router_counter_extended_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_counter_attributes_t | cntr_attributes, | ||
| sx_router_counter_id_t * | counter_p | ||
| ) |
This function creates/destroys a router counter by given type. A router counter should be bound later to a router interface. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - CREATE/DESTROY. |
| [in] | type | - Router counter type. |
| [in,out] | counter_p | - Router counter ID. |
| sx_status_t sx_api_router_interface_counter_bind_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_counter_id_t | counter, | ||
| const sx_router_interface_t | rif | ||
| ) |
This function binds/unbinds a router counter to a router interface. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - BIND/UNBIND. |
| [in] | counter | - Router counter ID. |
| [in] | rif | - Router Interface ID. |
| sx_status_t sx_api_router_interface_counter_bind_get | ( | const sx_api_handle_t | handle, |
| const sx_router_counter_id_t | counter, | ||
| sx_router_interface_t * | rif_p | ||
| ) |
This function gets a router counter bind of a router interface. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | counter | - Router counter ID. |
| [out] | rif_p | - Router Interface ID. |
| sx_status_t sx_api_router_counter_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_counter_id_t | counter, | ||
| sx_router_counter_set_t * | counter_set_p | ||
| ) |
This function gets a router counter. When using cmd=READ_CLEAR, the counters will be returned and cleared. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - READ/READ_CLEAR |
| [in] | counter | - Router counter ID. |
| [out] | counter_set_p | - Router counter set values. |
in counter_set_p, router_ingress_bad_unicast_packets is deprecated and will be removed in the future.
in counter_set_p, router_ingress_bad_multicast_packets is deprecated and will be removed in the future.
in counter_set_p, router_ingress_bad_unicast_bytes is deprecated and will be removed in the future.
in counter_set_p, router_ingress_bad_multicast_bytes is deprecated and will be removed in the future.
in counter_set_p, router_egress_bad_unicast_packets is deprecated and will be removed in the future.
in counter_set_p, router_egress_bad_multicast_packets is deprecated and will be removed in the future.
in counter_set_p, router_egress_bad_unicast_bytes is deprecated and will be removed in the future.
in counter_set_p, router_egress_bad_multicast_bytes is deprecated and will be removed in the future.
in counter_set_p, router_ingress_error_packets is deprecated and will be removed in the future.
in counter_set_p, router_ingress_error_bytes is deprecated and will be removed in the future.
in counter_set_p, router_egress_error_packets is deprecated and will be removed in the future.
in counter_set_p, router_egress_error_bytes is deprecated and will be removed in the future.
| sx_status_t sx_api_router_counter_extended_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_counter_id_t | counter_id, | ||
| sx_router_counter_set_extended_t * | counter_data_p | ||
| ) |
This function gets a router counter by given type. When using cmd=READ_CLEAR, the counters will be returned and cleared. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - READ/READ_CLEAR |
| [in] | counter | - Router counter ID. |
| [out] | counter_data_p | - Router counter data values. |
| sx_status_t sx_api_router_counter_clear_set | ( | const sx_api_handle_t | handle, |
| const sx_router_counter_id_t | counter, | ||
| const boolean_t | all | ||
| ) |
This function clears router counter set of a router counter. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | counter | - Router counter ID. |
| [in] | all | - Clear all Router counters. |
| sx_status_t sx_api_router_mc_route_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_mc_route_key_t * | mc_route_key_p, | ||
| const sx_mc_route_attributes_t * | mc_route_attr_p, | ||
| const sx_mc_route_data_t * | mc_route_data_p | ||
| ) |
This function adds/modifies/deletes a multicast route from the MC routing table.
In case action is not SX_ROUTER_ACTION_FORWARD/SX_ROUTER_ACTION_DROP, Trap ID will be set to SX_TRAP_ID_L3_MC_IP_BASE + trap priority.
In case mc_router_attr_p->rpf_action is SX_ROUTER_RPF_ACTION_TRAP, the caller should configure SX_TRAP_ID_ETH_L3_RPF trap first.
In case the RPF action is SX_ROUTER_RPF_ACTION_TRAP or SX_ROUTER_RPF_ACTION_DROP, the ingress RIF in the key should be the RPF RIF. In case the RPF action is SX_ROUTER_RPF_ACTION_DIRECTIONAL, a valid ingress RIF must be given. egress_rif_cnt and egress_container_id are mutually exclusive and may not be both specified. e.g. if egress_rif_cnt is nonzero then egress_container_id must be SX_MC_CONTAINER_ID_INVALID. The DELETE_ALL command will delete all MC routes that match a given VRID and IP version specified by source_addr.version. If the given IP version is SX_IP_VERSION_NONE, then all MC routes on the given VRID will be deleted, regardless of the IP version. the valid manual priority range is 1 - 32. Router action SX_ROUTER_ACTION_SPAN is not supported on any device. in case RPF actions SX_ROUTER_RPF_ACTION_TRAP_LIST and SX_ROUTER_RPF_ACTION_DROP_LIST a valid RPF Group id must be given (that was previously created).
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - ADD/EDIT/DELETE/DELETE_ALL |
| [in] | vrid | - Virtual Router ID. |
| [in] | mc_route_key_p | - mc route entry key {source IP prefix, group mask, ingress RIF} |
| [in] | mc_router_attr_p | - multicast route attributes (e.g. RPF mode, ttl, etc.) |
| [in] | mc_route_data_p | - route data (e.g. action, egress RIF list, etc.) |
| sx_status_t sx_api_router_mc_route_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_mc_route_key_t * | mc_route_key_p, | ||
| sx_mc_route_key_filter_t * | filter_p, | ||
| sx_mc_route_get_entry_t * | mc_route_get_entries_list_p, | ||
| uint32_t * | mc_route_get_entries_cnt_p | ||
| ) |
This function gets a multicast route or routes from the MC routing table, based on a given key or criteria. For GET_FIRST and GET_NEXT, the value of mc_route_get_entries_cnt_p must be smaller or equal to SX_API_MC_ROUTE_GET_MAX_COUNT. The ingress RIF is only considered part of the key for routes that have RPF action SX_ROUTER_RPF_ACTION_DIRECTIONAL. Therefore, routes that were configured with any other RPF action, and with an ingress RIF other than the "don't care" RIF, will still be returned when filtering by the "don't care" ingress RIF. In these cases, the configured ingress RIF can be found in the MC route data.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - GET - Get multicast route entry from DB. COUNT - Get number of MC entries from the DB that match the criteria set by filter_p. GET_FIRST - Get first MC route entries from DB. The maximum number of entries to be returned is defined by mc_route_get_entries_cnt_p. The criteria according to which entries will be returned is defined by filter_p. The last route returned will be in mc_route_key_p, and all routes returned will be in mc_route_get_entries_list_p. GET_NEXT - Get next MC route entries from DB. The maximum number of entries to be returned is defined by mc_route_get_entries_cnt_p. The criteria according to which entries will be returned is defined by filter_p. The first entry returned will be the entry after that given in mc_route_key_p, which should have been received by a previous call to this API with GET_FIRST or GET_NEXT. The last route returned will be in mc_route_key_p, and all routes returned will be in mc_route_get_entries_list_p. |
| [in] | vrid | - Virtual Router ID. |
| [in] | mc_route_key_p | - mc route entry key {Source IP Address, group address, ingress rif} |
| [in] | filter_p | - filter according to which MC routes should be returned. Relevant only for GET_FIRST and GET_NEXT commands. |
| [out] | mc_route_get_entries_list_p | - list of returned MC routes |
| [in,out] | mc_route_get_entries_cnt_p | - as input: number of entries in mc_route_get_entries_list_p as output: number of entries returned in mc_route_get_entries_list_p |
| sx_status_t sx_api_router_mc_route_activity_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_mc_route_key_t * | mc_route_key_p, | ||
| boolean_t * | activity_p | ||
| ) |
This function reads and clears multicast route activity. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - READ\READ_CLEAR |
| [in] | vrid | - Virtual Router ID. |
| [in] | mc_route_key_p | - mc route entry key {Source IP Address, group address, ingress rif} |
| [out] | activity_p | - Route activity. |
| sx_status_t sx_api_router_mc_route_activity_notify | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_mc_route_activity_notify_filter_t * | filter_p | ||
| ) |
This function initiates a notification regarding active mc routes in the system. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | cmd | - READ\READ_CLEAR |
| [in] | filter_p | - activity notifier filter |
| sx_status_t sx_api_router_mc_egress_rif_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_mc_route_key_t * | mc_route_key_p, | ||
| const sx_router_interface_t * | egress_rif_list_p, | ||
| const uint32_t | egress_rif_cnt | ||
| ) |
This function adds/sets/deletes/deletes-all egress RIFs to/from a previously configured MC route. Only routes configured with egress_rif_cnt and egress_rif_list_p are supported by this function. Routes configured with egress_container_id are not.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - ADD/DELETE/DELETE_ALL/SET SET command replaces the entire list of existing egress RIFs with the given list. DELETE_ALL command deletes all egress router interfaces associated with multicast group. |
| [in] | vrid | - Virtual Router ID. |
| [in] | mc_route_key_p | - mc route entry key {Source IP Address, group address, ingress rif} |
| [in] | egress_rif_list_p | - Egress Router Interface array. |
| [in] | egress_rif_cnt | - Egress Router Interface array num. |
| sx_status_t sx_api_router_mc_egress_rif_get | ( | const sx_api_handle_t | handle, |
| const sx_router_id_t | vrid, | ||
| const sx_mc_route_key_t * | mc_route_key_p, | ||
| sx_router_interface_t * | egress_rif_list_p, | ||
| uint32_t * | egress_rif_cnt | ||
| ) |
This function gets the list of egress RIFs associated with the given multicast route. When egress_rif_num is 0 or egress_rif_arr == NULL, the function will return the number of egress RIFs, and egress_rif_arr will remain empty. Only routes configured with egress_rif_cnt and egress_rif_list_p are supported by this function. Routes configured with egress_container_id are not.
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | vrid | - Virtual Router ID. |
| [in] | mc_route_key_p | - mc route entry key {Source IP Address, group address, ingress rif} |
| [out] | egress_rif_list_p | - Egress Router Interface array. |
| [in,out] | egress_rif_cnt_p | - as input: number of entries in egress_rif_list_p as output: number of egress RIFs returned in egress_rif_list_p |
| sx_status_t sx_api_router_cos_rewrite_pcpdei_enable_set | ( | const sx_api_handle_t | handle, |
| const sx_cos_pcp_dei_rewrite_e | rewrite_pcp_dei | ||
| ) |
This function enables in-router rewriting of PCP, DEI rewriting bits. The configuration is per IP router. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | rewrite_pcp_dei | - enable the option to rewrite PCP and DEI fields at the egress port (preserve from the ingress, disable rewrite, enable rewrite). |
| sx_status_t sx_api_router_cos_rewrite_pcpdei_enable_get | ( | const sx_api_handle_t | handle, |
| sx_cos_pcp_dei_rewrite_e * | rewrite_pcp_dei_p | ||
| ) |
This function retrieves in-router rewriting of PCP, DEI rewriting bits. The configuration is per IP router. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [out] | rewrite_pcp_dei | - enable the option to rewrite PCP and DEI fields at the egress port (preserve from the ingress, disable rewrite, enable rewrite). |
| sx_status_t sx_api_router_cos_prio_update_enable_set | ( | const sx_api_handle_t | handle, |
| const boolean_t | update_priority_color | ||
| ) |
This function enables in-router updating of switch-priority and color. The updated mapping is defined using sx_api_router_cos_dscp_to_prio_set. The configuration is per IP router. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | update_priority_color | - enable updates the switch priority and color by the DSCP map described in sx_api_router_cos_dscp_to_prio_set |
| sx_status_t sx_api_router_cos_prio_update_enable_get | ( | const sx_api_handle_t | handle, |
| boolean_t * | update_priority_color_p | ||
| ) |
This function retrieves in-router updating of switch-priority and color. The updated mapping is defined using sx_api_router_cos_dscp_to_prio_set. The configuration is per IP router. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [out] | update_priority_color_p | - enable updates the switch priority and color by the DSCP map described in sx_api_router_cos_dscp_to_prio_set |
| sx_status_t sx_api_router_cos_dscp_to_prio_set | ( | const sx_api_handle_t | handle, |
| const sx_cos_dscp_t * | dscp_p, | ||
| const sx_cos_priority_color_t * | priority_color_p, | ||
| const uint32_t | element_cnt | ||
| ) |
This function sets the mapping from DSCP to switch-priority and color for in-router rewrite. Supported devices: Spectrum, Spectrum2. The mapping is used only if enabled in sx_api_router_cos_prio_update_enable_set.
| [in] | handle | - SX-API handle |
| [in] | dscp | - a list of DSCP's |
| [in] | switch_priority_color | - a list of switch priorities and color |
| [in] | element_cnt | - num of elements in switch priorities and DSCP's lists |
| sx_status_t sx_api_router_cos_dscp_to_prio_get | ( | const sx_api_handle_t | handle, |
| sx_cos_dscp_t * | dscp_p, | ||
| sx_cos_priority_color_t * | priority_color_p, | ||
| uint32_t * | element_cnt_p | ||
| ) |
This function retrieves the mapping from DSCP to switch-priority and color for in-router rewrite. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | dscp | - a list of DSCP's |
| [in] | switch_priority_color_p | - a list of switch priorities and color |
| [in] | element_cnt_p | - num of elements in switch priorities and DSCP's lists |
| sx_status_t sx_api_router_ecmp_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| sx_ecmp_id_t * | ecmp_id_p, | ||
| sx_next_hop_t * | next_hop_list_p, | ||
| uint32_t * | next_hop_cnt_p | ||
| ) |
This function creates/modifies/destroys an ECMP container, according to cmd.
SX_ACCESS_CMD_CREATE - by providing a next hops list, the command creates an EMCP container. Container content is formed as a subset of the resolved next hops. Returned Next hops weights are adjusted to the proper weights as written on HW. This command returns the containers next hops as written on HW, list count and new container ID. SX_ACCESS_CMD_SET - Modifies the contents of an existing ECMP container, specified by *ecmp_id_p. If *next_hop_cnt_p is zero, empties the container. SX_ACCESS_CMD_DESTROY - by providing a container ID, the command removes all next hops from the existing given container, destroying the container as well. The container ID is invalid until reassigned on container creation. This command returns list count 0 Weights will be modified on runtime according to next hops resolution changes. Supported devices: Spectrum, Spectrum2. Setting a container in use by UC route(s), is allowed only with next hops on the same VRID. Clearing(set with an empty next hops list), is not allowed in case container is in use by UC route(s). Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | cmd | - action to perform: CREATE, DESTROY, SET, |
| [in,out] | ecmp_id | - id of ECMP container |
| [in,out] | next_hop_list_p | - a given list of next hops |
| [in,out] | next_hop_cnt_p | - amount of next hops |
| sx_status_t sx_api_router_ecmp_get | ( | const sx_api_handle_t | handle, |
| const sx_ecmp_id_t | ecmp_id, | ||
| sx_next_hop_t * | next_hop_list_p, | ||
| uint32_t * | next_hop_cnt_p | ||
| ) |
This function retrieves an ECMP container content, as defined by the user. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | ecmp_id | - id of an ECMP container |
| [out] | next_hop_list_p | - a given list of next hops |
| [out] | next_hop_cnt_p | - amount of next hops |
| sx_status_t sx_api_router_ecmp_iter_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_ecmp_id_t | ecmp_id, | ||
| const sx_ecmp_filter_t * | filter_p, | ||
| sx_ecmp_id_t * | ecmp_list_p, | ||
| uint32_t * | ecmp_cnt_p | ||
| ) |
This function returns a list of one or more ECMP container identifiers. The following use case scenarios apply with different input parameters X = don't-care
Supported devices: Spectrum, Spectrum2.
| [in] | handle | : SX API handle |
| [in] | cmd | : GET/GET_FIRST/GET_NEXT |
| [in] | ecmp_id | : specify an ECMP container ID |
| [in] | filter | : specify a filter parameter (not supported yet) |
| [out] | ecmp_list_p | : return list of ECMP container IDs |
| [in,out] | ecmp_cnt_p | : [in] number of ECMP container IDs to get : [out] number of ECMP container IDs returned |
| sx_status_t sx_api_router_operational_ecmp_get | ( | const sx_api_handle_t | handle, |
| const sx_ecmp_id_t | ecmp_id, | ||
| sx_next_hop_t * | next_hop_list_p, | ||
| uint32_t * | next_hop_cnt_p | ||
| ) |
This function retrieves the EMCP container content, as written on HW(only resolved next hops). Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | ecmp_id | - id of an ECMP container |
| [out] | next_hop_list_p | - a given list of next hops |
| [out] | next_hop_cnt_p | - amount of next hops |
| sx_status_t sx_api_router_ecmp_counter_bind_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_ecmp_id_t | ecmp_id, | ||
| const sx_flow_counter_id_t * | counter_id_list_p, | ||
| const uint32_t * | offset_list_p, | ||
| const uint32_t | elements_cnt | ||
| ) |
This function binds/unbinds a router counter to a list of next hops for a given container. In case of INVALID_NEXT_HOP_OFFSET counter will be bound to all next hops in given ECMP container. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - BIND/UNBIND. |
| [in] | ecmp_id | - id of an ECMP container |
| [in] | counter_id_list_p | - list of counter IDs to bind to matching offsets. |
| [in] | offset_list_p | - list of next hop entries offset in configured next hops list to. |
| [in] | elements_cnt | - amount of next hops offsets. |
| sx_status_t sx_api_router_ecmp_fine_grain_counter_bind_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_ecmp_id_t | ecmp_id, | ||
| const sx_flow_counter_id_t | counter_id, | ||
| const uint32_t * | offset_list_p, | ||
| const uint32_t | elements_cnt | ||
| ) |
This function binds/unbinds a router counter to a list of indices in a container active set. This API should be used for containers that are not static containers. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - BIND/UNBIND. |
| [in] | ecmp_id | - ID of a non static ECMP container |
| [in] | counter_id | - ID of a counter to bind to the given offsets. |
| [in] | offset_list_p | - list of entry offsets in configured ECMP container. |
| [in] | elements_cnt | - amount of entry offsets. |
| sx_status_t sx_api_router_neigh_activity_notify | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_neigh_activity_filter_t * | filter_p | ||
| ) |
This function initiates a notification regarding active neighbors in the system. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | cmd | - READ\READ_CLEAR |
| [in] | filter_p | - neigh activity notifier filter |
| sx_status_t sx_api_router_ecmp_attributes_set | ( | const sx_api_handle_t | handle, |
| const sx_ecmp_id_t | ecmp_id, | ||
| const sx_ecmp_attributes_t * | attr_p | ||
| ) |
This function sets an ECMP container's attributes. Using this API is not mandatory for ECMP hashing (default value is SX_ECMP_TYPE_STATIC_E) To use this API one should create an empty ECMP container, set the container attributes and add next hops. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | ecmp_id | - an ID of an ECMP container |
| [in] | attr_p | - ECMP container attributes |
| sx_status_t sx_api_router_ecmp_attributes_get | ( | const sx_api_handle_t | handle, |
| const sx_ecmp_id_t | ecmp_id, | ||
| sx_ecmp_attributes_t * | attr_p | ||
| ) |
This function retrieves an ECMP container's attributes. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | ecmp_id | - id of ECMP container. |
| [out] | attr_p | - ECMP container attributes |
| sx_status_t sx_api_router_ecmp_clone_set | ( | const sx_api_handle_t | handle, |
| const sx_ecmp_id_t | old_ecmp_id, | ||
| sx_ecmp_id_t * | new_ecmp_id_p | ||
| ) |
This function clone an ECMP container. Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | old_ecmp_id | - Old ID of ECMP container |
| [out] | new_ecmp_id_p | - New ID of ECMP container pointer return with pointer that contains the new created container ID |
| sx_status_t sx_api_router_mc_rpf_group_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| sx_rpf_group_id_t * | rpf_group_id_p, | ||
| sx_router_vinterface_t * | rpf_vif_list_p, | ||
| uint32_t | rpf_vif_cnt | ||
| ) |
This API is not supported.Manipulate a multicast router Reverse-Path Forwarding group Command CREATE creates a new RPF group which contains the specified list of ingress RIFs in rpf_rif_list_p, and returns its new group ID in rpf_group_id_p. Command SET replaces the contents of an existing RPF group specified by rpf_group_id_p, with the specified list of ingress RIFs in rpf_rif_list_p. Command DESTROY deletes the existing RPF group specified by rpf_group_id_p Command DELETE_ALL deletes all existing RPF groups. Notes: An RPF group in use by a multicast route cannot be destroyed An RPF group may contain only ingress RIFs which belong to the same virtual router An RPF group must contain at least one ingress RIF
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - CREATE/SET/DESTROY/DELETE_ALL. |
| [in,out] | rpf_group_id_p | - Specifies or returns the group ID |
| [in] | rpf_rif_list_p | - Specifies the list of ingress RIFs in a group |
| [in] | rpf_rif_cnt | - Specifies the amount of ingress RIFs in rpf_rif_list_p |
| sx_status_t sx_api_router_mc_rpf_group_get | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| sx_rpf_group_id_t * | rpf_group_id_p, | ||
| sx_router_vinterface_t * | rpf_vif_list_p, | ||
| uint32_t * | rpf_vif_cnt_p | ||
| ) |
Retrieve information about a multicast router Reverse-Path Forwarding group Command GET retrieves information about an RPF group specified by rpf_group_id_p Command GETFIRST retrieves the first existing RPF group, its ID and contents Command GETNEXT retrieves the next existing RPF group, its ID and contents Notes: In order to enumerate all existing RPF groups, a client application may call GETFIRST once, and then repeatedly call GETNEXT until all groups are retrieved If *rpf_rif_cnt_p is 0, then rpf_rif_list_p may be NULL, and only the amount of RIFs is returned without the list of RIFs
Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle. |
| [in] | cmd | - GET/GETFIRST/GETNEXT |
| [in,out] | rpf_group_id_p | - Specifies a previous group ID or returns a group ID |
| [out] | rpf_rif_list_p | - Returns a list of ingress RIFs in the group |
| [in,out] | rpf_rif_cnt | - Specifies the size of rpf_rif_list_p, and returns the amount of ingress RIFs in rpf_rif_list_p |
| sx_status_t sx_api_router_mc_route_counter_bind_set | ( | const sx_api_handle_t | handle, |
| const sx_access_cmd_t | cmd, | ||
| const sx_router_id_t | vrid, | ||
| const sx_mc_route_key_t * | mc_route_key_p, | ||
| const sx_flow_counter_id_t | counter_id | ||
| ) |
Binds or un-binds a flow counter to an existing multicast route Note: A route may be created via a call to sx_api_router_mc_route_set() A flow counter may be created via a call to sx_api_flow_counter_set() Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | cmd | - BIND/UNBIND |
| [in] | vrid | - Virtual Router ID |
| [in] | mc_route_key_p | - MC route key |
| [in] | counter_id | - A flow counter identifier. Applicable only for command BIND |
| sx_status_t sx_api_router_mc_route_counter_bind_get | ( | const sx_api_handle_t | handle, |
| const sx_router_id_t | vrid, | ||
| const sx_mc_route_key_t * | mc_route_key_p, | ||
| sx_flow_counter_id_t * | counter_id_p | ||
| ) |
Retrieves the flow counter currently bound to a specified multicast route Notes: A flow counter may be bound to a route via a call to sx_api_router_mc_route_counter_bind_set() If no counter if bound to the specified route, this function returns SUCCESS, and sets *counter_id_p to SX_FLOW_COUNTER_ID_INVALID Supported devices: Spectrum, Spectrum2.
| [in] | handle | - SX-API handle |
| [in] | vrid | - Virtual Router ID |
| [in] | mc_route_key_p | - MC route key |
| [out] | counter_id_p | - Returns the flow counter ID bound to the specified route |
1.8.16