mbcm.c (4880B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: mbcm.c 8 */ 9 10 #include <soc/defs.h> 11 #if defined(BCM_TRIDENT2_SUPPORT) 12 #include <soc/debug.h> 13 #include <bcm_int/esw/mbcm.h> 14 #include <bcm_int/esw/hercules.h> 15 #include <bcm_int/esw/firebolt.h> 16 #include <bcm_int/esw/humv.h> 17 #include <bcm_int/esw/triumph.h> 18 #include <bcm_int/esw/triumph2.h> 19 #include <bcm_int/esw/trident.h> 20 #include <bcm_int/esw/triumph3.h> 21 #include <bcm_int/esw/trident2.h> 22 #include <bcm/error.h> 23 24 mbcm_functions_t mbcm_titan2_driver = { 25 /* L2 functions */ 26 bcm_tr_l2_init, 27 bcm_tr_l2_term, 28 bcm_tr_l2_addr_get, 29 bcm_tr_l2_addr_add, 30 bcm_tr_l2_addr_delete, 31 32 bcm_tr_l2_conflict_get, 33 34 /* Port table related functions */ 35 bcm_xgs3_port_cfg_init, 36 bcm_xgs3_port_cfg_get, 37 bcm_xgs3_port_cfg_set, 38 39 /* VLAN functions */ 40 bcm_xgs3_vlan_init, 41 bcm_xgs3_vlan_reload, 42 bcm_xgs3_vlan_create, 43 bcm_xgs3_vlan_destroy, 44 bcm_xgs3_vlan_port_add, 45 bcm_xgs3_vlan_port_remove, 46 bcm_xgs3_vlan_port_get, 47 bcm_xgs3_vlan_stg_get, 48 bcm_xgs3_vlan_stg_set, 49 50 /* Trunking functions */ 51 bcm_trident_trunk_modify, 52 bcm_trident_trunk_get, 53 bcm_trident_trunk_destroy, 54 bcm_trident_trunk_mcast_join, 55 56 /* Spanning Tree Group functions */ 57 bcm_xgs3_stg_stp_init, 58 bcm_xgs3_stg_stp_get, 59 bcm_xgs3_stg_stp_set, 60 61 /* Multicasting functions */ 62 bcm_hercules_mcast_addr_add, 63 bcm_hercules_mcast_addr_remove, 64 bcm_hercules_mcast_port_get, 65 bcm_humv_mcast_init, 66 _bcm_humv_mcast_detach, 67 bcm_hercules_mcast_addr_add_w_l2mcindex, 68 bcm_hercules_mcast_addr_remove_w_l2mcindex, 69 bcm_hercules_mcast_port_add, 70 bcm_hercules_mcast_port_remove, 71 72 /* COSQ functions */ 73 bcm_td2_cosq_init, 74 bcm_td2_cosq_detach, 75 bcm_td2_cosq_config_set, 76 bcm_td2_cosq_config_get, 77 bcm_td2_cosq_mapping_set, 78 bcm_td2_cosq_mapping_get, 79 bcm_td2_cosq_port_sched_set, 80 bcm_td2_cosq_port_sched_get, 81 bcm_td2_cosq_sched_weight_max_get, 82 bcm_td2_cosq_port_bandwidth_set, 83 bcm_td2_cosq_port_bandwidth_get, 84 bcm_td2_cosq_discard_set, 85 bcm_td2_cosq_discard_get, 86 bcm_td2_cosq_discard_port_set, 87 bcm_td2_cosq_discard_port_get, 88 #ifdef BCM_WARM_BOOT_SUPPORT 89 bcm_td2_cosq_sync, 90 #endif /* BCM_WARM_BOOT_SUPPORT */ 91 #ifndef BCM_SW_STATE_DUMP_DISABLE 92 bcm_td2_cosq_sw_dump, 93 #endif /* BCM_SW_STATE_DUMP_DISABLE */ 94 95 /* Port meter functions */ 96 bcm_td2_port_rate_egress_set, 97 bcm_td2_port_rate_egress_get, 98 99 #ifdef INCLUDE_L3 100 /* L3 functions */ 101 bcm_hercules_l3_tables_init, 102 bcm_hercules_l3_tables_cleanup, 103 bcm_hercules_l3_enable, 104 bcm_hercules_l3_intf_get, 105 bcm_hercules_l3_intf_get_by_vid, 106 bcm_hercules_l3_intf_create, 107 bcm_hercules_l3_intf_id_create, 108 bcm_hercules_l3_intf_lookup, 109 bcm_hercules_l3_intf_del, 110 bcm_hercules_l3_intf_del_all, 111 112 bcm_hercules_l3_get, 113 bcm_hercules_l3_add, 114 bcm_hercules_l3_del, 115 bcm_hercules_l3_del_prefix, 116 bcm_hercules_l3_del_intf, 117 bcm_hercules_l3_del_all, 118 bcm_hercules_l3_replace, 119 bcm_hercules_l3_age, 120 bcm_hercules_l3_traverse, 121 122 bcm_hercules_l3_ip6_get, 123 bcm_hercules_l3_ip6_add, 124 bcm_hercules_l3_ip6_del, 125 bcm_hercules_l3_ip6_del_prefix, 126 bcm_hercules_l3_ip6_replace, 127 bcm_hercules_l3_ip6_traverse, 128 129 bcm_hercules_defip_cfg_get, 130 bcm_hercules_defip_ecmp_get_all, 131 bcm_hercules_defip_add, 132 bcm_hercules_defip_del, 133 bcm_hercules_defip_del_intf, 134 bcm_hercules_defip_del_all, 135 bcm_hercules_defip_age, 136 bcm_hercules_defip_traverse, 137 138 bcm_hercules_ip6_defip_cfg_get, 139 bcm_hercules_ip6_defip_ecmp_get_all, 140 bcm_hercules_ip6_defip_add, 141 bcm_hercules_ip6_defip_del, 142 bcm_hercules_ip6_defip_traverse, 143 144 bcm_hercules_l3_conflict_get, 145 bcm_hercules_l3_info, 146 147 /* IPMC functions */ 148 bcm_hercules_ipmc_init, 149 bcm_hercules_ipmc_detach, 150 bcm_hercules_ipmc_enable, 151 bcm_hercules_ipmc_src_port_check, 152 bcm_hercules_ipmc_src_ip_search, 153 bcm_hercules_ipmc_add, 154 bcm_hercules_ipmc_delete, 155 bcm_hercules_ipmc_delete_all, 156 bcm_hercules_ipmc_lookup, 157 bcm_hercules_ipmc_get, 158 bcm_hercules_ipmc_put, 159 bcm_hercules_ipmc_egress_port_get, 160 bcm_hercules_ipmc_egress_port_set, 161 bcm_hercules_ipmc_repl_init, 162 bcm_hercules_ipmc_repl_detach, 163 bcm_hercules_ipmc_repl_get, 164 bcm_hercules_ipmc_repl_add, 165 bcm_hercules_ipmc_repl_delete, 166 bcm_hercules_ipmc_repl_delete_all, 167 bcm_hercules_ipmc_egress_intf_add, 168 bcm_hercules_ipmc_egress_intf_delete, 169 bcm_hercules_ipmc_age, 170 bcm_hercules_ipmc_traverse, 171 #endif /* INCLUDE_L3 */ 172 }; 173 #else /* BCM_TRIDENT2_SUPPORT */ 174 int bcm_esw_titan2_mbcm_not_empty; 175 #endif /* BCM_TRIDENT2_SUPPORT */