flexstate_int.h (5438B)
1 /* 2 * DO NOT EDIT THIS FILE! 3 * This file is auto-generated. 4 * Edits to this file will be lost when it is regenerated. 5 * 6 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 7 * 8 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 9 */ 10 11 #ifndef BCMINT_LTSW_FLEXSTATE_INT_H 12 #define BCMINT_LTSW_FLEXSTATE_INT_H 13 14 #include <bcm_int/ltsw/profile_mgmt.h> 15 16 #include <sal/sal_types.h> 17 18 /*! Ingress state lookup quantization sub component id. */ 19 #define BCMINT_FLEXSTATE_ING_LKUP_QUANT_SUB_COMP_ID (0) 20 21 /*! Ingress state forward lookup quantization sub component id. */ 22 #define BCMINT_FLEXSTATE_ING_FWD_QUANT_SUB_COMP_ID (1) 23 24 /*! Egress state quantization sub component id. */ 25 #define BCMINT_FLEXSTATE_EGR_QUANT_SUB_COMP_ID (2) 26 27 /*! Ingress state lookup action sub component id. */ 28 #define BCMINT_FLEXSTATE_ING_LKUP_ACTION_SUB_COMP_ID (3) 29 30 /*! Ingress state forward action sub component id. */ 31 #define BCMINT_FLEXSTATE_ING_FWD_ACTION_SUB_COMP_ID (4) 32 33 /*! Egress stateaction sub component id. */ 34 #define BCMINT_FLEXSTATE_EGR_ACTION_SUB_COMP_ID (5) 35 36 /*! Ingress state lookup pool sub component id. */ 37 #define BCMINT_FLEXSTATE_ING_LKUP_POOL_SUB_COMP_ID (6) 38 39 /*! Ingress state forward pool sub component id. */ 40 #define BCMINT_FLEXSTATE_ING_FWD_POOL_SUB_COMP_ID (7) 41 42 /*! Egress state pool sub component id. */ 43 #define BCMINT_FLEXSTATE_EGR_POOL_SUB_COMP_ID (8) 44 45 /*! Ingress state lookup group action sub component id. */ 46 #define BCMINT_FLEXSTATE_ING_LKUP_GRP_ACTION_SUB_COMP_ID (9) 47 48 /*! Ingress state forward group action sub component id. */ 49 #define BCMINT_FLEXSTATE_ING_FWD_GRP_ACTION_SUB_COMP_ID (10) 50 51 /*! Egress state group action sub component id. */ 52 #define BCMINT_FLEXSTATE_EGR_GRP_ACTION_SUB_COMP_ID (11) 53 54 /*! Table bit of emft. */ 55 #define BCMINT_FLEXSTATE_ING_LKUP_EMFT_TBL_BIT (0) 56 57 /*! Table bit of ing l2 iif attributes. */ 58 #define BCMINT_FLEXSTATE_ING_LKUP_ING_L2_IIF_ATTRIBUTES_TBL_BIT (1) 59 60 /*! Table bit of ecn state. */ 61 #define BCMINT_FLEXSTATE_EGR_ECN_STATE_TBL_BIT (0) 62 63 /*! Table bit of tx byte state. */ 64 #define BCMINT_FLEXSTATE_EGR_TX_BYTE_STATE_TBL_BIT (1) 65 66 /*! Maximum pipe number. */ 67 #define BCMINT_FLEXSTATE_MAX_PIPE 8 68 69 /*! 70 * \brief Flex state source infomation. 71 */ 72 typedef struct bcmint_flexstate_source_info_s { 73 74 /*! Source enumeration in HSDK API. */ 75 int source; 76 77 /*! Stage id. */ 78 int stage; 79 80 /*! Logical table in SDKLT. */ 81 const char *table; 82 83 /*! Table bit. */ 84 uint32_t tbl_bit; 85 86 } bcmint_flexstate_source_info_t; 87 88 /*! 89 * \brief Object type. 90 */ 91 typedef enum bcmint_flexstate_object_type_s { 92 93 /*! Const object. */ 94 FlexstateObjectTypeConst = 0, 95 96 /*! Trigger object. */ 97 FlexstateObjectTypeTrigger = 1, 98 99 /*! Quantization object. */ 100 FlexstateObjectTypeQuant = 2, 101 102 /*! Menu object. */ 103 FlexstateObjectTypeMenu = 3, 104 105 /*! Always last one. */ 106 FlexstateObjectTypeCount = 4 107 108 } bcmint_flexstate_object_type_t; 109 110 #define BCMINT_FLEXSTATE_OBJECT_TYPE_STR \ 111 { \ 112 "Const", \ 113 "Trigger", \ 114 "Quant", \ 115 "Menu" \ 116 } 117 118 /*! 119 * \brief Flex state object information. 120 */ 121 typedef struct bcmint_flexstate_object_info_s { 122 123 /*! Object enumeration in HSDK API. */ 124 int object; 125 126 /*! Stage id. */ 127 int stage; 128 129 /*! Object type. */ 130 bcmint_flexstate_object_type_t obj_type; 131 132 /*! Object symbol in SDKLT. */ 133 const char *symbol; 134 135 } bcmint_flexstate_object_info_t; 136 137 /*! 138 * \brief Flex state stage properties. 139 */ 140 typedef struct bcmint_flexstate_stage_info_s { 141 142 /*! Stage. */ 143 int stage; 144 145 /*! Name. */ 146 const char *name; 147 148 /*! Direction. */ 149 int dir; 150 151 /*! HA pool id. */ 152 uint8_t ha_pool_id; 153 154 /*! HA quantization id. */ 155 uint8_t ha_quant_id; 156 157 /*! HA action id. */ 158 uint8_t ha_action_id; 159 160 /*! HA group action id. */ 161 uint8_t ha_grp_act_id; 162 163 /*! Profile handle. */ 164 bcmi_ltsw_profile_hdl_t ph[BCMINT_FLEXSTATE_MAX_PIPE]; 165 166 /*! Object quantization config. */ 167 const char *obj_quant_cfg; 168 169 /*! Range check profile. */ 170 const char *range_chk_profile; 171 172 /*! Range check profile ID. */ 173 const char *range_chk_profile_id; 174 175 /*! Action profile. */ 176 const char *act_profile; 177 178 /*! Action profile ID. */ 179 const char *act_profile_id; 180 181 /*! Action index. */ 182 const char *act_index; 183 184 /*! Action value a compare. */ 185 const char *act_value_a_comp; 186 187 /*! Action value a true. */ 188 const char *act_value_a_true; 189 190 /*! Action value a false. */ 191 const char *act_value_a_false; 192 193 /*! Action value b compare. */ 194 const char *act_value_b_comp; 195 196 /*! Action value b true. */ 197 const char *act_value_b_true; 198 199 /*! Action value b false. */ 200 const char *act_value_b_false; 201 202 /*! Group action profile. */ 203 const char *grp_act_profile; 204 205 /*! Group action profile ID. */ 206 const char *grp_act_profile_id; 207 208 /*! Operand profile. */ 209 const char *operand_profile; 210 211 /*! Operand profile ID. */ 212 const char *operand_profile_id; 213 214 /*! Stats. */ 215 const char *stats; 216 217 /*! Trigger. */ 218 const char *trigger; 219 220 /*! Error stats. */ 221 const char *err_stats; 222 223 /*! Instance. */ 224 const char *inst; 225 226 /*! Hit ctrl. */ 227 const char *hit_ctrl; 228 229 /*! Hit dst group. */ 230 const char *hit_dst_grp; 231 232 /*! Hit src group. */ 233 const char *hit_src_grp; 234 235 } bcmint_flexstate_stage_info_t; 236 237 #endif /* BCMINT_LTSW_FLEXSTATE_INT_H */