mbcm.h (23165B)
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.h 8 * Purpose: Multiplexing of the bcm layer 9 * 10 * Different chip families require such different implementations 11 * of some basic BCM layer functionality that the functions are 12 * multiplexed to allow a fast runtime decision as to which function 13 * to call. This file contains the basic declarations for this 14 * process. 15 * 16 * See internal/design/soft_arch/xgs_plan.txt for more info. 17 * 18 * Conventions: 19 * MBCM is the multiplexed bcm prefix 20 * _f is the function type declaration postfix 21 */ 22 23 #ifndef _BCM_INT_MBCM_H_ 24 #define _BCM_INT_MBCM_H_ 25 26 #include <soc/macipadr.h> 27 #include <soc/drv.h> 28 29 #include <bcm/l2.h> 30 #include <bcm/port.h> 31 #include <bcm/l3.h> 32 #include <bcm/trunk.h> 33 #include <bcm/ipmc.h> 34 #include <bcm/mcast.h> 35 #include <bcm/vlan.h> 36 #include <bcm/switch.h> 37 #include <bcm/mpls.h> 38 #include <bcm/mim.h> 39 #include <bcm/wlan.h> 40 #include <bcm/subport.h> 41 #include <bcm/multicast.h> 42 #include <bcm/cosq.h> 43 #include <bcm/bregex.h> 44 45 #include <bcm_int/esw/port.h> 46 #include <bcm_int/esw/vlan.h> 47 #include <bcm_int/esw/l3.h> 48 #include <bcm_int/esw/trunk.h> 49 50 #include <bcm_int/common/family.h> 51 52 /**************************************************************** 53 * 54 * Type definitions for multiplexed BCM functions. 55 */ 56 /* L2 functions */ 57 typedef int (*mbcm_l2_init_f)(int); 58 typedef int (*mbcm_l2_term_f)(int); 59 typedef int (*mbcm_l2_addr_get_f)(int, bcm_mac_t, bcm_vlan_t, 60 bcm_l2_addr_t *); 61 typedef int (*mbcm_l2_addr_add_f)(int, bcm_l2_addr_t *); 62 typedef int (*mbcm_l2_addr_delete_f)(int, bcm_mac_t, bcm_vlan_t); 63 typedef int (*mbcm_l2_addr_delete_by_mac_f)(int, bcm_mac_t, uint32); 64 typedef int (*mbcm_l2_addr_delete_by_mac_port_f)(int, bcm_mac_t, 65 bcm_module_t, bcm_port_t, 66 uint32); 67 typedef int (*mbcm_l2_addr_register_f)(int, bcm_l2_addr_callback_t, void*); 68 typedef int (*mbcm_l2_addr_unregister_f)(int, bcm_l2_addr_callback_t, void*); 69 typedef int (*mbcm_l2_conflict_get_f)(int, bcm_l2_addr_t *, 70 bcm_l2_addr_t *, int, int *); 71 72 /* Port table related functions */ 73 typedef int (*mbcm_port_cfg_get_f)(int, bcm_port_t, bcm_port_cfg_t *); 74 typedef int (*mbcm_port_cfg_set_f)(int, bcm_port_t, bcm_port_cfg_t *); 75 typedef int (*mbcm_port_cfg_init_f)(int, bcm_port_t, bcm_vlan_data_t *); 76 77 /* VLAN functions */ 78 typedef int (*mbcm_vlan_init_f)(int, bcm_vlan_data_t *); 79 typedef int (*mbcm_vlan_reload_f)(int, vbmp_t *, int *); 80 typedef int (*mbcm_vlan_create_f)(int, bcm_vlan_t); 81 typedef int (*mbcm_vlan_destroy_f)(int, bcm_vlan_t); 82 typedef int (*mbcm_vlan_port_add_f)(int, bcm_vlan_t, bcm_pbmp_t, bcm_pbmp_t, 83 bcm_pbmp_t); 84 typedef int (*mbcm_vlan_port_remove_f)(int, bcm_vlan_t, bcm_pbmp_t, bcm_pbmp_t, 85 bcm_pbmp_t); 86 typedef int (*mbcm_vlan_port_get_f)(int, bcm_vlan_t, bcm_pbmp_t *, 87 bcm_pbmp_t *, bcm_pbmp_t *); 88 typedef int (*mbcm_vlan_stg_get_f)(int, bcm_vlan_t, bcm_stg_t *); 89 typedef int (*mbcm_vlan_stg_set_f)(int, bcm_vlan_t, bcm_stg_t); 90 91 /* trunking function */ 92 typedef int (*mbcm_trunk_modify_f)(int, bcm_trunk_t, 93 bcm_trunk_info_t *, int, bcm_trunk_member_t *, 94 trunk_private_t *, int, bcm_trunk_member_t *); 95 typedef int (*mbcm_trunk_get_f)(int, bcm_trunk_t, 96 bcm_trunk_info_t *, int, bcm_trunk_member_t *, 97 int *, trunk_private_t *); 98 typedef int (*mbcm_trunk_destroy_f)(int, bcm_trunk_t, trunk_private_t *); 99 typedef int (*mbcm_trunk_mcast_join_f)(int, bcm_trunk_t, 100 bcm_vlan_t, bcm_mac_t, 101 trunk_private_t *); 102 103 /* STG functions */ 104 typedef int (*mbcm_stg_stp_init_f)(int, bcm_stg_t); 105 typedef int (*mbcm_stg_stp_get_f)(int, bcm_stg_t, bcm_port_t, int *); 106 typedef int (*mbcm_stg_stp_set_f)(int, bcm_stg_t, bcm_port_t, int); 107 108 /* Multicast functions */ 109 typedef int (*mbcm_mcast_addr_add_f)(int, bcm_mcast_addr_t *); 110 typedef int (*mbcm_mcast_addr_remove_f)(int, bcm_mac_t, bcm_vlan_t); 111 typedef int (*mbcm_mcast_port_get_f)(int, bcm_mac_t, bcm_vlan_t, 112 bcm_mcast_addr_t *); 113 typedef int (*mbcm_mcast_init_f)(int); 114 typedef int (*mbcm_mcast_detach_f)(int); 115 typedef int (*mbcm_mcast_addr_add_w_l2mcindex_f)(int, bcm_mcast_addr_t *); 116 typedef int (*mbcm_mcast_addr_remove_w_l2mcindex_f)(int, bcm_mcast_addr_t *); 117 typedef int (*mbcm_mcast_port_add_f)(int, bcm_mcast_addr_t *); 118 typedef int (*mbcm_mcast_port_remove_f)(int, bcm_mcast_addr_t *); 119 120 /* COSQ functions */ 121 typedef int (*mbcm_cosq_init_f)(int unit); 122 typedef int (*mbcm_cosq_detach_f)(int unit, int software_state_only); 123 typedef int (*mbcm_cosq_config_set_f)(int unit, int numq); 124 typedef int (*mbcm_cosq_config_get_f)(int unit, int *numq); 125 typedef int (*mbcm_cosq_mapping_set_f)(int unit, 126 bcm_port_t port, 127 bcm_cos_t priority, 128 bcm_cos_queue_t cosq); 129 typedef int (*mbcm_cosq_mapping_get_f)(int unit, 130 bcm_port_t port, 131 bcm_cos_t priority, 132 bcm_cos_queue_t *cosq); 133 typedef int (*mbcm_cosq_port_sched_set_f)(int unit, bcm_pbmp_t, int mode, 134 const int weights[], int delay); 135 typedef int (*mbcm_cosq_port_sched_get_f)(int unit, bcm_pbmp_t, int *mode, 136 int weights[], int *delay); 137 typedef int (*mbcm_cosq_sched_weight_max_get_f)(int unit, int mode, 138 int *weight_max); 139 typedef int (*mbcm_cosq_port_bandwidth_set_f)(int unit, bcm_port_t port, 140 bcm_cos_queue_t cosq, 141 uint32 kbits_sec_min, 142 uint32 kbits_sec_max, 143 uint32 kbits_sec_burst, 144 uint32 flags); 145 typedef int (*mbcm_cosq_port_bandwidth_get_f)(int unit, bcm_port_t port, 146 bcm_cos_queue_t cosq, 147 uint32 *kbits_sec_min, 148 uint32 *kbits_sec_max, 149 uint32 *kbits_sec_burst, 150 uint32 *flags); 151 typedef int (*mbcm_cosq_discard_set_f)(int unit, uint32 flags); 152 typedef int (*mbcm_cosq_discard_get_f)(int unit, uint32 *flags); 153 typedef int (*mbcm_cosq_discard_port_set_f)(int unit, bcm_port_t port, 154 bcm_cos_queue_t cosq, 155 uint32 color, 156 int drop_start, 157 int drop_slope, 158 int average_time); 159 typedef int (*mbcm_cosq_discard_port_get_f)(int unit, bcm_port_t port, 160 bcm_cos_queue_t cosq, 161 uint32 color, 162 int *drop_start, 163 int *drop_slope, 164 int *average_time); 165 #ifdef BCM_WARM_BOOT_SUPPORT 166 typedef int (*mbcm_cosq_sync_f)(int unit); 167 #endif /* BCM_WARM_BOOT_SUPPORT */ 168 #ifndef BCM_SW_STATE_DUMP_DISABLE 169 typedef void (*mbcm_cosq_sw_dump_f)(int unit); 170 #endif /* BCM_SW_STATE_DUMP_DISABLE */ 171 172 /* Port meter functions */ 173 typedef int (*mbcm_port_rate_egress_set_f)(int unit, int port, 174 uint32 kbits_sec, 175 uint32 kbits_burst, 176 uint32 flags); 177 typedef int (*mbcm_port_rate_egress_get_f)(int unit, int port, 178 uint32 *kbits_sec, 179 uint32 *kbits_burst, 180 uint32 *flags); 181 182 #ifdef INCLUDE_L3 183 /* L3 functions */ 184 typedef int (*mbcm_l3_tables_init_f)(int); 185 typedef int (*mbcm_l3_tables_cleanup_f)(int); 186 typedef int (*mbcm_l3_enable_f)(int, int); 187 typedef int (*mbcm_l3_intf_get_f)(int, _bcm_l3_intf_cfg_t *); 188 typedef int (*mbcm_l3_intf_get_by_vid_f)(int, _bcm_l3_intf_cfg_t *); 189 typedef int (*mbcm_l3_intf_create_f)(int, _bcm_l3_intf_cfg_t *); 190 typedef int (*mbcm_l3_intf_id_create_f)(int, _bcm_l3_intf_cfg_t *); 191 typedef int (*mbcm_l3_intf_lookup_f)(int, _bcm_l3_intf_cfg_t *); 192 typedef int (*mbcm_l3_intf_delete_f)(int, _bcm_l3_intf_cfg_t *); 193 typedef int (*mbcm_l3_intf_delete_all_f)(int); 194 195 typedef int (*mbcm_l3_ip4_get_f)(int, _bcm_l3_cfg_t *); 196 typedef int (*mbcm_l3_ip4_add_f)(int, _bcm_l3_cfg_t *); 197 typedef int (*mbcm_l3_ip4_delete_f)(int, _bcm_l3_cfg_t *); 198 typedef int (*mbcm_l3_ip4_delete_prefix_f)(int, _bcm_l3_cfg_t *); 199 typedef int (*mbcm_l3_delete_intf_f)(int, _bcm_l3_cfg_t *, int); 200 typedef int (*mbcm_l3_delete_all_f)(int); 201 typedef int (*mbcm_l3_ip4_replace_f)(int, _bcm_l3_cfg_t *); 202 203 typedef int (*mbcm_l3_ip6_get_f)(int, _bcm_l3_cfg_t *); 204 typedef int (*mbcm_l3_ip6_add_f)(int, _bcm_l3_cfg_t *); 205 typedef int (*mbcm_l3_ip6_delete_f)(int, _bcm_l3_cfg_t *); 206 typedef int (*mbcm_l3_ip6_delete_prefix_f)(int, _bcm_l3_cfg_t *); 207 typedef int (*mbcm_l3_ip6_replace_f)(int, _bcm_l3_cfg_t *); 208 209 typedef int (*mbcm_ip4_defip_cfg_get_f)(int, _bcm_defip_cfg_t *); 210 typedef int (*mbcm_ip4_defip_ecmp_get_all_f)(int, _bcm_defip_cfg_t *, 211 bcm_l3_route_t *, int, int *); 212 typedef int (*mbcm_ip4_defip_add_f)(int, _bcm_defip_cfg_t *); 213 typedef int (*mbcm_ip4_defip_delete_f)(int, _bcm_defip_cfg_t *); 214 typedef int (*mbcm_defip_delete_intf_f)(int, _bcm_defip_cfg_t *, int); 215 typedef int (*mbcm_defip_delete_all_f)(int); 216 217 typedef int (*mbcm_ip6_defip_cfg_get_f)(int, _bcm_defip_cfg_t *); 218 typedef int (*mbcm_ip6_defip_ecmp_get_all_f)(int, _bcm_defip_cfg_t *, 219 bcm_l3_route_t *, int, int *); 220 typedef int (*mbcm_ip6_defip_add_f)(int, _bcm_defip_cfg_t *); 221 typedef int (*mbcm_ip6_defip_delete_f)(int, _bcm_defip_cfg_t *); 222 223 typedef int (*mbcm_l3_conflict_get_f)(int, bcm_l3_key_t*, bcm_l3_key_t*, 224 int, int *); 225 typedef int (*mbcm_l3_host_age_f)(int, uint32, bcm_l3_host_traverse_cb, void *); 226 typedef int (*mbcm_l3_traverse_f)(int, uint32, uint32, uint32, 227 bcm_l3_host_traverse_cb, void*); 228 typedef int (*mbcm_defip_age_f)(int, bcm_l3_route_traverse_cb, void *); 229 typedef int (*mbcm_defip_traverse_f)(int, uint32, uint32, 230 bcm_l3_route_traverse_cb, void *); 231 typedef int (*mbcm_l3_info_get_f)(int, bcm_l3_info_t *); 232 233 /* IPMC functions */ 234 typedef int (*mbcm_ipmc_init_f)(int); 235 typedef int (*mbcm_ipmc_detach_f)(int); 236 typedef int (*mbcm_ipmc_enable_f)(int, int); 237 typedef int (*mbcm_ipmc_src_port_check_f)(int, int); 238 typedef int (*mbcm_ipmc_src_ip_search_f)(int, int); 239 typedef int (*mbcm_ipmc_add_f)(int, bcm_ipmc_addr_t *); 240 typedef int (*mbcm_ipmc_delete_f)(int, bcm_ipmc_addr_t *); 241 typedef int (*mbcm_ipmc_delete_all_f)(int); 242 typedef int (*mbcm_ipmc_lookup_f)(int, int *, bcm_ipmc_addr_t *); 243 typedef int (*mbcm_ipmc_get_f)(int, int, bcm_ipmc_addr_t *); 244 typedef int (*mbcm_ipmc_put_f)(int, int, bcm_ipmc_addr_t *); 245 typedef int (*mbcm_ipmc_egress_port_get_f)(int, bcm_port_t, sal_mac_addr_t, 246 int *, bcm_vlan_t *, int *); 247 typedef int (*mbcm_ipmc_egress_port_set_f)(int, bcm_port_t, const bcm_mac_t, 248 int, bcm_vlan_t, int); 249 250 /* IPMC VLAN Replication functions */ 251 typedef int (*mbcm_ipmc_repl_init_f)(int); 252 typedef int (*mbcm_ipmc_repl_detach_f)(int); 253 typedef int (*mbcm_ipmc_repl_get_f)(int, int, bcm_port_t, bcm_vlan_vector_t); 254 typedef int (*mbcm_ipmc_repl_add_f)(int, int, bcm_port_t, bcm_vlan_t); 255 typedef int (*mbcm_ipmc_repl_delete_f)(int, int, bcm_port_t, bcm_vlan_t); 256 typedef int (*mbcm_ipmc_repl_delete_all_f)(int, int, bcm_port_t); 257 typedef int (*mbcm_ipmc_egress_intf_add_f)(int, int, bcm_port_t, 258 bcm_l3_intf_t *); 259 typedef int (*mbcm_ipmc_egress_intf_delete_f)(int, int, bcm_port_t, 260 bcm_l3_intf_t *); 261 typedef int (*mbcm_ipmc_age_f)(int, uint32, bcm_ipmc_traverse_cb, void *); 262 typedef int (*mbcm_ipmc_traverse_f)(int, uint32, bcm_ipmc_traverse_cb, void *); 263 #endif /* INCLUDE_L3 */ 264 265 #ifdef INCLUDE_REGEX 266 typedef int (*mbcm_regex_config_set_f)(int, bcm_regex_config_t*); 267 typedef int (*mbcm_regex_config_get_f)(int, bcm_regex_config_t*); 268 typedef int (*mbcm_regex_exclude_add_f)(int, uint8, uint16, uint16); 269 typedef int (*mbcm_regex_exclude_delete_f)(int, uint8, uint16, uint16); 270 typedef int (*mbcm_regex_exclude_delete_all_f)(int); 271 typedef int (*mbcm_regex_exclude_get_f)(int,int,uint8*,uint16*,uint16*,int*); 272 typedef int (*mbcm_regex_engine_create_f)(int,bcm_regex_engine_config_t*, 273 bcm_regex_engine_t*); 274 typedef int (*mbcm_regex_engine_destroy_f)(int,bcm_regex_engine_t); 275 typedef int (*mbcm_regex_engine_traverse_f)(int,bcm_regex_engine_traverse_cb,void*); 276 typedef int (*mbcm_regex_engine_get_f)(int,bcm_regex_engine_t, 277 bcm_regex_engine_config_t*); 278 typedef int (*bcm_regex_match_check_f)(int, int, bcm_regex_match_t*, int*); 279 280 typedef int (*bcm_regex_match_set_f)(int, bcm_regex_engine_t, int, bcm_regex_match_t*); 281 typedef int (*bcm_regex_report_register_f)(int, uint32, bcm_regex_report_cb, void *); 282 typedef int (*bcm_regex_report_unregister_f)(int, uint32, bcm_regex_report_cb, void*); 283 #endif /* INCLUDE_REGEX */ 284 285 /**************************************************************** 286 * 287 * Multiplexed BCM Driver Structure 288 */ 289 typedef struct mbcm_functions_s { 290 /* L2 functions */ 291 mbcm_l2_init_f mbcm_l2_init; 292 mbcm_l2_term_f mbcm_l2_term; 293 mbcm_l2_addr_get_f mbcm_l2_addr_get; 294 mbcm_l2_addr_add_f mbcm_l2_addr_add; 295 mbcm_l2_addr_delete_f mbcm_l2_addr_delete; 296 mbcm_l2_conflict_get_f mbcm_l2_conflict_get; 297 298 /* Port table related functions */ 299 mbcm_port_cfg_init_f mbcm_port_cfg_init; 300 mbcm_port_cfg_get_f mbcm_port_cfg_get; 301 mbcm_port_cfg_set_f mbcm_port_cfg_set; 302 303 /* VLAN functions */ 304 mbcm_vlan_init_f mbcm_vlan_init; 305 mbcm_vlan_reload_f mbcm_vlan_reload; 306 mbcm_vlan_create_f mbcm_vlan_create; 307 mbcm_vlan_destroy_f mbcm_vlan_destroy; 308 mbcm_vlan_port_add_f mbcm_vlan_port_add; 309 mbcm_vlan_port_remove_f mbcm_vlan_port_remove; 310 mbcm_vlan_port_get_f mbcm_vlan_port_get; 311 mbcm_vlan_stg_get_f mbcm_vlan_stg_get; 312 mbcm_vlan_stg_set_f mbcm_vlan_stg_set; 313 314 /* trunking */ 315 mbcm_trunk_modify_f mbcm_trunk_modify; 316 mbcm_trunk_get_f mbcm_trunk_get; 317 mbcm_trunk_destroy_f mbcm_trunk_destroy; 318 mbcm_trunk_mcast_join_f mbcm_trunk_mcast_join; 319 320 /* STG functions */ 321 mbcm_stg_stp_init_f mbcm_stg_stp_init; 322 mbcm_stg_stp_get_f mbcm_stg_stp_get; 323 mbcm_stg_stp_set_f mbcm_stg_stp_set; 324 325 /* Multicasting functions */ 326 mbcm_mcast_addr_add_f mbcm_mcast_addr_add; 327 mbcm_mcast_addr_remove_f mbcm_mcast_addr_remove; 328 mbcm_mcast_port_get_f mbcm_mcast_port_get; 329 mbcm_mcast_init_f mbcm_mcast_init; 330 mbcm_mcast_detach_f mbcm_mcast_detach; 331 mbcm_mcast_addr_add_w_l2mcindex_f mbcm_mcast_addr_add_w_l2mcindex; 332 mbcm_mcast_addr_remove_w_l2mcindex_f mbcm_mcast_addr_remove_w_l2mcindex; 333 mbcm_mcast_port_add_f mbcm_mcast_port_add; 334 mbcm_mcast_port_remove_f mbcm_mcast_port_remove; 335 336 /* COSQ functions */ 337 mbcm_cosq_init_f mbcm_cosq_init; 338 mbcm_cosq_detach_f mbcm_cosq_detach; 339 mbcm_cosq_config_set_f mbcm_cosq_config_set; 340 mbcm_cosq_config_get_f mbcm_cosq_config_get; 341 mbcm_cosq_mapping_set_f mbcm_cosq_mapping_set; 342 mbcm_cosq_mapping_get_f mbcm_cosq_mapping_get; 343 mbcm_cosq_port_sched_set_f mbcm_cosq_port_sched_set; 344 mbcm_cosq_port_sched_get_f mbcm_cosq_port_sched_get; 345 mbcm_cosq_sched_weight_max_get_f mbcm_cosq_sched_weight_max_get; 346 mbcm_cosq_port_bandwidth_set_f mbcm_cosq_port_bandwidth_set; 347 mbcm_cosq_port_bandwidth_get_f mbcm_cosq_port_bandwidth_get; 348 mbcm_cosq_discard_set_f mbcm_cosq_discard_set; 349 mbcm_cosq_discard_get_f mbcm_cosq_discard_get; 350 mbcm_cosq_discard_port_set_f mbcm_cosq_discard_port_set; 351 mbcm_cosq_discard_port_get_f mbcm_cosq_discard_port_get; 352 #ifdef BCM_WARM_BOOT_SUPPORT 353 mbcm_cosq_sync_f mbcm_cosq_sync; 354 #endif /* BCM_WARM_BOOT_SUPPORT */ 355 #ifndef BCM_SW_STATE_DUMP_DISABLE 356 mbcm_cosq_sw_dump_f mbcm_cosq_sw_dump; 357 #endif /* BCM_SW_STATE_DUMP_DISABLE */ 358 359 /* Port meter functions */ 360 mbcm_port_rate_egress_set_f mbcm_port_rate_egress_set; 361 mbcm_port_rate_egress_get_f mbcm_port_rate_egress_get; 362 363 #ifdef INCLUDE_L3 364 /* L3 functions */ 365 mbcm_l3_tables_init_f mbcm_l3_tables_init; 366 mbcm_l3_tables_cleanup_f mbcm_l3_tables_cleanup; 367 mbcm_l3_enable_f mbcm_l3_enable; 368 mbcm_l3_intf_get_f mbcm_l3_intf_get; 369 mbcm_l3_intf_get_by_vid_f mbcm_l3_intf_get_by_vid; 370 mbcm_l3_intf_create_f mbcm_l3_intf_create; 371 mbcm_l3_intf_id_create_f mbcm_l3_intf_id_create; 372 mbcm_l3_intf_lookup_f mbcm_l3_intf_lookup; 373 mbcm_l3_intf_delete_f mbcm_l3_intf_delete; 374 mbcm_l3_intf_delete_all_f mbcm_l3_intf_delete_all; 375 376 mbcm_l3_ip4_get_f mbcm_l3_ip4_get; 377 mbcm_l3_ip4_add_f mbcm_l3_ip4_add; 378 mbcm_l3_ip4_delete_f mbcm_l3_ip4_delete; 379 mbcm_l3_ip4_delete_prefix_f mbcm_l3_ip4_delete_prefix; 380 mbcm_l3_delete_intf_f mbcm_l3_delete_intf; 381 mbcm_l3_delete_all_f mbcm_l3_delete_all; 382 mbcm_l3_ip4_replace_f mbcm_l3_ip4_replace; 383 mbcm_l3_host_age_f mbcm_l3_age; 384 mbcm_l3_traverse_f mbcm_l3_ip4_traverse; 385 386 mbcm_l3_ip6_get_f mbcm_l3_ip6_get; 387 mbcm_l3_ip6_add_f mbcm_l3_ip6_add; 388 mbcm_l3_ip6_delete_f mbcm_l3_ip6_delete; 389 mbcm_l3_ip6_delete_prefix_f mbcm_l3_ip6_delete_prefix; 390 mbcm_l3_ip6_replace_f mbcm_l3_ip6_replace; 391 mbcm_l3_traverse_f mbcm_l3_ip6_traverse; 392 393 mbcm_ip4_defip_cfg_get_f mbcm_ip4_defip_cfg_get; 394 mbcm_ip4_defip_ecmp_get_all_f mbcm_ip4_defip_ecmp_get_all; 395 mbcm_ip4_defip_add_f mbcm_ip4_defip_add; 396 mbcm_ip4_defip_delete_f mbcm_ip4_defip_delete; 397 mbcm_defip_delete_intf_f mbcm_defip_delete_intf; 398 mbcm_defip_delete_all_f mbcm_defip_delete_all; 399 mbcm_defip_age_f mbcm_defip_age; 400 mbcm_defip_traverse_f mbcm_ip4_defip_traverse; 401 402 mbcm_ip6_defip_cfg_get_f mbcm_ip6_defip_cfg_get; 403 mbcm_ip6_defip_ecmp_get_all_f mbcm_ip6_defip_ecmp_get_all; 404 mbcm_ip6_defip_add_f mbcm_ip6_defip_add; 405 mbcm_ip6_defip_delete_f mbcm_ip6_defip_delete; 406 mbcm_defip_traverse_f mbcm_ip6_defip_traverse; 407 408 mbcm_l3_conflict_get_f mbcm_l3_conflict_get; 409 mbcm_l3_info_get_f mbcm_l3_info_get; 410 411 /* IPMC functions */ 412 mbcm_ipmc_init_f mbcm_ipmc_init; 413 mbcm_ipmc_detach_f mbcm_ipmc_detach; 414 mbcm_ipmc_enable_f mbcm_ipmc_enable; 415 mbcm_ipmc_src_port_check_f mbcm_ipmc_src_port_check; 416 mbcm_ipmc_src_ip_search_f mbcm_ipmc_src_ip_search; 417 mbcm_ipmc_add_f mbcm_ipmc_add; 418 mbcm_ipmc_delete_f mbcm_ipmc_delete; 419 mbcm_ipmc_delete_all_f mbcm_ipmc_delete_all; 420 mbcm_ipmc_lookup_f mbcm_ipmc_lookup; 421 mbcm_ipmc_get_f mbcm_ipmc_get; 422 mbcm_ipmc_put_f mbcm_ipmc_put; 423 mbcm_ipmc_egress_port_get_f mbcm_ipmc_egress_port_get; 424 mbcm_ipmc_egress_port_set_f mbcm_ipmc_egress_port_set; 425 mbcm_ipmc_repl_init_f mbcm_ipmc_repl_init; 426 mbcm_ipmc_repl_detach_f mbcm_ipmc_repl_detach; 427 mbcm_ipmc_repl_get_f mbcm_ipmc_repl_get; 428 mbcm_ipmc_repl_add_f mbcm_ipmc_repl_add; 429 mbcm_ipmc_repl_delete_f mbcm_ipmc_repl_delete; 430 mbcm_ipmc_repl_delete_all_f mbcm_ipmc_repl_delete_all; 431 mbcm_ipmc_egress_intf_add_f mbcm_ipmc_egress_intf_add; 432 mbcm_ipmc_egress_intf_delete_f mbcm_ipmc_egress_intf_delete; 433 mbcm_ipmc_age_f mbcm_ipmc_age; 434 mbcm_ipmc_traverse_f mbcm_ipmc_traverse; 435 436 #endif /* INCLUDE_L3 */ 437 438 #ifdef INCLUDE_REGEX 439 mbcm_regex_config_set_f mbcm_regex_config_set; 440 mbcm_regex_config_get_f mbcm_regex_config_get; 441 442 mbcm_regex_exclude_add_f mbcm_regex_exclude_add; 443 mbcm_regex_exclude_delete_f mbcm_regex_exclude_delete; 444 mbcm_regex_exclude_delete_all_f mbcm_regex_exclude_delete_all; 445 mbcm_regex_exclude_get_f mbcm_regex_exclude_get; 446 mbcm_regex_engine_create_f mbcm_regex_engine_create; 447 mbcm_regex_engine_destroy_f mbcm_regex_engine_destroy; 448 mbcm_regex_engine_traverse_f mbcm_regex_engine_traverse; 449 mbcm_regex_engine_get_f mbcm_regex_engine_get; 450 bcm_regex_match_check_f mbcm_regex_match_check; 451 bcm_regex_match_set_f mbcm_regex_match_set; 452 bcm_regex_report_register_f mbcm_regex_report_register; 453 bcm_regex_report_unregister_f mbcm_regex_report_unregister; 454 #endif /* INCLUDE_REGEX */ 455 } mbcm_functions_t; 456 457 extern mbcm_functions_t *mbcm_driver[BCM_MAX_NUM_UNITS]; 458 extern uint32 mbcm_capability[BCM_MAX_NUM_UNITS]; 459 460 extern mbcm_functions_t mbcm_allayer_driver; 461 extern mbcm_functions_t mbcm_hercules_driver; 462 extern mbcm_functions_t mbcm_firebolt_driver; 463 extern mbcm_functions_t mbcm_bradley_driver; 464 extern mbcm_functions_t mbcm_humv_driver; 465 extern mbcm_functions_t mbcm_triumph_driver; 466 extern mbcm_functions_t mbcm_scorpion_driver; 467 extern mbcm_functions_t mbcm_conqueror_driver; 468 extern mbcm_functions_t mbcm_triumph2_driver; 469 extern mbcm_functions_t mbcm_enduro_driver; 470 extern mbcm_functions_t mbcm_hurricane_driver; 471 extern mbcm_functions_t mbcm_hurricane2_driver; 472 extern mbcm_functions_t mbcm_trident_driver; 473 extern mbcm_functions_t mbcm_titan_driver; 474 extern mbcm_functions_t mbcm_katana_driver; 475 extern mbcm_functions_t mbcm_triumph3_driver; 476 extern mbcm_functions_t mbcm_trident2_driver; 477 extern mbcm_functions_t mbcm_titan2_driver; 478 extern mbcm_functions_t mbcm_katana2_driver; 479 extern mbcm_functions_t mbcm_greyhound_driver; 480 extern mbcm_functions_t mbcm_tomahawk_driver; 481 extern mbcm_functions_t mbcm_apache_driver; 482 extern mbcm_functions_t mbcm_monterey_driver; 483 extern mbcm_functions_t mbcm_hurricane3_driver; 484 extern mbcm_functions_t mbcm_trident2plus_driver; 485 extern mbcm_functions_t mbcm_trident3_driver; 486 extern mbcm_functions_t mbcm_titan2plus_driver; 487 extern mbcm_functions_t mbcm_greyhound2_driver; 488 extern mbcm_functions_t mbcm_tomahawk2_driver; 489 extern mbcm_functions_t mbcm_helix5_driver; 490 extern mbcm_functions_t mbcm_tomahawk3_driver; 491 492 int mbcm_init(int unit); 493 int mbcm_deinit(int unit); 494 495 #endif /* !_BCM_INT_MBCM_H_ */