bcmgene_feature.h (6272B)
1 /*! \file bcmgene_feature.h 2 * 3 * Broadcom Generic Extensible NPL Encapsulation (GENE) feature header file. 4 * This file contains feature and sub-feature definitions internal to the BCM GENE library. 5 */ 6 /* 7 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 8 * 9 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 10 */ 11 12 #ifndef BCMGENE_LTSW_GENE_FEATURE_H 13 #define BCMGENE_LTSW_GENE_FEATURE_H 14 15 /*! 16 * \brief FlexDigest functionalities. 17 */ 18 /*! The FD normalization functionality. */ 19 #define BCMGENE_FLEXDIGEST_F_NORM 1 20 21 /*! The FD lookup functionality. */ 22 #define BCMGENE_FLEXDIGEST_F_LKUP 2 23 24 /*! The FD hashing functionality. */ 25 #define BCMGENE_FLEXDIGEST_F_HASH 3 26 27 /*! The FD global control functionality. */ 28 #define BCMGENE_FLEXDIGEST_F_GLOBAL 4 29 30 31 #define BCMGENE_FLEXDIGEST_F_STRINGS \ 32 { \ 33 "Norm", \ 34 "Lkup", \ 35 "Hash," \ 36 "Global" \ 37 } 38 39 /*! 40 * \brief FlexDigest normalization sub-features. 41 */ 42 /*! The seed profile sub-feature for FD normalization. */ 43 #define BCMGENE_FLEXDIGEST_SUB_F_NORM_SEED_PROFILE (1 << 0) 44 45 /*! The profile sub-feature for FD normalization. */ 46 #define BCMGENE_FLEXDIGEST_SUB_F_NORM_PROFILE (1 << 1) 47 48 #define BCMGENE_FLEXDIGEST_SUB_F_NORM_STRINGS \ 49 { \ 50 "NormSeedProfile", \ 51 "NormProfile" \ 52 } 53 54 /*! 55 * \brief FlexDigest lookup sub-features. 56 */ 57 /*! The group sub-feature for FD lookup. */ 58 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_GROUP (1 << 0) 59 60 /*! The pre-selection sub-feature of match identifier for FD lookup. */ 61 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_PRESEL (1 << 1) 62 63 /*! The entry sub-feature for FD lookup. */ 64 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_ENTRY (1 << 2) 65 66 /*! The opaque key sub-feature for FD lookup. */ 67 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_OPAQUE_KEY (1 << 3) 68 69 /*! The match identifier sub-feature for FD lookup. */ 70 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_MATCH_ID (1 << 4) 71 72 /*! The policy field sub-feature for FD lookup. */ 73 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_POLICY (1 << 5) 74 75 /*! The mask profile sub-feature for FD lookup. */ 76 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_MASK_PROFILE (1 << 6) 77 78 #define BCMGENE_FLEXDIGEST_SUB_F_LKUP_STRINGS \ 79 { \ 80 "LkupGroup", \ 81 "LkupPresel", \ 82 "LkupEntry", \ 83 "LkupOpaqueKey", \ 84 "LkupMatchId", \ 85 "LkupPolicy", \ 86 "LkupMaskProfile" \ 87 } 88 89 /*! 90 * \brief FlexDigest hashing sub-features. 91 */ 92 /*! The profile sub-feature for FD hashing. */ 93 #define BCMGENE_FLEXDIGEST_SUB_F_HASH_PROFILE (1 << 0) 94 95 /*! The pre-processing sub-feature for FD hashing. */ 96 #define BCMGENE_FLEXDIGEST_SUB_F_HASH_PRE_PROCESSING (1 << 1) 97 98 /*! The salt sub-feature for FD hashing. */ 99 #define BCMGENE_FLEXDIGEST_SUB_F_HASH_SALT (1 << 2) 100 101 /*! The function sub-feature for FD hashing. */ 102 #define BCMGENE_FLEXDIGEST_SUB_F_HASH_FUNCTION (1 << 3) 103 104 #define BCMGENE_FLEXDIGEST_SUB_F_HASH_STRINGS \ 105 { \ 106 "HashProfile", \ 107 "HashPreProcessing", \ 108 "HashSalt", \ 109 "HashFunction" \ 110 } 111 112 /*! 113 * \brief FlexDigest global control sub-features. 114 */ 115 /*! The versatile hash seed control sub-feature for FD global control . */ 116 #define BCMGENE_FLEXDIGEST_SUB_F_GLOBAL_VERSATILE_HASH_SEED (1 << 0) 117 118 #define BCMGENE_FLEXDIGEST_SUB_F_GLOBAL_STRINGS \ 119 { \ 120 "GlobalVersatileHashSeed" \ 121 } 122 123 /*! 124 * \brief Hash Output Selection functionalities. 125 */ 126 /*! The hash output selection profile functionality. */ 127 #define BCMGENE_HASH_OUTPUT_SELECTION_F_PROFILE 1 128 129 /*! The hash output selection instance functionality. */ 130 #define BCMGENE_HASH_OUTPUT_SELECTION_F_INSTANCE 2 131 132 #define BCMGENE_HASH_OUTPUT_SELECTION_F_STRINGS \ 133 { \ 134 "Profile", \ 135 "Instance" \ 136 } 137 138 /*! 139 * \brief Hash Output Selection sub-features. 140 */ 141 /*! The sub-feature for trunk unicast packet resolution. */ 142 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_TRUNK_UC (1 << 0) 143 144 /*! The sub-feature for trunk non unicast packet resolution. */ 145 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_TRUNK_NONUC (1 << 1) 146 147 /*! The sub-feature for trunk failover resolution. */ 148 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_TRUNK_FAILOVER (1 << 2) 149 150 /*! The sub-feature for trunk system resolution. */ 151 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_TRUNK_SYSTEM (1 << 3) 152 153 /*! The sub-feature for trunk system failver resolution. */ 154 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_TRUNK_SYSTEM_FAILOVER (1 << 4) 155 156 /*! The sub-feature for VPLAG resolution. */ 157 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_TRUNK_VP (1 << 5) 158 159 /*! The sub-feature for trunk system failver resolution. */ 160 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_ECMP_OVERLAY (1 << 6) 161 162 /*! The sub-feature for VPLAG resolution. */ 163 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_ECMP_UNDERLAY (1 << 7) 164 165 /*! The sub-feature for dlb trunk resolution. */ 166 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_DLB_TRUNK (1 << 8) 167 168 /*! The sub-feature for dlb trunk resolution. */ 169 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_DLB_ECMP (1 << 9) 170 171 /*! The sub-feature for entropy hash resolution. */ 172 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_ENTROPY (1 << 10) 173 174 #define BCMGENE_HASH_OUTPUT_SELECTION_SUB_F_STRINGS \ 175 { \ 176 "TrunkUc", \ 177 "TrunkNonuc", \ 178 "TrunkFailover", \ 179 "TrunkSystem", \ 180 "TrunkSystemFailover", \ 181 "TrunkVp", \ 182 "EcmpOverlay", \ 183 "EcmpUnderlay", \ 184 "DlbTrunk", \ 185 "DlbEcmp", \ 186 "Entropy" \ 187 } 188 189 /*! 190 * \brief L3 AACL functionalities. 191 */ 192 /*! The L3 AACL for IPv4 source address and src L4 port. */ 193 #define BCMGENE_L3_AACL_F_COMPRESSION 1 194 195 /*! The L3 AACL validation. */ 196 #define BCMGENE_L3_AACL_F_COMPRESSION_VALIDATE 2 197 198 #define BCMGENE_L3_AACL_F_STRINGS \ 199 { \ 200 "Compression", \ 201 "Compression_validate" \ 202 } 203 204 /*! 205 * \brief L3 AACL sub-features. 206 */ 207 /*! The sub-feature for L3 AACL IPv4 source address and src L4 port. */ 208 #define BCMGENE_L3_AACL_SUB_F_IPv4_SRC (1 << 0) 209 210 /*! The sub-feature for L3 AACL IPv4 destination address and dst L4 port. */ 211 #define BCMGENE_L3_AACL_SUB_F_IPv4_DST (1 << 1) 212 213 /*! The sub-feature for L3 AACL IPv6 source address and src L4 port. */ 214 #define BCMGENE_L3_AACL_SUB_F_IPv6_SRC (1 << 2) 215 216 /*! The sub-feature for L3 AACL IPv6 destination address and dst L4 port. */ 217 #define BCMGENE_L3_AACL_SUB_F_IPv6_DST (1 << 3) 218 219 #define BCMGENE_L3_AACL_SUB_F_STRINGS \ 220 { \ 221 "IPv4Src", \ 222 "IPv4Dst", \ 223 "IPv6Src", \ 224 "IPv6Dst" \ 225 } 226 227 #endif /* BCMGENE_LTSW_GENE_FEATURE_H */