mbcm.c (4873B)
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_TRIDENT_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/bradley.h> 17 #include <bcm_int/esw/humv.h> 18 #include <bcm_int/esw/triumph.h> 19 #include <bcm_int/esw/triumph2.h> 20 #include <bcm_int/esw/trident.h> 21 #include <bcm/error.h> 22 23 mbcm_functions_t mbcm_titan_driver = { 24 /* L2 functions */ 25 bcm_hercules_l2_init, 26 bcm_hercules_l2_term, 27 bcm_hercules_l2_addr_get, 28 bcm_hercules_l2_addr_add, 29 bcm_hercules_l2_addr_delete, 30 bcm_hercules_l2_conflict_get, 31 32 /* Port table related functions */ 33 bcm_xgs3_port_cfg_init, 34 bcm_xgs3_port_cfg_get, 35 bcm_xgs3_port_cfg_set, 36 37 /* VLAN functions */ 38 bcm_xgs3_vlan_init, 39 bcm_xgs3_vlan_reload, 40 bcm_xgs3_vlan_create, 41 bcm_xgs3_vlan_destroy, 42 bcm_xgs3_vlan_port_add, 43 bcm_xgs3_vlan_port_remove, 44 bcm_xgs3_vlan_port_get, 45 bcm_xgs3_vlan_stg_get, 46 bcm_xgs3_vlan_stg_set, 47 48 /* Trunking functions */ 49 bcm_trident_trunk_modify, 50 bcm_trident_trunk_get, 51 bcm_trident_trunk_destroy, 52 bcm_trident_trunk_mcast_join, 53 54 /* Spanning Tree Group functions */ 55 bcm_xgs3_stg_stp_init, 56 bcm_xgs3_stg_stp_get, 57 bcm_xgs3_stg_stp_set, 58 59 /* Multicasting functions */ 60 bcm_hercules_mcast_addr_add, 61 bcm_hercules_mcast_addr_remove, 62 bcm_hercules_mcast_port_get, 63 bcm_humv_mcast_init, 64 _bcm_humv_mcast_detach, 65 bcm_hercules_mcast_addr_add_w_l2mcindex, 66 bcm_hercules_mcast_addr_remove_w_l2mcindex, 67 bcm_hercules_mcast_port_add, 68 bcm_hercules_mcast_port_remove, 69 70 /* COSQ functions */ 71 bcm_td_cosq_init, 72 bcm_td_cosq_detach, 73 bcm_td_cosq_config_set, 74 bcm_td_cosq_config_get, 75 bcm_td_cosq_mapping_set, 76 bcm_td_cosq_mapping_get, 77 bcm_td_cosq_port_sched_set, 78 bcm_td_cosq_port_sched_get, 79 bcm_bradley_cosq_sched_weight_max_get, 80 bcm_td_cosq_port_bandwidth_set, 81 bcm_td_cosq_port_bandwidth_get, 82 bcm_td_cosq_discard_set, 83 bcm_td_cosq_discard_get, 84 bcm_td_cosq_discard_port_set, 85 bcm_td_cosq_discard_port_get, 86 #ifdef BCM_WARM_BOOT_SUPPORT 87 bcm_td_cosq_sync, 88 #endif /* BCM_WARM_BOOT_SUPPORT */ 89 #ifndef BCM_SW_STATE_DUMP_DISABLE 90 bcm_td_cosq_sw_dump, 91 #endif /* BCM_SW_STATE_DUMP_DISABLE */ 92 93 /* Port meter functions */ 94 bcm_hercules_port_rate_egress_set, 95 bcm_hercules_port_rate_egress_get, 96 97 #ifdef INCLUDE_L3 98 /* L3 functions */ 99 bcm_hercules_l3_tables_init, 100 bcm_hercules_l3_tables_cleanup, 101 bcm_hercules_l3_enable, 102 bcm_hercules_l3_intf_get, 103 bcm_hercules_l3_intf_get_by_vid, 104 bcm_hercules_l3_intf_create, 105 bcm_hercules_l3_intf_id_create, 106 bcm_hercules_l3_intf_lookup, 107 bcm_hercules_l3_intf_del, 108 bcm_hercules_l3_intf_del_all, 109 110 bcm_hercules_l3_get, 111 bcm_hercules_l3_add, 112 bcm_hercules_l3_del, 113 bcm_hercules_l3_del_prefix, 114 bcm_hercules_l3_del_intf, 115 bcm_hercules_l3_del_all, 116 bcm_hercules_l3_replace, 117 bcm_hercules_l3_age, 118 bcm_hercules_l3_traverse, 119 120 bcm_hercules_l3_ip6_get, 121 bcm_hercules_l3_ip6_add, 122 bcm_hercules_l3_ip6_del, 123 bcm_hercules_l3_ip6_del_prefix, 124 bcm_hercules_l3_ip6_replace, 125 bcm_hercules_l3_ip6_traverse, 126 127 bcm_hercules_defip_cfg_get, 128 bcm_hercules_defip_ecmp_get_all, 129 bcm_hercules_defip_add, 130 bcm_hercules_defip_del, 131 bcm_hercules_defip_del_intf, 132 bcm_hercules_defip_del_all, 133 bcm_hercules_defip_age, 134 bcm_hercules_defip_traverse, 135 136 bcm_hercules_ip6_defip_cfg_get, 137 bcm_hercules_ip6_defip_ecmp_get_all, 138 bcm_hercules_ip6_defip_add, 139 bcm_hercules_ip6_defip_del, 140 bcm_hercules_ip6_defip_traverse, 141 142 bcm_hercules_l3_conflict_get, 143 bcm_hercules_l3_info, 144 145 /* IPMC functions */ 146 bcm_hercules_ipmc_init, 147 bcm_hercules_ipmc_detach, 148 bcm_hercules_ipmc_enable, 149 bcm_hercules_ipmc_src_port_check, 150 bcm_hercules_ipmc_src_ip_search, 151 bcm_hercules_ipmc_add, 152 bcm_hercules_ipmc_delete, 153 bcm_hercules_ipmc_delete_all, 154 bcm_hercules_ipmc_lookup, 155 bcm_hercules_ipmc_get, 156 bcm_hercules_ipmc_put, 157 bcm_hercules_ipmc_egress_port_get, 158 bcm_hercules_ipmc_egress_port_set, 159 bcm_hercules_ipmc_repl_init, 160 bcm_hercules_ipmc_repl_detach, 161 bcm_hercules_ipmc_repl_get, 162 bcm_hercules_ipmc_repl_add, 163 bcm_hercules_ipmc_repl_delete, 164 bcm_hercules_ipmc_repl_delete_all, 165 bcm_hercules_ipmc_egress_intf_add, 166 bcm_hercules_ipmc_egress_intf_delete, 167 bcm_hercules_ipmc_age, 168 bcm_hercules_ipmc_traverse, 169 #endif /* INCLUDE_L3 */ 170 }; 171 #else /* BCM_TRIDENT_SUPPORT */ 172 int bcm_esw_titan_mbcm_not_empty; 173 #endif /* BCM_TRIDENT_SUPPORT */