openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

flexctr_int.h (7567B)


      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_FLEXCTR_INT_H
     12 #define BCMINT_LTSW_FLEXCTR_INT_H
     13 
     14 #include <sal/sal_types.h>
     15 
     16 /*! Ingress quantization sub component id. */
     17 #define BCMINT_FLEXCTR_ING_QUANT_SUB_COMP_ID (0)
     18 
     19 /*! Egress quantization sub component id. */
     20 #define BCMINT_FLEXCTR_EGR_QUANT_SUB_COMP_ID (1)
     21 
     22 /*! Ingress counter action sub component id. */
     23 #define BCMINT_FLEXCTR_ING_ACTION_SUB_COMP_ID (2)
     24 
     25 /*! Egress counter action sub component id. */
     26 #define BCMINT_FLEXCTR_EGR_ACTION_SUB_COMP_ID (3)
     27 
     28 /*! Ingress counter pool sub component id. */
     29 #define BCMINT_FLEXCTR_ING_POOL_SUB_COMP_ID (4)
     30 
     31 /*! Egress counter pool sub component id. */
     32 #define BCMINT_FLEXCTR_EGR_POOL_SUB_COMP_ID (5)
     33 
     34 /*! Ingress counter group action sub component id. */
     35 #define BCMINT_FLEXCTR_ING_GRP_ACTION_SUB_COMP_ID (6)
     36 
     37 /*! Egress counter group action sub component id. */
     38 #define BCMINT_FLEXCTR_EGR_GRP_ACTION_SUB_COMP_ID (7)
     39 
     40 /*! Ingress packet attribute sub component id. */
     41 #define BCMINT_FLEXCTR_ING_PKT_ATTR_SUB_COMP_ID (8)
     42 
     43 /*! Egress packet attribute sub component id. */
     44 #define BCMINT_FLEXCTR_EGR_PKT_ATTR_SUB_COMP_ID (9)
     45 
     46 /*! Table bit of ing_system_port. */
     47 #define BCMINT_FLEXCTR_ING_SYSTEM_PORT_TBL_BIT (0)
     48 
     49 /*! Table bit of ing_l2_iif. */
     50 #define BCMINT_FLEXCTR_ING_L2_IIF_TBL_BIT (1)
     51 
     52 /*! Table bit of ing_vfi. */
     53 #define BCMINT_FLEXCTR_ING_VFI_TBL_BIT (2)
     54 
     55 /*! Table bit of ing_svp. */
     56 #define BCMINT_FLEXCTR_ING_SVP_TBL_BIT (3)
     57 
     58 /*! Table bit of ing_l3_iif. */
     59 #define BCMINT_FLEXCTR_ING_L3_IIF_TBL_BIT (4)
     60 
     61 /*! Table bit of ing_vrf. */
     62 #define BCMINT_FLEXCTR_ING_VRF_TBL_BIT (5)
     63 
     64 /*! Table bit of ing_l3_ipv4_flow. */
     65 #define BCMINT_FLEXCTR_ING_L3_IPV4_FLOW_TBL_BIT (6)
     66 
     67 /*! Table bit of vfp. */
     68 #define BCMINT_FLEXCTR_ING_VFP_TBL_BIT (7)
     69 
     70 /*! Table bit of ifp. */
     71 #define BCMINT_FLEXCTR_ING_IFP_TBL_BIT (8)
     72 
     73 /*! Table bit of destination_fp. */
     74 #define BCMINT_FLEXCTR_DESTINATION_FP_TBL_BIT (9)
     75 
     76 /*! Table bit of port_system_destination. */
     77 #define BCMINT_FLEXCTR_PORT_SYSTEM_DESTINATION_TBL_BIT (10)
     78 
     79 /*! Table bit of exactmatch. */
     80 #define BCMINT_FLEXCTR_ING_EXACTMATCH_TBL_BIT (11)
     81 
     82 /*! Table bit of ipmc. */
     83 #define BCMINT_FLEXCTR_IPMC_TBL_BIT (12)
     84 
     85 /*! Table bit of dst l2. */
     86 #define BCMINT_FLEXCTR_L2DST_TBL_BIT (13)
     87 
     88 /*! Table bit of src l2. */
     89 #define BCMINT_FLEXCTR_L2SRC_TBL_BIT (14)
     90 
     91 /*! Table bit of ing sample pool. */
     92 #define BCMINT_FLEXCTR_ING_SAMPLE_POOL_TBL_BIT (15)
     93 
     94 /*! Table bit of ing sample count. */
     95 #define BCMINT_FLEXCTR_ING_SAMPLE_COUNT_TBL_BIT (16)
     96 
     97 /*! Table bit of flex sample pool. */
     98 #define BCMINT_FLEXCTR_FLEX_SAMPLE_POOL_TBL_BIT (17)
     99 
    100 /*! Table bit of flex sample count. */
    101 #define BCMINT_FLEXCTR_FLEX_SAMPLE_COUNT_TBL_BIT (18)
    102 
    103 /*! Table bit of exact match flow tracker. */
    104 #define BCMINT_FLEXCTR_EM_FT_TBL_BIT (19)
    105 
    106 /*! Table bit of ingress vlan translation. */
    107 #define BCMINT_FLEXCTR_ING_VLAN_XLATE_TBL_BIT (20)
    108 
    109 /*! Table bit of egr_l3_next_hop_1. */
    110 #define BCMINT_FLEXCTR_EGR_L3_NEXT_HOP_1_TBL_BIT (0)
    111 
    112 /*! Table bit of egr_l3_oif_1. */
    113 #define BCMINT_FLEXCTR_EGR_L3_OIF_1_TBL_BIT (1)
    114 
    115 /*! Table bit of egr_l3_next_hop_2. */
    116 #define BCMINT_FLEXCTR_EGR_L3_NEXT_HOP_2_TBL_BIT (2)
    117 
    118 /*! Table bit of egr_l3_oif_2. */
    119 #define BCMINT_FLEXCTR_EGR_L3_OIF_2_TBL_BIT (3)
    120 
    121 /*! Table bit of egr_l2_oif. */
    122 #define BCMINT_FLEXCTR_EGR_L2_OIF_TBL_BIT (4)
    123 
    124 /*! Table bit of egr_vfi. */
    125 #define BCMINT_FLEXCTR_EGR_VFI_TBL_BIT (5)
    126 
    127 /*! Table bit of egr_dvp. */
    128 #define BCMINT_FLEXCTR_EGR_DVP_TBL_BIT (6)
    129 
    130 /*! Table bit of efp. */
    131 #define BCMINT_FLEXCTR_EGR_EFP_TBL_BIT (7)
    132 
    133 /*! Table bit of egress vlan translation. */
    134 #define BCMINT_FLEXCTR_EGR_VLAN_XLATE_TBL_BIT (8)
    135 
    136 /*!
    137  * \brief Flex counter source infomation.
    138  */
    139 typedef struct bcmint_flexctr_source_info_s {
    140 
    141     /*! Source enumeration in HSDK API. */
    142     int source;
    143 
    144     /*! Stage id. */
    145     int stage;
    146 
    147     /*! Logical table in SDKLT. */
    148     const char *table;
    149 
    150     /*! Table bit. */
    151     uint32_t tbl_bit;
    152 
    153 } bcmint_flexctr_source_info_t;
    154 
    155 /*!
    156  * \brief Object type.
    157  */
    158 typedef enum bcmint_flexctr_object_type_s {
    159 
    160     /*! Const object. */
    161     FlexctrObjectTypeConst = 0,
    162 
    163     /*! Trigger object. */
    164     FlexctrObjectTypeTrigger = 1,
    165 
    166     /*! Quantization object. */
    167     FlexctrObjectTypeQuant = 2,
    168 
    169     /*! Menu object. */
    170     FlexctrObjectTypeMenu = 3,
    171 
    172     /*! Menu object with ID. */
    173     FlexctrObjectTypeMenuId = 4,
    174 
    175     /*! Always last one. */
    176     FlexctrObjectTypeCount = 5
    177 
    178 } bcmint_flexctr_object_type_t;
    179 
    180 #define BCMINT_FLEXCTR_OBJECT_TYPE_STR \
    181 { \
    182     "Const", \
    183     "Trigger", \
    184     "Quant", \
    185     "Menu", \
    186     "MenuId" \
    187 }
    188 
    189 /*!
    190  * \brief Flex counter object information.
    191  */
    192 typedef struct bcmint_flexctr_object_info_s {
    193 
    194     /*! Object enumeration in HSDK API. */
    195     int object;
    196 
    197     /*! Stage id. */
    198     int stage;
    199 
    200     /*! Object type. */
    201     bcmint_flexctr_object_type_t obj_type;
    202 
    203     /*! Object symbol in SDKLT. */
    204     const char *symbol;
    205 
    206 } bcmint_flexctr_object_info_t;
    207 
    208 /*!
    209  * \brief Flex counter trigger interval information.
    210  */
    211 typedef struct bcmint_flexctr_interval_info_s {
    212 
    213     /*! Trigger interval enumeration in HSDK API. */
    214     int interval;
    215 
    216 } bcmint_flexctr_interval_info_t;
    217 
    218 /*!
    219  * \brief Flex counter object enumeration map.
    220  */
    221 typedef struct bcmint_flexctr_object_enum_map_s {
    222 
    223     /*! Object enumeration name in SDKLT. */
    224     const char *name;
    225 
    226     /*! Object enumeration value. */
    227     uint32_t value;
    228 
    229 } bcmint_flexctr_object_enum_map_t;
    230 
    231 /*!
    232  * \brief Flex counter flex action range.
    233  */
    234 typedef struct bcmint_flexctr_flex_action_range_s {
    235 
    236     /*! Stage id. */
    237     int stage;
    238 
    239     /*! Minimum flex action ID. */
    240     uint32_t flex_action_min;
    241 
    242     /*! Maximum flex action ID. */
    243     uint32_t flex_action_max;
    244 
    245 } bcmint_flexctr_flex_action_range_t;
    246 
    247 /*!
    248  * \brief Flex counter packet attribute information.
    249  */
    250 typedef struct bcmint_flexctr_pkt_attr_info_s {
    251 
    252     /*! Packet attribute selector type enumeration in HSDK API. */
    253     int attr_type;
    254 
    255     /*! Stage id. */
    256     int stage;
    257 
    258     /*! Valid mask for this packet attribute selector type. */
    259     uint32_t mask;
    260 
    261     /*! Start bit position. */
    262     int start_bit_pos;
    263 
    264 } bcmint_flexctr_pkt_attr_info_t;
    265 
    266 /*!
    267  * \brief Flex counter packet attribute bus information.
    268  */
    269 typedef struct bcmint_flexctr_pkt_attr_bus_info_s {
    270 
    271     /*! Bit position in packet attribute bus. */
    272     int bit_pos;
    273 
    274     /*! Packet attribute bus symbol in SDKLT. */
    275     const char *symbol;
    276 
    277 } bcmint_flexctr_pkt_attr_bus_info_t;
    278 
    279 /*!
    280  * \brief Flex counter packet type attribute value information.
    281  */
    282 typedef struct bcmint_flexctr_pkt_type_value_info_s {
    283 
    284     /*! Flex counter packet type enumeration in HSDK API. */
    285     int pkt_type;
    286 
    287     /*! Flex counter packet type attribute value. */
    288     uint32_t value;
    289 
    290 } bcmint_flexctr_pkt_type_value_info_t;
    291 
    292 /*!
    293  * \brief Flex counter VLAN tag attribute value information.
    294  */
    295 typedef struct bcmint_flexctr_vlan_tag_value_info_s {
    296 
    297     /*! Flex counter VLAN tag enumeration in HSDK API. */
    298     int vlan_tag;
    299 
    300     /*! Flex counter VLAN tag attribute value. */
    301     uint32_t value;
    302 
    303 } bcmint_flexctr_vlan_tag_value_info_t;
    304 
    305 /*!
    306  * \brief Flex counter enumeration map.
    307  */
    308 typedef struct bcmint_flexctr_enum_map_s {
    309 
    310     /*! Enum name. */
    311     const char *name;
    312 
    313     /*! Enum value. */
    314     int val;
    315 
    316 } bcmint_flexctr_enum_map_t;
    317 
    318 #endif /* BCMINT_LTSW_FLEXCTR_INT_H */