fec_allocation.h (2022B)
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-2020 Broadcom Inc. All rights reserved. 6 * 7 * File: fec_allocation.h 8 * Purpose: fec allocation managament 9 */ 10 11 12 #ifndef __USERINTERFACE_FEC_ALLOCATION_H__ 13 #define __USERINTERFACE_FEC_ALLOCATION_H__ 14 15 16 #include <soc/dpp/SAND/Utils/sand_sorted_list.h> 17 #include <bcm/l3.h> 18 #include <bcm/error.h> 19 #include <bcm_int/common/debug.h> 20 #include <bcm_int/dpp/l3.h> 21 #include <shared/bsl.h> 22 #include <bcm_int/dpp/utils.h> 23 #include <bcm_int/dpp/error.h> 24 #include <bcm/debug.h> 25 #include <bcm/failover.h> 26 #include <sal/appl/io.h> 27 #include <sal/core/libc.h> 28 #include <sal/core/spl.h> 29 #include <sal/core/alloc.h> 30 #include <sal/core/dpc.h> 31 32 33 #ifdef _ERR_MSG_MODULE_NAME 34 #error "_ERR_MSG_MODULE_NAME redefined" 35 #endif 36 37 #define _ERR_MSG_MODULE_NAME BSL_BCM_L3 38 #define DOES_NOT_BELONG_TO_ECMP -1 39 #define DATABASE_FILE_PATH_ALLOC_MANAGER "database_file_alloc_manager.txt" 40 #define DATABASE_FILE_PATH_FECS_LIST "database_file_fecs_list.txt" 41 42 int fec_allocation_bcm_l3_egress_ecmp_destroy(int unit,bcm_l3_egress_ecmp_t *ecmp); 43 int fec_allocation_bcm_l3_egress_destroy(int unit, bcm_if_t intf); 44 int fec_allocation_bcm_l3_egress_ecmp_delete(int unit, bcm_l3_egress_ecmp_t *ecmp, bcm_if_t intf); 45 int fec_allocation_bcm_l3_egress_ecmp_add(int unit, bcm_l3_egress_ecmp_t *ecmp, bcm_if_t intf); 46 int fec_allocation_bcm_l3_egress_ecmp_create(int unit, bcm_l3_egress_ecmp_t *ecmp, int intf_count, bcm_if_t *intf_array); 47 int fec_allocation_bcm_l3_egress_create(int unit, uint32 flags, bcm_l3_egress_t *egr, bcm_if_t *intf); 48 int fec_allocation_create_database_file(int unit); 49 int fec_allocation_initialize(int unit); 50 void fec_allocation_deinitialize_last(void); 51 void fec_allocation_deinitialize_unit(int unit); 52 int fec_allocation_associate_fec(int unit, bcm_if_t fec_id); 53 int soc_dpp_fec_allocation_main(int unit); 54 int fec_allocation_main(int unit, int write_logs); 55 56 #endif 57