multicast.h (3033B)
1 /** 2 * \file bcm_int/dnx/multicast/multicast.h Internal DNX VLAN APIs 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 8 #ifndef _DNX_MULTICAST_API_INCLUDED__ 9 /* 10 * { 11 */ 12 #define _DNX_MULTICAST_API_INCLUDED__ 13 14 #ifndef BCM_DNX_SUPPORT 15 #error "This file is for use by DNX (JR2) family only!" 16 #endif 17 18 #include <bcm/multicast.h> 19 #include <bcm_int/dnx/algo/swstate/auto_generated/access/multicast_access.h> 20 #include <soc/dnx/dnx_data/auto_generated/dnx_data_multicast.h> 21 #include <soc/dnx/dnx_data/auto_generated/dnx_data_lif.h> 22 23 #define DNX_MULTICAST_ALGO_RES_MCDB_STR "MCDB" 24 #define DNX_MULTICAST_ALGO_RES_IS_TDM_STR "MULTICAST_GROUP_IS_TDM" 25 26 #define DNX_MULTICAST_ING_INVALID_DESTINATION(unit) ((1 << 21) - 1) 27 #define DNX_MULTICAST_INVALID_CUD dnx_data_lif.global_lif.egress_out_lif_null_value_get(unit) 28 29 #define DNX_MULTICAST_IS_BIER(flags) (((flags & BCM_MULTICAST_BIER_64_GROUP) || \ 30 (flags & BCM_MULTICAST_BIER_128_GROUP) || \ 31 (flags & BCM_MULTICAST_BIER_256_GROUP)) ? 1 : 0) 32 #define DNX_MULTICAST_IS_INGRESS(flags) ((flags & BCM_MULTICAST_INGRESS_GROUP) ? 1 : 0) 33 #define DNX_MULTICAST_IS_EGRESS(flags) (((flags & BCM_MULTICAST_EGRESS_GROUP) || (flags & BCM_MULTICAST_EGRESS_TDM_GROUP)) ? 1 : 0) 34 35 /** 36 * \brief - Initialize dnx multicast module 37 * 38 * \par DIRECT_INPUT: 39 * \param [in] unit - Unit-ID 40 * 41 * \par INDIRECT INPUT: 42 * * DNX data related multicast module information 43 * \par DIRECT OUTPUT: 44 * shr_error_e 45 * \par INDIRECT OUTPUT 46 * * None 47 * \remark 48 * * None 49 * \see 50 * * None 51 */ 52 shr_error_e dnx_multicast_init( 53 int unit); 54 55 /** 56 * \brief - Deinitialize dnx multicast module 57 * 58 * \par DIRECT_INPUT: 59 * \param [in] unit - Unit-ID 60 * 61 * \par INDIRECT INPUT: 62 * * None 63 * \par DIRECT OUTPUT: 64 * shr_error_e 65 * \par INDIRECT OUTPUT 66 * * None 67 * \remark 68 * * None 69 * \see 70 * * None 71 */ 72 shr_error_e dnx_multicast_deinit( 73 int unit); 74 75 /** 76 * \brief 77 * obtain gport from multicast destination 78 * 79 * \param [in] unit - Unit ID 80 * \param [in] core_id - core ID 81 * \param [in] is_egress - is destination egress 82 * \param [in] destination - dbal representation of multicast destination 83 * \param [out] gport - gport represensation of the destination 84 * 85 * \return 86 * shr_error_e 87 * 88 * \remark 89 * * None 90 * \see 91 * * None 92 */ 93 shr_error_e dnx_multicast_gport_from_encoded_destination_field( 94 int unit, 95 bcm_core_t core_id, 96 int is_egress, 97 uint32 destination, 98 bcm_gport_t * gport); 99 100 shr_error_e dnx_multicast_utils_egr_invalid_destination_get( 101 int unit, 102 uint32 *egr_invalid_destination); 103 104 shr_error_e dnx_multicast_utils_ext_mode_get( 105 int unit, 106 int *ext_mode); 107 108 /* 109 * MACROs 110 * { 111 */ 112 113 /* 114 * } 115 */ 116 117 /* 118 * } 119 */ 120 #endif/*_DNX_MULTICAST_API_INCLUDED__*/