mbcm.c (4494B)
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_KATANA2_SUPPORT) 12 #include <soc/debug.h> 13 #include <bcm_int/esw/mbcm.h> 14 #include <bcm_int/esw/firebolt.h> 15 #include <bcm_int/esw/bradley.h> 16 #include <bcm_int/esw/triumph.h> 17 #include <bcm_int/esw/triumph2.h> 18 #include <bcm_int/esw/triumph3.h> 19 #include <bcm_int/esw/trident.h> 20 #include <bcm_int/esw/katana.h> 21 #include <bcm_int/esw/katana2.h> 22 #include <bcm/error.h> 23 24 mbcm_functions_t mbcm_katana2_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_kt2_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_kt2_stg_stp_init, 58 bcm_kt2_stg_stp_get, 59 bcm_kt2_stg_stp_set, 60 61 /* Multicasting functions */ 62 bcm_xgs3_mcast_addr_add, 63 bcm_xgs3_mcast_addr_remove, 64 bcm_xgs3_mcast_port_get, 65 bcm_xgs3_mcast_init, 66 _bcm_xgs3_mcast_detach, 67 bcm_xgs3_mcast_addr_add_w_l2mcindex, 68 bcm_xgs3_mcast_addr_remove_w_l2mcindex, 69 bcm_xgs3_mcast_port_add, 70 bcm_xgs3_mcast_port_remove, 71 72 /* COSQ functions */ 73 bcm_kt2_cosq_init, 74 bcm_kt2_cosq_detach, 75 bcm_kt2_cosq_config_set, 76 bcm_kt2_cosq_config_get, 77 bcm_kt2_cosq_mapping_set, 78 bcm_kt2_cosq_mapping_get, 79 bcm_kt2_cosq_port_sched_set, 80 bcm_kt2_cosq_port_sched_get, 81 bcm_kt2_cosq_sched_weight_max_get, 82 bcm_kt2_cosq_port_bandwidth_set, 83 bcm_kt2_cosq_port_bandwidth_get, 84 bcm_kt2_cosq_discard_set, 85 bcm_kt2_cosq_discard_get, 86 bcm_kt2_cosq_discard_port_set, 87 bcm_kt2_cosq_discard_port_get, 88 #ifdef BCM_WARM_BOOT_SUPPORT 89 bcm_kt2_cosq_sync, 90 #endif /* BCM_WARM_BOOT_SUPPORT */ 91 #ifndef BCM_SW_STATE_DUMP_DISABLE 92 bcm_kt2_cosq_sw_dump, 93 #endif /* BCM_SW_STATE_DUMP_DISABLE */ 94 95 /* Port meter functions */ 96 bcm_kt_port_rate_egress_set, 97 bcm_kt_port_rate_egress_get, 98 99 #ifdef INCLUDE_L3 100 /* L3 functions */ 101 bcm_xgs3_l3_tables_init, 102 bcm_xgs3_l3_tables_cleanup, 103 bcm_xgs3_l3_enable, 104 bcm_xgs3_l3_intf_get, 105 bcm_xgs3_l3_intf_get_by_vid, 106 bcm_xgs3_l3_intf_create, 107 bcm_xgs3_l3_intf_id_create, 108 bcm_xgs3_l3_intf_lookup, 109 bcm_xgs3_l3_intf_del, 110 bcm_xgs3_l3_intf_del_all, 111 112 bcm_xgs3_l3_get, 113 bcm_xgs3_l3_add, 114 bcm_xgs3_l3_del, 115 bcm_xgs3_l3_del_prefix, 116 bcm_xgs3_l3_del_intf, 117 bcm_xgs3_l3_del_all, 118 bcm_xgs3_l3_replace, 119 bcm_xgs3_l3_age, 120 bcm_xgs3_l3_ip4_traverse, 121 122 bcm_xgs3_l3_get, 123 bcm_xgs3_l3_add, 124 bcm_xgs3_l3_del, 125 bcm_xgs3_l3_del_prefix, 126 bcm_xgs3_l3_replace, 127 bcm_xgs3_l3_ip6_traverse, 128 129 bcm_xgs3_defip_get, 130 bcm_xgs3_defip_ecmp_get_all, 131 bcm_xgs3_defip_add, 132 bcm_xgs3_defip_del, 133 bcm_xgs3_defip_del_intf, 134 bcm_xgs3_defip_del_all, 135 bcm_xgs3_defip_age, 136 bcm_xgs3_defip_ip4_traverse, 137 138 bcm_xgs3_defip_get, 139 bcm_xgs3_defip_ecmp_get_all, 140 bcm_xgs3_defip_add, 141 bcm_xgs3_defip_del, 142 bcm_xgs3_defip_ip6_traverse, 143 144 bcm_xgs3_l3_conflict_get, 145 bcm_xgs3_l3_info, 146 147 bcm_tr_ipmc_init, 148 bcm_tr_ipmc_detach, 149 bcm_tr_ipmc_enable, 150 bcm_tr_ipmc_src_port_check, 151 bcm_tr_ipmc_src_ip_search, 152 bcm_tr_ipmc_add, 153 bcm_tr_ipmc_delete, 154 bcm_tr_ipmc_delete_all, 155 bcm_tr_ipmc_lookup, 156 bcm_tr_ipmc_get, 157 bcm_tr_ipmc_put, 158 bcm_tr_ipmc_egress_port_get, 159 bcm_tr_ipmc_egress_port_set, 160 bcm_tr3_ipmc_repl_init, 161 bcm_tr3_ipmc_repl_detach, 162 bcm_tr3_ipmc_repl_get, 163 bcm_tr3_ipmc_repl_add, 164 bcm_tr3_ipmc_repl_delete, 165 bcm_tr3_ipmc_repl_delete_all, 166 bcm_tr3_ipmc_egress_intf_add, 167 bcm_tr3_ipmc_egress_intf_delete, 168 bcm_tr_ipmc_age, 169 bcm_tr_ipmc_traverse, 170 #endif /* INCLUDE_L3 */ 171 172 }; 173 #else /* BCM_KATANA2_SUPPORT */ 174 int bcm_esw_katana2_mbcm_not_empty; 175 #endif /* BCM_KATANA2_SUPPORT */