brintos

brintos / linux-shallow public Read only

0
0
Text · 39.2 KiB · 4735fad Raw
907 lines · c
1/* SPDX-License-Identifier: BSD-3-Clause */2/* Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries.3 * Microchip VCAP API4 */5 6/* This file is autogenerated by cml-utils 2023-03-13 10:16:42 +0100.7 * Commit ID: 259f0efd6d6d91bfbf62858de153cc757b6bffa3 (dirty)8 */9 10#ifndef __VCAP_AG_API__11#define __VCAP_AG_API__12 13enum vcap_type {14	VCAP_TYPE_ES0,15	VCAP_TYPE_ES2,16	VCAP_TYPE_IS0,17	VCAP_TYPE_IS1,18	VCAP_TYPE_IS2,19	VCAP_TYPE_MAX20};21 22/* Keyfieldset names with origin information */23enum vcap_keyfield_set {24	VCAP_KFS_NO_VALUE,          /* initial value */25	VCAP_KFS_5TUPLE_IP4,        /* lan966x is1 X2 */26	VCAP_KFS_5TUPLE_IP6,        /* lan966x is1 X4 */27	VCAP_KFS_7TUPLE,            /* lan966x is1 X4 */28	VCAP_KFS_ARP,               /* sparx5 is2 X6, sparx5 es2 X6, lan966x is2 X2 */29	VCAP_KFS_DBL_VID,           /* lan966x is1 X1 */30	VCAP_KFS_DMAC_VID,          /* lan966x is1 X1 */31	VCAP_KFS_ETAG,              /* sparx5 is0 X2 */32	VCAP_KFS_IP4_OTHER,         /* sparx5 is2 X6, sparx5 es2 X6, lan966x is2 X2 */33	VCAP_KFS_IP4_TCP_UDP,       /* sparx5 is2 X6, sparx5 es2 X6, lan966x is2 X2 */34	VCAP_KFS_IP4_VID,           /* sparx5 es2 X3 */35	VCAP_KFS_IP6_OTHER,         /* lan966x is2 X4 */36	VCAP_KFS_IP6_STD,           /* sparx5 is2 X6, sparx5 es2 X6, lan966x is2 X2 */37	VCAP_KFS_IP6_TCP_UDP,       /* lan966x is2 X4 */38	VCAP_KFS_IP6_VID,           /* sparx5 es2 X6 */39	VCAP_KFS_IP_7TUPLE,         /* sparx5 is2 X12, sparx5 es2 X12 */40	VCAP_KFS_ISDX,              /* sparx5 es0 X1 */41	VCAP_KFS_LL_FULL,           /* sparx5 is0 X6 */42	VCAP_KFS_MAC_ETYPE,         /* sparx5 is2 X6, sparx5 es2 X6, lan966x is2 X2 */43	VCAP_KFS_MAC_LLC,           /* lan966x is2 X2 */44	VCAP_KFS_MAC_SNAP,          /* lan966x is2 X2 */45	VCAP_KFS_NORMAL,            /* lan966x is1 X2 */46	VCAP_KFS_NORMAL_5TUPLE_IP4,  /* sparx5 is0 X6 */47	VCAP_KFS_NORMAL_7TUPLE,     /* sparx5 is0 X12 */48	VCAP_KFS_NORMAL_IP6,        /* lan966x is1 X4 */49	VCAP_KFS_OAM,               /* lan966x is2 X2 */50	VCAP_KFS_PURE_5TUPLE_IP4,   /* sparx5 is0 X3 */51	VCAP_KFS_RT,                /* lan966x is1 X1 */52	VCAP_KFS_SMAC_SIP4,         /* lan966x is2 X1 */53	VCAP_KFS_SMAC_SIP6,         /* lan966x is2 X2 */54	VCAP_KFS_VID,               /* lan966x es0 X1 */55};56 57/* List of keyfields with description58 *59 * Keys ending in _IS are booleans derived from frame data60 * Keys ending in _CLS are classified frame data61 *62 * VCAP_KF_8021BR_ECID_BASE: W12, sparx5: is063 *   Used by 802.1BR Bridge Port Extension in an E-Tag64 * VCAP_KF_8021BR_ECID_EXT: W8, sparx5: is065 *   Used by 802.1BR Bridge Port Extension in an E-Tag66 * VCAP_KF_8021BR_E_TAGGED: W1, sparx5: is067 *   Set for frames containing an E-TAG (802.1BR Ethertype 893f)68 * VCAP_KF_8021BR_GRP: W2, sparx5: is069 *   E-Tag group bits in 802.1BR Bridge Port Extension70 * VCAP_KF_8021BR_IGR_ECID_BASE: W12, sparx5: is071 *   Used by 802.1BR Bridge Port Extension in an E-Tag72 * VCAP_KF_8021BR_IGR_ECID_EXT: W8, sparx5: is073 *   Used by 802.1BR Bridge Port Extension in an E-Tag74 * VCAP_KF_8021CB_R_TAGGED_IS: W1, lan966x: is175 *   Set if frame contains an RTAG: IEEE 802.1CB (FRER Redundancy tag, Ethertype76 *   0xf1c1)77 * VCAP_KF_8021Q_DEI0: W1, sparx5: is0, lan966x: is178 *   First DEI in multiple vlan tags (outer tag or default port tag)79 * VCAP_KF_8021Q_DEI1: W1, sparx5: is0, lan966x: is180 *   Second DEI in multiple vlan tags (inner tag)81 * VCAP_KF_8021Q_DEI2: W1, sparx5: is082 *   Third DEI in multiple vlan tags (not always available)83 * VCAP_KF_8021Q_DEI_CLS: W1, sparx5: is2/es2, lan966x: is2/es084 *   Classified DEI85 * VCAP_KF_8021Q_PCP0: W3, sparx5: is0, lan966x: is186 *   First PCP in multiple vlan tags (outer tag or default port tag)87 * VCAP_KF_8021Q_PCP1: W3, sparx5: is0, lan966x: is188 *   Second PCP in multiple vlan tags (inner tag)89 * VCAP_KF_8021Q_PCP2: W3, sparx5: is090 *   Third PCP in multiple vlan tags (not always available)91 * VCAP_KF_8021Q_PCP_CLS: W3, sparx5: is2/es2, lan966x: is2/es092 *   Classified PCP93 * VCAP_KF_8021Q_TPID: W3, sparx5: es094 *   TPID for outer tag: 0: Customer TPID 1: Service TPID (88A8 or programmable)95 * VCAP_KF_8021Q_TPID0: sparx5 is0 W3, lan966x is1 W196 *   First TPIC in multiple vlan tags (outer tag or default port tag)97 * VCAP_KF_8021Q_TPID1: sparx5 is0 W3, lan966x is1 W198 *   Second TPID in multiple vlan tags (inner tag)99 * VCAP_KF_8021Q_TPID2: W3, sparx5: is0100 *   Third TPID in multiple vlan tags (not always available)101 * VCAP_KF_8021Q_VID0: W12, sparx5: is0, lan966x: is1102 *   First VID in multiple vlan tags (outer tag or default port tag)103 * VCAP_KF_8021Q_VID1: W12, sparx5: is0, lan966x: is1104 *   Second VID in multiple vlan tags (inner tag)105 * VCAP_KF_8021Q_VID2: W12, sparx5: is0106 *   Third VID in multiple vlan tags (not always available)107 * VCAP_KF_8021Q_VID_CLS: sparx5 is2 W13, sparx5 es0 W13, sparx5 es2 W13,108 *   lan966x is2 W12, lan966x es0 W12109 *   Classified VID110 * VCAP_KF_8021Q_VLAN_DBL_TAGGED_IS: W1, lan966x: is1111 *   Set if frame has two or more Q-tags. Independent of port VLAN awareness112 * VCAP_KF_8021Q_VLAN_TAGGED_IS: W1, sparx5: is2/es2, lan966x: is1/is2113 *   Sparx5: Set if frame was received with a VLAN tag, LAN966x: Set if frame has114 *   one or more Q-tags. Independent of port VLAN awareness115 * VCAP_KF_8021Q_VLAN_TAGS: W3, sparx5: is0116 *   Number of VLAN tags in frame: 0: Untagged, 1: Single tagged, 3: Double117 *   tagged, 7: Triple tagged118 * VCAP_KF_ACL_GRP_ID: W8, sparx5: es2119 *   Used in interface map table120 * VCAP_KF_ARP_ADDR_SPACE_OK_IS: W1, sparx5: is2/es2, lan966x: is2121 *   Set if hardware address is Ethernet122 * VCAP_KF_ARP_LEN_OK_IS: W1, sparx5: is2/es2, lan966x: is2123 *   Set if hardware address length = 6 (Ethernet) and IP address length = 4 (IP).124 * VCAP_KF_ARP_OPCODE: W2, sparx5: is2/es2, lan966x: is2125 *   ARP opcode126 * VCAP_KF_ARP_OPCODE_UNKNOWN_IS: W1, sparx5: is2/es2, lan966x: is2127 *   Set if not one of the codes defined in VCAP_KF_ARP_OPCODE128 * VCAP_KF_ARP_PROTO_SPACE_OK_IS: W1, sparx5: is2/es2, lan966x: is2129 *   Set if protocol address space is 0x0800130 * VCAP_KF_ARP_SENDER_MATCH_IS: W1, sparx5: is2/es2, lan966x: is2131 *   Sender Hardware Address = SMAC (ARP)132 * VCAP_KF_ARP_TGT_MATCH_IS: W1, sparx5: is2/es2, lan966x: is2133 *   Target Hardware Address = SMAC (RARP)134 * VCAP_KF_COSID_CLS: W3, sparx5: es0/es2135 *   Class of service136 * VCAP_KF_ES0_ISDX_KEY_ENA: W1, sparx5: es2137 *   The value taken from the IFH .FWD.ES0_ISDX_KEY_ENA138 * VCAP_KF_ETYPE: W16, sparx5: is0/is2/es2, lan966x: is1/is2139 *   Ethernet type140 * VCAP_KF_ETYPE_LEN_IS: W1, sparx5: is0/is2/es2, lan966x: is1141 *   Set if frame has EtherType >= 0x600142 * VCAP_KF_HOST_MATCH: W1, lan966x: is2143 *   The action from the SMAC_SIP4 or SMAC_SIP6 lookups. Used for IP source144 *   guarding.145 * VCAP_KF_IF_EGR_PORT_MASK: W32, sparx5: es2146 *   Egress port mask, one bit per port147 * VCAP_KF_IF_EGR_PORT_MASK_RNG: W3, sparx5: es2148 *   Select which 32 port group is available in IF_EGR_PORT (or virtual ports or149 *   CPU queue)150 * VCAP_KF_IF_EGR_PORT_NO: sparx5 es0 W7, lan966x es0 W4151 *   Egress port number152 * VCAP_KF_IF_IGR_PORT: sparx5 is0 W7, sparx5 es2 W9, lan966x is1 W3, lan966x153 *   is2 W4, lan966x es0 W4154 *   Sparx5: Logical ingress port number retrieved from155 *   ANA_CL::PORT_ID_CFG.LPORT_NUM or ERLEG, LAN966x: ingress port nunmber156 * VCAP_KF_IF_IGR_PORT_MASK: sparx5 is0 W65, sparx5 is2 W32, sparx5 is2 W65,157 *   lan966x is1 W9, lan966x is2 W9158 *   Ingress port mask, one bit per port/erleg159 * VCAP_KF_IF_IGR_PORT_MASK_L3: W1, sparx5: is2160 *   If set, IF_IGR_PORT_MASK, IF_IGR_PORT_MASK_RNG, and IF_IGR_PORT_MASK_SEL are161 *   used to specify L3 interfaces162 * VCAP_KF_IF_IGR_PORT_MASK_RNG: W4, sparx5: is2163 *   Range selector for IF_IGR_PORT_MASK.  Specifies which group of 32 ports are164 *   available in IF_IGR_PORT_MASK165 * VCAP_KF_IF_IGR_PORT_MASK_SEL: W2, sparx5: is0/is2166 *   Mode selector for IF_IGR_PORT_MASK, applicable when IF_IGR_PORT_MASK_L3 == 0.167 *   Mapping: 0: DEFAULT 1: LOOPBACK 2: MASQUERADE 3: CPU_VD168 * VCAP_KF_IF_IGR_PORT_SEL: W1, sparx5: es2169 *   Selector for IF_IGR_PORT: physical port number or ERLEG170 * VCAP_KF_IP4_IS: W1, sparx5: is0/is2/es2, lan966x: is1/is2171 *   Set if frame has EtherType = 0x800 and IP version = 4172 * VCAP_KF_IP_MC_IS: W1, sparx5: is0, lan966x: is1173 *   Set if frame is IPv4 frame and frame's destination MAC address is an IPv4174 *   multicast address (0x01005E0 /25). Set if frame is IPv6 frame and frame's175 *   destination MAC address is an IPv6 multicast address (0x3333/16).176 * VCAP_KF_IP_PAYLOAD_5TUPLE: W32, sparx5: is0, lan966x: is1177 *   Payload bytes after IP header178 * VCAP_KF_IP_PAYLOAD_S1_IP6: W112, lan966x: is1179 *   Payload after IPv6 header180 * VCAP_KF_IP_SNAP_IS: W1, sparx5: is0, lan966x: is1181 *   Set if frame is IPv4, IPv6, or SNAP frame182 * VCAP_KF_ISDX_CLS: sparx5 is2 W12, sparx5 es0 W12, sparx5 es2 W12, lan966x es0183 *   W8184 *   Classified ISDX185 * VCAP_KF_ISDX_GT0_IS: W1, sparx5: is2/es0/es2, lan966x: is2/es0186 *   Set if classified ISDX > 0187 * VCAP_KF_L2_BC_IS: W1, sparx5: is0/is2/es2, lan966x: is1/is2/es0188 *   Set if frame's destination MAC address is the broadcast address189 *   (FF-FF-FF-FF-FF-FF).190 * VCAP_KF_L2_DMAC: W48, sparx5: is0/is2/es2, lan966x: is1/is2191 *   Destination MAC address192 * VCAP_KF_L2_FRM_TYPE: W4, lan966x: is2193 *   Frame subtype for specific EtherTypes (MRP, DLR)194 * VCAP_KF_L2_FWD_IS: W1, sparx5: is2195 *   Set if the frame is allowed to be forwarded to front ports196 * VCAP_KF_L2_LLC: W40, lan966x: is2197 *   LLC header and data after up to two VLAN tags and the type/length field198 * VCAP_KF_L2_MAC: W48, lan966x: is1199 *   MAC address (FIRST=1: SMAC, FIRST=0: DMAC)200 * VCAP_KF_L2_MC_IS: W1, sparx5: is0/is2/es2, lan966x: is1/is2/es0201 *   Set if frame's destination MAC address is a multicast address (bit 40 = 1).202 * VCAP_KF_L2_PAYLOAD0: W16, lan966x: is2203 *   Payload bytes 0-1 after the frame's EtherType204 * VCAP_KF_L2_PAYLOAD1: W8, lan966x: is2205 *   Payload byte 4 after the frame's EtherType. This is specifically for PTP206 *   frames.207 * VCAP_KF_L2_PAYLOAD2: W3, lan966x: is2208 *   Bits 7, 2, and 1 from payload byte 6 after the frame's EtherType. This is209 *   specifically for PTP frames.210 * VCAP_KF_L2_PAYLOAD_ETYPE: W64, sparx5: is2/es2211 *   Byte 0-7 of L2 payload after Type/Len field and overloading for OAM212 * VCAP_KF_L2_SMAC: W48, sparx5: is0/is2/es2, lan966x: is1/is2213 *   Source MAC address214 * VCAP_KF_L2_SNAP: W40, lan966x: is2215 *   SNAP header after LLC header (AA-AA-03)216 * VCAP_KF_L3_DIP_EQ_SIP_IS: W1, sparx5: is2/es2, lan966x: is2217 *   Set if Src IP matches Dst IP address218 * VCAP_KF_L3_DPL_CLS: W1, sparx5: es0/es2, lan966x: es0219 *   The frames drop precedence level220 * VCAP_KF_L3_DSCP: W6, sparx5: is0, lan966x: is1221 *   Frame's DSCP value222 * VCAP_KF_L3_DST_IS: W1, sparx5: is2223 *   Set if lookup is done for egress router leg224 * VCAP_KF_L3_FRAGMENT: W1, lan966x: is1/is2225 *   Set if IPv4 frame is fragmented226 * VCAP_KF_L3_FRAGMENT_TYPE: W2, sparx5: is0/is2/es2227 *   L3 Fragmentation type (none, initial, suspicious, valid follow up)228 * VCAP_KF_L3_FRAG_INVLD_L4_LEN: W1, sparx5: is0/is2229 *   Set if frame's L4 length is less than ANA_CL:COMMON:CLM_FRAGMENT_CFG.L4_MIN_L230 *   EN231 * VCAP_KF_L3_FRAG_OFS_GT0: W1, lan966x: is1/is2232 *   Set if IPv4 frame is fragmented and it is not the first fragment233 * VCAP_KF_L3_IP4_DIP: W32, sparx5: is0/is2/es2, lan966x: is1/is2234 *   Destination IPv4 Address235 * VCAP_KF_L3_IP4_SIP: W32, sparx5: is0/is2/es2, lan966x: is1/is2236 *   Source IPv4 Address237 * VCAP_KF_L3_IP6_DIP: sparx5 is0 W128, sparx5 is2 W128, sparx5 es2 W128,238 *   lan966x is1 W64, lan966x is1 W128, lan966x is2 W128239 *   Sparx5: Full IPv6 DIP, LAN966x: Either Full IPv6 DIP or a subset depending on240 *   frame type241 * VCAP_KF_L3_IP6_DIP_MSB: W16, lan966x: is1242 *   MS 16bits of IPv6 DIP243 * VCAP_KF_L3_IP6_SIP: sparx5 is0 W128, sparx5 is2 W128, sparx5 es2 W128,244 *   lan966x is1 W128, lan966x is1 W64, lan966x is2 W128245 *   Sparx5: Full IPv6 SIP, LAN966x: Either Full IPv6 SIP or a subset depending on246 *   frame type247 * VCAP_KF_L3_IP6_SIP_MSB: W16, lan966x: is1248 *   MS 16bits of IPv6 DIP249 * VCAP_KF_L3_IP_PROTO: W8, sparx5: is0/is2/es2, lan966x: is1/is2250 *   IPv4 frames: IP protocol. IPv6 frames: Next header, same as for IPV4251 * VCAP_KF_L3_OPTIONS_IS: W1, sparx5: is0/is2/es2, lan966x: is1/is2252 *   Set if IPv4 frame contains options (IP len > 5)253 * VCAP_KF_L3_PAYLOAD: sparx5 is2 W96, sparx5 is2 W40, sparx5 es2 W96, sparx5254 *   es2 W40, lan966x is2 W56255 *   Sparx5: Payload bytes after IP header. IPv4: IPv4 options are not parsed so256 *   payload is always taken 20 bytes after the start of the IPv4 header, LAN966x:257 *   Bytes 0-6 after IP header258 * VCAP_KF_L3_RT_IS: W1, sparx5: is2/es2259 *   Set if frame has hit a router leg260 * VCAP_KF_L3_TOS: W8, sparx5: is2/es2, lan966x: is2261 *   Sparx5: Frame's IPv4/IPv6 DSCP and ECN fields, LAN966x: IP TOS field262 * VCAP_KF_L3_TTL_GT0: W1, sparx5: is2/es2, lan966x: is2263 *   Set if IPv4 TTL / IPv6 hop limit is greater than 0264 * VCAP_KF_L4_1588_DOM: W8, lan966x: is2265 *   PTP over UDP: domainNumber266 * VCAP_KF_L4_1588_VER: W4, lan966x: is2267 *   PTP over UDP: version268 * VCAP_KF_L4_ACK: W1, sparx5: is2/es2, lan966x: is2269 *   Sparx5 and LAN966x: TCP flag ACK, LAN966x only: PTP over UDP: flagField bit 2270 *   (unicastFlag)271 * VCAP_KF_L4_DPORT: W16, sparx5: is2/es2, lan966x: is2272 *   Sparx5: TCP/UDP destination port. Overloading for IP_7TUPLE: Non-TCP/UDP IP273 *   frames: L4_DPORT = L3_IP_PROTO, LAN966x: TCP/UDP destination port274 * VCAP_KF_L4_FIN: W1, sparx5: is2/es2, lan966x: is2275 *   TCP flag FIN, LAN966x: TCP flag FIN, and for PTP over UDP: messageType bit 1276 * VCAP_KF_L4_PAYLOAD: W64, sparx5: is2/es2277 *   Payload bytes after TCP/UDP header Overloading for IP_7TUPLE: Non TCP/UDP278 *   frames: Payload bytes 0-7 after IP header. IPv4 options are not parsed so279 *   payload is always taken 20 bytes after the start of the IPv4 header for non280 *   TCP/UDP IPv4 frames281 * VCAP_KF_L4_PSH: W1, sparx5: is2/es2, lan966x: is2282 *   Sparx5: TCP flag PSH, LAN966x: TCP: TCP flag PSH. PTP over UDP: flagField bit283 *   1 (twoStepFlag)284 * VCAP_KF_L4_RNG: sparx5 is0 W8, sparx5 is2 W16, sparx5 es2 W16, lan966x is1285 *   W8, lan966x is2 W8286 *   Range checker bitmask (one for each range checker). Input into range checkers287 *   is taken from classified results (VID, DSCP) and frame (SPORT, DPORT, ETYPE,288 *   outer VID, inner VID)289 * VCAP_KF_L4_RST: W1, sparx5: is2/es2, lan966x: is2290 *   Sparx5: TCP flag RST , LAN966x: TCP: TCP flag RST. PTP over UDP: messageType291 *   bit 3292 * VCAP_KF_L4_SEQUENCE_EQ0_IS: W1, sparx5: is2/es2, lan966x: is2293 *   Set if TCP sequence number is 0, LAN966x: Overlaid with PTP over UDP:294 *   messageType bit 0295 * VCAP_KF_L4_SPORT: W16, sparx5: is0/is2/es2, lan966x: is1/is2296 *   TCP/UDP source port297 * VCAP_KF_L4_SPORT_EQ_DPORT_IS: W1, sparx5: is2/es2, lan966x: is2298 *   Set if UDP or TCP source port equals UDP or TCP destination port299 * VCAP_KF_L4_SYN: W1, sparx5: is2/es2, lan966x: is2300 *   Sparx5: TCP flag SYN, LAN966x: TCP: TCP flag SYN. PTP over UDP: messageType301 *   bit 2302 * VCAP_KF_L4_URG: W1, sparx5: is2/es2, lan966x: is2303 *   Sparx5: TCP flag URG, LAN966x: TCP: TCP flag URG. PTP over UDP: flagField bit304 *   7 (reserved)305 * VCAP_KF_LOOKUP_FIRST_IS: W1, sparx5: is0/is2/es2, lan966x: is1/is2306 *   Selects between entries relevant for first and second lookup. Set for first307 *   lookup, cleared for second lookup.308 * VCAP_KF_LOOKUP_GEN_IDX: W12, sparx5: is0309 *   Generic index - for chaining CLM instances310 * VCAP_KF_LOOKUP_GEN_IDX_SEL: W2, sparx5: is0311 *   Select the mode of the Generic Index312 * VCAP_KF_LOOKUP_INDEX: W2, lan966x: is1313 *   0: First lookup, 1: Second lookup, 2: Third lookup, Similar to VCAP_KF_FIRST314 *   but with extra info315 * VCAP_KF_LOOKUP_PAG: W8, sparx5: is2, lan966x: is2316 *   Classified Policy Association Group: chains rules from IS1/CLM to IS2317 * VCAP_KF_MIRROR_PROBE: W2, sparx5: es2318 *   Identifies frame copies generated as a result of mirroring319 * VCAP_KF_OAM_CCM_CNTS_EQ0: W1, sparx5: is2/es2, lan966x: is2320 *   Dual-ended loss measurement counters in CCM frames are all zero321 * VCAP_KF_OAM_DETECTED: W1, lan966x: is2322 *   This is missing in the datasheet, but present in the OAM keyset in XML323 * VCAP_KF_OAM_FLAGS: W8, lan966x: is2324 *   Frame's OAM flags325 * VCAP_KF_OAM_MEL_FLAGS: W7, lan966x: is2326 *   Encoding of MD level/MEG level (MEL)327 * VCAP_KF_OAM_MEPID: W16, lan966x: is2328 *   CCM frame's OAM MEP ID329 * VCAP_KF_OAM_OPCODE: W8, lan966x: is2330 *   Frame's OAM opcode331 * VCAP_KF_OAM_VER: W5, lan966x: is2332 *   Frame's OAM version333 * VCAP_KF_OAM_Y1731_IS: W1, sparx5: is2/es2, lan966x: is2334 *   Set if frame's EtherType = 0x8902335 * VCAP_KF_PDU_TYPE: W4, lan966x: es0336 *   PDU type value (none, OAM CCM, MRP, DLR, RTE, IPv4, IPv6, OAM non-CCM)337 * VCAP_KF_PROT_ACTIVE: W1, sparx5: es0/es2338 *   Protection is active339 * VCAP_KF_RTP_ID: W10, lan966x: es0340 *   Classified RTP_ID341 * VCAP_KF_RT_FRMID: W32, lan966x: is1342 *   Profinet or OPC-UA FrameId343 * VCAP_KF_RT_TYPE: W2, lan966x: is1344 *   Encoding of frame's EtherType: 0: Other, 1: Profinet, 2: OPC-UA, 3: Custom345 *   (ANA::RT_CUSTOM)346 * VCAP_KF_RT_VLAN_IDX: W3, lan966x: is1347 *   Real-time VLAN index from ANA::RT_VLAN_PCP348 * VCAP_KF_TCP_IS: W1, sparx5: is0/is2/es2, lan966x: is1/is2349 *   Set if frame is IPv4 TCP frame (IP protocol = 6) or IPv6 TCP frames (Next350 *   header = 6)351 * VCAP_KF_TCP_UDP_IS: W1, sparx5: is0/is2/es2, lan966x: is1352 *   Set if frame is IPv4/IPv6 TCP or UDP frame (IP protocol/next header equals 6353 *   or 17)354 * VCAP_KF_TYPE: sparx5 is0 W2, sparx5 is0 W1, sparx5 is2 W4, sparx5 is2 W2,355 *   sparx5 es0 W1, sparx5 es2 W3, lan966x is1 W1, lan966x is1 W2, lan966x is2 W4,356 *   lan966x is2 W2357 *   Keyset type id - set by the API358 */359 360/* Keyfield names */361enum vcap_key_field {362	VCAP_KF_NO_VALUE,  /* initial value */363	VCAP_KF_8021BR_ECID_BASE,364	VCAP_KF_8021BR_ECID_EXT,365	VCAP_KF_8021BR_E_TAGGED,366	VCAP_KF_8021BR_GRP,367	VCAP_KF_8021BR_IGR_ECID_BASE,368	VCAP_KF_8021BR_IGR_ECID_EXT,369	VCAP_KF_8021CB_R_TAGGED_IS,370	VCAP_KF_8021Q_DEI0,371	VCAP_KF_8021Q_DEI1,372	VCAP_KF_8021Q_DEI2,373	VCAP_KF_8021Q_DEI_CLS,374	VCAP_KF_8021Q_PCP0,375	VCAP_KF_8021Q_PCP1,376	VCAP_KF_8021Q_PCP2,377	VCAP_KF_8021Q_PCP_CLS,378	VCAP_KF_8021Q_TPID,379	VCAP_KF_8021Q_TPID0,380	VCAP_KF_8021Q_TPID1,381	VCAP_KF_8021Q_TPID2,382	VCAP_KF_8021Q_VID0,383	VCAP_KF_8021Q_VID1,384	VCAP_KF_8021Q_VID2,385	VCAP_KF_8021Q_VID_CLS,386	VCAP_KF_8021Q_VLAN_DBL_TAGGED_IS,387	VCAP_KF_8021Q_VLAN_TAGGED_IS,388	VCAP_KF_8021Q_VLAN_TAGS,389	VCAP_KF_ACL_GRP_ID,390	VCAP_KF_ARP_ADDR_SPACE_OK_IS,391	VCAP_KF_ARP_LEN_OK_IS,392	VCAP_KF_ARP_OPCODE,393	VCAP_KF_ARP_OPCODE_UNKNOWN_IS,394	VCAP_KF_ARP_PROTO_SPACE_OK_IS,395	VCAP_KF_ARP_SENDER_MATCH_IS,396	VCAP_KF_ARP_TGT_MATCH_IS,397	VCAP_KF_COSID_CLS,398	VCAP_KF_ES0_ISDX_KEY_ENA,399	VCAP_KF_ETYPE,400	VCAP_KF_ETYPE_LEN_IS,401	VCAP_KF_HOST_MATCH,402	VCAP_KF_IF_EGR_PORT_MASK,403	VCAP_KF_IF_EGR_PORT_MASK_RNG,404	VCAP_KF_IF_EGR_PORT_NO,405	VCAP_KF_IF_IGR_PORT,406	VCAP_KF_IF_IGR_PORT_MASK,407	VCAP_KF_IF_IGR_PORT_MASK_L3,408	VCAP_KF_IF_IGR_PORT_MASK_RNG,409	VCAP_KF_IF_IGR_PORT_MASK_SEL,410	VCAP_KF_IF_IGR_PORT_SEL,411	VCAP_KF_IP4_IS,412	VCAP_KF_IP_MC_IS,413	VCAP_KF_IP_PAYLOAD_5TUPLE,414	VCAP_KF_IP_PAYLOAD_S1_IP6,415	VCAP_KF_IP_SNAP_IS,416	VCAP_KF_ISDX_CLS,417	VCAP_KF_ISDX_GT0_IS,418	VCAP_KF_L2_BC_IS,419	VCAP_KF_L2_DMAC,420	VCAP_KF_L2_FRM_TYPE,421	VCAP_KF_L2_FWD_IS,422	VCAP_KF_L2_LLC,423	VCAP_KF_L2_MAC,424	VCAP_KF_L2_MC_IS,425	VCAP_KF_L2_PAYLOAD0,426	VCAP_KF_L2_PAYLOAD1,427	VCAP_KF_L2_PAYLOAD2,428	VCAP_KF_L2_PAYLOAD_ETYPE,429	VCAP_KF_L2_SMAC,430	VCAP_KF_L2_SNAP,431	VCAP_KF_L3_DIP_EQ_SIP_IS,432	VCAP_KF_L3_DPL_CLS,433	VCAP_KF_L3_DSCP,434	VCAP_KF_L3_DST_IS,435	VCAP_KF_L3_FRAGMENT,436	VCAP_KF_L3_FRAGMENT_TYPE,437	VCAP_KF_L3_FRAG_INVLD_L4_LEN,438	VCAP_KF_L3_FRAG_OFS_GT0,439	VCAP_KF_L3_IP4_DIP,440	VCAP_KF_L3_IP4_SIP,441	VCAP_KF_L3_IP6_DIP,442	VCAP_KF_L3_IP6_DIP_MSB,443	VCAP_KF_L3_IP6_SIP,444	VCAP_KF_L3_IP6_SIP_MSB,445	VCAP_KF_L3_IP_PROTO,446	VCAP_KF_L3_OPTIONS_IS,447	VCAP_KF_L3_PAYLOAD,448	VCAP_KF_L3_RT_IS,449	VCAP_KF_L3_TOS,450	VCAP_KF_L3_TTL_GT0,451	VCAP_KF_L4_1588_DOM,452	VCAP_KF_L4_1588_VER,453	VCAP_KF_L4_ACK,454	VCAP_KF_L4_DPORT,455	VCAP_KF_L4_FIN,456	VCAP_KF_L4_PAYLOAD,457	VCAP_KF_L4_PSH,458	VCAP_KF_L4_RNG,459	VCAP_KF_L4_RST,460	VCAP_KF_L4_SEQUENCE_EQ0_IS,461	VCAP_KF_L4_SPORT,462	VCAP_KF_L4_SPORT_EQ_DPORT_IS,463	VCAP_KF_L4_SYN,464	VCAP_KF_L4_URG,465	VCAP_KF_LOOKUP_FIRST_IS,466	VCAP_KF_LOOKUP_GEN_IDX,467	VCAP_KF_LOOKUP_GEN_IDX_SEL,468	VCAP_KF_LOOKUP_INDEX,469	VCAP_KF_LOOKUP_PAG,470	VCAP_KF_MIRROR_PROBE,471	VCAP_KF_OAM_CCM_CNTS_EQ0,472	VCAP_KF_OAM_DETECTED,473	VCAP_KF_OAM_FLAGS,474	VCAP_KF_OAM_MEL_FLAGS,475	VCAP_KF_OAM_MEPID,476	VCAP_KF_OAM_OPCODE,477	VCAP_KF_OAM_VER,478	VCAP_KF_OAM_Y1731_IS,479	VCAP_KF_PDU_TYPE,480	VCAP_KF_PROT_ACTIVE,481	VCAP_KF_RTP_ID,482	VCAP_KF_RT_FRMID,483	VCAP_KF_RT_TYPE,484	VCAP_KF_RT_VLAN_IDX,485	VCAP_KF_TCP_IS,486	VCAP_KF_TCP_UDP_IS,487	VCAP_KF_TYPE,488};489 490/* Actionset names with origin information */491enum vcap_actionfield_set {492	VCAP_AFS_NO_VALUE,          /* initial value */493	VCAP_AFS_BASE_TYPE,         /* sparx5 is2 X3, sparx5 es2 X3, lan966x is2 X2 */494	VCAP_AFS_CLASSIFICATION,    /* sparx5 is0 X2 */495	VCAP_AFS_CLASS_REDUCED,     /* sparx5 is0 X1 */496	VCAP_AFS_ES0,               /* sparx5 es0 X1 */497	VCAP_AFS_FULL,              /* sparx5 is0 X3 */498	VCAP_AFS_S1,                /* lan966x is1 X1 */499	VCAP_AFS_SMAC_SIP,          /* lan966x is2 X1 */500	VCAP_AFS_VID,               /* lan966x es0 X1 */501};502 503/* List of actionfields with description504 *505 * VCAP_AF_ACL_ID: W6, lan966x: is2506 *   Logical ID for the entry. This ID is extracted together with the frame in the507 *   CPU extraction header. Only applicable to actions with CPU_COPY_ENA or508 *   HIT_ME_ONCE set.509 * VCAP_AF_CLS_VID_SEL: W3, sparx5: is0510 *   Controls the classified VID: 0: VID_NONE: No action. 1: VID_ADD: New VID =511 *   old VID + VID_VAL. 2: VID_REPLACE: New VID = VID_VAL. 3: VID_FIRST_TAG: New512 *   VID = VID from frame's first tag (outer tag) if available, otherwise VID_VAL.513 *   4: VID_SECOND_TAG: New VID = VID from frame's second tag (middle tag) if514 *   available, otherwise VID_VAL. 5: VID_THIRD_TAG: New VID = VID from frame's515 *   third tag (inner tag) if available, otherwise VID_VAL.516 * VCAP_AF_CNT_ID: sparx5 is2 W12, sparx5 es2 W11517 *   Counter ID, used per lookup to index the 4K frame counters (ANA_ACL:CNT_TBL).518 *   Multiple VCAP IS2 entries can use the same counter.519 * VCAP_AF_COPY_PORT_NUM: W7, sparx5: es2520 *   QSYS port number when FWD_MODE is redirect or copy521 * VCAP_AF_COPY_QUEUE_NUM: W16, sparx5: es2522 *   QSYS queue number when FWD_MODE is redirect or copy523 * VCAP_AF_CPU_COPY_ENA: W1, sparx5: is2/es2, lan966x: is2524 *   Setting this bit to 1 causes all frames that hit this action to be copied to525 *   the CPU extraction queue specified in CPU_QUEUE_NUM.526 * VCAP_AF_CPU_QU: W3, sparx5: es0527 *   CPU extraction queue. Used when FWD_SEL >0 and PIPELINE_ACT = XTR.528 * VCAP_AF_CPU_QUEUE_NUM: W3, sparx5: is2/es2, lan966x: is2529 *   CPU queue number. Used when CPU_COPY_ENA is set.530 * VCAP_AF_CUSTOM_ACE_TYPE_ENA: W4, lan966x: is1531 *   Enables use of custom keys in IS2. Bits 3:2 control second lookup in IS2532 *   while bits 1:0 control first lookup. Encoding per lookup: 0: Disabled.  1:533 *   Extract 40 bytes after position corresponding to the location of the IPv4534 *   header and use as key.  2: Extract 40 bytes after SMAC and use as key535 * VCAP_AF_DEI_A_VAL: W1, sparx5: es0, lan966x: es0536 *   DEI used in ES0 tag A. See TAG_A_DEI_SEL.537 * VCAP_AF_DEI_B_VAL: W1, sparx5: es0, lan966x: es0538 *   DEI used in ES0 tag B. See TAG_B_DEI_SEL.539 * VCAP_AF_DEI_C_VAL: W1, sparx5: es0540 *   DEI used in ES0 tag C. See TAG_C_DEI_SEL.541 * VCAP_AF_DEI_ENA: W1, sparx5: is0, lan966x: is1542 *   If set, use DEI_VAL as classified DEI value. Otherwise, DEI from basic543 *   classification is used544 * VCAP_AF_DEI_VAL: W1, sparx5: is0, lan966x: is1545 *   See DEI_ENA546 * VCAP_AF_DLR_SEL: W2, lan966x: is1547 *   0: No changes to port-based selection in ANA:PORT:OAM_CFG.DLR_ENA.  1: Enable548 *   DLR frame processing 2: Disable DLR processing549 * VCAP_AF_DP_ENA: W1, sparx5: is0, lan966x: is1550 *   If set, use DP_VAL as classified drop precedence level. Otherwise, drop551 *   precedence level from basic classification is used.552 * VCAP_AF_DP_VAL: sparx5 is0 W2, lan966x is1 W1553 *   See DP_ENA.554 * VCAP_AF_DSCP_ENA: W1, sparx5: is0, lan966x: is1555 *   If set, use DSCP_VAL as classified DSCP value. Otherwise, DSCP value from556 *   basic classification is used.557 * VCAP_AF_DSCP_SEL: W3, sparx5: es0558 *   Selects source for DSCP. 0: Controlled by port configuration and IFH. 1:559 *   Classified DSCP via IFH. 2: DSCP_VAL. 3: Reserved. 4: Mapped using mapping560 *   table 0, otherwise use DSCP_VAL. 5: Mapped using mapping table 1, otherwise561 *   use mapping table 0. 6: Mapped using mapping table 2, otherwise use DSCP_VAL.562 *   7: Mapped using mapping table 3, otherwise use mapping table 2563 * VCAP_AF_DSCP_VAL: W6, sparx5: is0/es0, lan966x: is1564 *   See DSCP_ENA.565 * VCAP_AF_ES2_REW_CMD: W3, sparx5: es2566 *   Command forwarded to REW: 0: No action. 1: SWAP MAC addresses. 2: Do L2CP567 *   DMAC translation when entering or leaving a tunnel.568 * VCAP_AF_ESDX: sparx5 es0 W13, lan966x es0 W8569 *   Egress counter index. Used to index egress counter set as defined in570 *   REW::STAT_CFG.571 * VCAP_AF_FWD_KILL_ENA: W1, lan966x: is2572 *   Setting this bit to 1 denies forwarding of the frame forwarding to any front573 *   port. The frame can still be copied to the CPU by other actions.574 * VCAP_AF_FWD_MODE: W2, sparx5: es2575 *   Forward selector: 0: Forward. 1: Discard. 2: Redirect. 3: Copy.576 * VCAP_AF_FWD_SEL: W2, sparx5: es0577 *   ES0 Forward selector. 0: No action. 1: Copy to loopback interface. 2:578 *   Redirect to loopback interface. 3: Discard579 * VCAP_AF_HIT_ME_ONCE: W1, sparx5: is2/es2, lan966x: is2580 *   Setting this bit to 1 causes the first frame that hits this action where the581 *   HIT_CNT counter is zero to be copied to the CPU extraction queue specified in582 *   CPU_QUEUE_NUM. The HIT_CNT counter is then incremented and any frames that583 *   hit this action later are not copied to the CPU. To re-enable the HIT_ME_ONCE584 *   functionality, the HIT_CNT counter must be cleared.585 * VCAP_AF_HOST_MATCH: W1, lan966x: is2586 *   Used for IP source guarding. If set, it signals that the host is a valid (for587 *   instance a valid combination of source MAC address and source IP address).588 *   HOST_MATCH is input to the IS2 keys.589 * VCAP_AF_IGNORE_PIPELINE_CTRL: W1, sparx5: is2/es2590 *   Ignore ingress pipeline control. This enforces the use of the VCAP IS2 action591 *   even when the pipeline control has terminated the frame before VCAP IS2.592 * VCAP_AF_INTR_ENA: W1, sparx5: is2/es2593 *   If set, an interrupt is triggered when this rule is hit594 * VCAP_AF_ISDX_ADD_REPLACE_SEL: W1, sparx5: is0595 *   Controls the classified ISDX. 0: New ISDX = old ISDX + ISDX_VAL. 1: New ISDX596 *   = ISDX_VAL.597 * VCAP_AF_ISDX_ADD_VAL: W8, lan966x: is1598 *   If ISDX_REPLACE_ENA is set, ISDX_ADD_VAL is used directly as the new ISDX.599 *   Encoding: ISDX_REPLACE_ENA=0, ISDX_ADD_VAL=0: Disabled ISDX_EPLACE_ENA=0,600 *   ISDX_ADD_VAL>0: Add value to classified ISDX. ISDX_REPLACE_ENA=1: Replace601 *   with ISDX_ADD_VAL value.602 * VCAP_AF_ISDX_ENA: W1, lan966x: is2603 *   Setting this bit to 1 causes the classified ISDX to be set to the value of604 *   POLICE_IDX[8:0].605 * VCAP_AF_ISDX_REPLACE_ENA: W1, lan966x: is1606 *   If set, classified ISDX is set to ISDX_ADD_VAL.607 * VCAP_AF_ISDX_VAL: W12, sparx5: is0608 *   See isdx_add_replace_sel609 * VCAP_AF_LOOP_ENA: W1, sparx5: es0610 *   0: Forward based on PIPELINE_PT and FWD_SEL611 * VCAP_AF_LRN_DIS: W1, sparx5: is2, lan966x: is2612 *   Setting this bit to 1 disables learning of frames hitting this action.613 * VCAP_AF_MAP_IDX: W9, sparx5: is0614 *   Index for QoS mapping table lookup615 * VCAP_AF_MAP_KEY: W3, sparx5: is0616 *   Key type for QoS mapping table lookup. 0: DEI0, PCP0 (outer tag). 1: DEI1,617 *   PCP1 (middle tag). 2: DEI2, PCP2 (inner tag). 3: MPLS TC. 4: PCP0 (outer618 *   tag). 5: E-DEI, E-PCP (E-TAG). 6: DSCP if available, otherwise none. 7: DSCP619 *   if available, otherwise DEI0, PCP0 (outer tag) if available using MAP_IDX+8,620 *   otherwise none621 * VCAP_AF_MAP_LOOKUP_SEL: W2, sparx5: is0622 *   Selects which of the two QoS Mapping Table lookups that MAP_KEY and MAP_IDX623 *   are applied to. 0: No changes to the QoS Mapping Table lookup. 1: Update key624 *   type and index for QoS Mapping Table lookup #0. 2: Update key type and index625 *   for QoS Mapping Table lookup #1. 3: Reserved.626 * VCAP_AF_MASK_MODE: sparx5 is0 W3, sparx5 is2 W3, lan966x is2 W2627 *   Controls the PORT_MASK use. Sparx5: 0: OR_DSTMASK, 1: AND_VLANMASK, 2:628 *   REPLACE_PGID, 3: REPLACE_ALL, 4: REDIR_PGID, 5: OR_PGID_MASK, 6: VSTAX, 7:629 *   Not applicable. LAN966X: 0: No action, 1: Permit/deny (AND), 2: Policy630 *   forwarding (DMAC lookup), 3: Redirect. The CPU port is untouched by631 *   MASK_MODE.632 * VCAP_AF_MATCH_ID: W16, sparx5: is2633 *   Logical ID for the entry. The MATCH_ID is extracted together with the frame634 *   if the frame is forwarded to the CPU (CPU_COPY_ENA). The result is placed in635 *   IFH.CL_RSLT.636 * VCAP_AF_MATCH_ID_MASK: W16, sparx5: is2637 *   Mask used by MATCH_ID.638 * VCAP_AF_MIRROR_ENA: W1, lan966x: is2639 *   Setting this bit to 1 causes frames to be mirrored to the mirror target port640 *   (ANA::MIRRPORPORTS).641 * VCAP_AF_MIRROR_PROBE: W2, sparx5: is2642 *   Mirroring performed according to configuration of a mirror probe. 0: No643 *   mirroring. 1: Mirror probe 0. 2: Mirror probe 1. 3: Mirror probe 2644 * VCAP_AF_MIRROR_PROBE_ID: W2, sparx5: es2645 *   Signals a mirror probe to be placed in the IFH. Only possible when FWD_MODE646 *   is copy. 0: No mirroring. 1-3: Use mirror probe 0-2.647 * VCAP_AF_MRP_SEL: W2, lan966x: is1648 *   0: No changes to port-based selection in ANA:PORT:OAM_CFG.MRP_ENA.  1: Enable649 *   MRP frame processing 2: Disable MRP processing650 * VCAP_AF_NXT_IDX: W12, sparx5: is0651 *   Index used as part of key (field G_IDX) in the next lookup.652 * VCAP_AF_NXT_IDX_CTRL: W3, sparx5: is0653 *   Controls the generation of the G_IDX used in the VCAP CLM next lookup654 * VCAP_AF_OAM_SEL: W3, lan966x: is1655 *   0: No changes to port-based selection in ANA:PORT:OAM_CFG.OAM_CFG 1: Enable656 *   OAM frame processing for untagged frames 2: Enable OAM frame processing for657 *   single frames 3: Enable OAM frame processing for double frames 4: Disable OAM658 *   frame processing659 * VCAP_AF_PAG_OVERRIDE_MASK: W8, sparx5: is0, lan966x: is1660 *   Bits set in this mask will override PAG_VAL from port profile. New PAG = (PAG661 *   (input) AND ~PAG_OVERRIDE_MASK) OR (PAG_VAL AND PAG_OVERRIDE_MASK)662 * VCAP_AF_PAG_VAL: W8, sparx5: is0, lan966x: is1663 *   See PAG_OVERRIDE_MASK.664 * VCAP_AF_PCP_A_VAL: W3, sparx5: es0, lan966x: es0665 *   PCP used in ES0 tag A. See TAG_A_PCP_SEL.666 * VCAP_AF_PCP_B_VAL: W3, sparx5: es0, lan966x: es0667 *   PCP used in ES0 tag B. See TAG_B_PCP_SEL.668 * VCAP_AF_PCP_C_VAL: W3, sparx5: es0669 *   PCP used in ES0 tag C. See TAG_C_PCP_SEL.670 * VCAP_AF_PCP_ENA: W1, sparx5: is0, lan966x: is1671 *   If set, use PCP_VAL as classified PCP value. Otherwise, PCP from basic672 *   classification is used.673 * VCAP_AF_PCP_VAL: W3, sparx5: is0, lan966x: is1674 *   See PCP_ENA.675 * VCAP_AF_PIPELINE_ACT: W1, sparx5: es0676 *   Pipeline action when FWD_SEL > 0. 0: XTR. CPU_QU selects CPU extraction queue677 *   1: LBK_ASM.678 * VCAP_AF_PIPELINE_FORCE_ENA: W1, sparx5: is2679 *   If set, use PIPELINE_PT unconditionally and set PIPELINE_ACT = NONE if680 *   PIPELINE_PT == NONE. Overrules previous settings of pipeline point.681 * VCAP_AF_PIPELINE_PT: sparx5 is2 W5, sparx5 es0 W2682 *   Pipeline point used if PIPELINE_FORCE_ENA is set683 * VCAP_AF_POLICE_ENA: W1, sparx5: is2/es2, lan966x: is1/is2684 *   If set, POLICE_IDX is used to lookup ANA::POL.685 * VCAP_AF_POLICE_IDX: sparx5 is2 W6, sparx5 es2 W6, lan966x is1 W9, lan966x is2686 *   W9687 *   Policer index.688 * VCAP_AF_POLICE_REMARK: W1, sparx5: es2689 *   If set, frames exceeding policer rates are marked as yellow but not690 *   discarded.691 * VCAP_AF_POLICE_VCAP_ONLY: W1, lan966x: is2692 *   Disable policing from QoS, and port policers. Only the VCAP policer selected693 *   by POLICE_IDX is active. Only applies to the second lookup.694 * VCAP_AF_POP_VAL: W2, sparx5: es0695 *   Controls popping of Q-tags. The final number of Q-tags popped is calculated696 *   as shown in section 4.28.7.2 VLAN Pop Decision.697 * VCAP_AF_PORT_MASK: sparx5 is0 W65, sparx5 is2 W68, lan966x is2 W8698 *   Port mask applied to the forwarding decision based on MASK_MODE.699 * VCAP_AF_PUSH_CUSTOMER_TAG: W2, sparx5: es0700 *   Selects tag C mode: 0: Do not push tag C. 1: Push tag C if701 *   IFH.VSTAX.TAG.WAS_TAGGED = 1. 2: Push tag C if IFH.VSTAX.TAG.WAS_TAGGED = 0.702 *   3: Push tag C if UNTAG_VID_ENA = 0 or (C-TAG.VID ! = VID_C_VAL).703 * VCAP_AF_PUSH_INNER_TAG: W1, sparx5: es0, lan966x: es0704 *   Controls inner tagging. 0: Do not push ES0 tag B as inner tag. 1: Push ES0705 *   tag B as inner tag.706 * VCAP_AF_PUSH_OUTER_TAG: W2, sparx5: es0, lan966x: es0707 *   Controls outer tagging. 0: No ES0 tag A: Port tag is allowed if enabled on708 *   port. 1: ES0 tag A: Push ES0 tag A. No port tag. 2: Force port tag: Always709 *   push port tag. No ES0 tag A. 3: Force untag: Never push port tag or ES0 tag710 *   A.711 * VCAP_AF_QOS_ENA: W1, sparx5: is0, lan966x: is1712 *   If set, use QOS_VAL as classified QoS class. Otherwise, QoS class from basic713 *   classification is used.714 * VCAP_AF_QOS_VAL: W3, sparx5: is0, lan966x: is1715 *   See QOS_ENA.716 * VCAP_AF_REW_OP: W16, lan966x: is2717 *   Rewriter operation command.718 * VCAP_AF_RT_DIS: W1, sparx5: is2719 *   If set, routing is disallowed. Only applies when IS_INNER_ACL is 0. See also720 *   IGR_ACL_ENA, EGR_ACL_ENA, and RLEG_STAT_IDX.721 * VCAP_AF_SFID_ENA: W1, lan966x: is1722 *   If set, SFID_VAL is used to lookup ANA::SFID.723 * VCAP_AF_SFID_VAL: W8, lan966x: is1724 *   Stream filter identifier.725 * VCAP_AF_SGID_ENA: W1, lan966x: is1726 *   If set, SGID_VAL is used to lookup ANA::SGID.727 * VCAP_AF_SGID_VAL: W8, lan966x: is1728 *   Stream gate identifier.729 * VCAP_AF_SWAP_MACS_ENA: W1, sparx5: es0730 *   This setting is only active when FWD_SEL = 1 or FWD_SEL = 2 and PIPELINE_ACT731 *   = LBK_ASM. 0: No action. 1: Swap MACs and clear bit 40 in new SMAC.732 * VCAP_AF_TAG_A_DEI_SEL: sparx5 es0 W3, lan966x es0 W2733 *   Selects PCP for ES0 tag A. 0: Classified DEI. 1: DEI_A_VAL. 2: DP and QoS734 *   mapped to PCP (per port table). 3: DP.735 * VCAP_AF_TAG_A_PCP_SEL: sparx5 es0 W3, lan966x es0 W2736 *   Selects PCP for ES0 tag A. 0: Classified PCP. 1: PCP_A_VAL. 2: DP and QoS737 *   mapped to PCP (per port table). 3: QoS class.738 * VCAP_AF_TAG_A_TPID_SEL: sparx5 es0 W3, lan966x es0 W2739 *   Selects TPID for ES0 tag A: 0: 0x8100. 1: 0x88A8. 2: Custom740 *   (REW:PORT:PORT_VLAN_CFG.PORT_TPID). 3: If IFH.TAG_TYPE = 0 then 0x8100 else741 *   custom.742 * VCAP_AF_TAG_A_VID_SEL: sparx5 es0 W2, lan966x es0 W1743 *   Selects VID for ES0 tag A. 0: Classified VID + VID_A_VAL. 1: VID_A_VAL.744 * VCAP_AF_TAG_B_DEI_SEL: sparx5 es0 W3, lan966x es0 W2745 *   Selects PCP for ES0 tag B. 0: Classified DEI. 1: DEI_B_VAL. 2: DP and QoS746 *   mapped to PCP (per port table). 3: DP.747 * VCAP_AF_TAG_B_PCP_SEL: sparx5 es0 W3, lan966x es0 W2748 *   Selects PCP for ES0 tag B. 0: Classified PCP. 1: PCP_B_VAL. 2: DP and QoS749 *   mapped to PCP (per port table). 3: QoS class.750 * VCAP_AF_TAG_B_TPID_SEL: sparx5 es0 W3, lan966x es0 W2751 *   Selects TPID for ES0 tag B. 0: 0x8100. 1: 0x88A8. 2: Custom752 *   (REW:PORT:PORT_VLAN_CFG.PORT_TPID). 3: If IFH.TAG_TYPE = 0 then 0x8100 else753 *   custom.754 * VCAP_AF_TAG_B_VID_SEL: sparx5 es0 W2, lan966x es0 W1755 *   Selects VID for ES0 tag B. 0: Classified VID + VID_B_VAL. 1: VID_B_VAL.756 * VCAP_AF_TAG_C_DEI_SEL: W3, sparx5: es0757 *   Selects DEI source for ES0 tag C. 0: Classified DEI. 1: DEI_C_VAL. 2:758 *   REW::DP_MAP.DP [IFH.VSTAX.QOS.DP]. 3: DEI of popped VLAN tag if available759 *   (IFH.VSTAX.TAG.WAS_TAGGED = 1 and tot_pop_cnt>0) else DEI_C_VAL. 4: Mapped760 *   using mapping table 0, otherwise use DEI_C_VAL. 5: Mapped using mapping table761 *   1, otherwise use mapping table 0. 6: Mapped using mapping table 2, otherwise762 *   use DEI_C_VAL. 7: Mapped using mapping table 3, otherwise use mapping table763 *   2.764 * VCAP_AF_TAG_C_PCP_SEL: W3, sparx5: es0765 *   Selects PCP source for ES0 tag C. 0: Classified PCP. 1: PCP_C_VAL. 2:766 *   Reserved. 3: PCP of popped VLAN tag if available (IFH.VSTAX.TAG.WAS_TAGGED=1767 *   and tot_pop_cnt>0) else PCP_C_VAL. 4: Mapped using mapping table 0, otherwise768 *   use PCP_C_VAL. 5: Mapped using mapping table 1, otherwise use mapping table769 *   0. 6: Mapped using mapping table 2, otherwise use PCP_C_VAL. 7: Mapped using770 *   mapping table 3, otherwise use mapping table 2.771 * VCAP_AF_TAG_C_TPID_SEL: W3, sparx5: es0772 *   Selects TPID for ES0 tag C. 0: 0x8100. 1: 0x88A8. 2: Custom 1. 3: Custom 2.773 *   4: Custom 3. 5: See TAG_A_TPID_SEL.774 * VCAP_AF_TAG_C_VID_SEL: W2, sparx5: es0775 *   Selects VID for ES0 tag C. The resulting VID is termed C-TAG.VID. 0:776 *   Classified VID. 1: VID_C_VAL. 2: IFH.ENCAP.GVID. 3: Reserved.777 * VCAP_AF_TYPE: W1, sparx5: is0, lan966x: is1778 *   Actionset type id - Set by the API779 * VCAP_AF_UNTAG_VID_ENA: W1, sparx5: es0780 *   Controls insertion of tag C. Untag or insert mode can be selected. See781 *   PUSH_CUSTOMER_TAG.782 * VCAP_AF_VID_A_VAL: W12, sparx5: es0, lan966x: es0783 *   VID used in ES0 tag A. See TAG_A_VID_SEL.784 * VCAP_AF_VID_B_VAL: W12, sparx5: es0, lan966x: es0785 *   VID used in ES0 tag B. See TAG_B_VID_SEL.786 * VCAP_AF_VID_C_VAL: W12, sparx5: es0787 *   VID used in ES0 tag C. See TAG_C_VID_SEL.788 * VCAP_AF_VID_REPLACE_ENA: W1, lan966x: is1789 *   Controls the classified VID: VID_REPLACE_ENA=0: Add VID_ADD_VAL to basic790 *   classified VID and use result as new classified VID. VID_REPLACE_ENA = 1:791 *   Replace basic classified VID with VID_VAL value and use as new classified792 *   VID.793 * VCAP_AF_VID_VAL: sparx5 is0 W13, lan966x is1 W12794 *   New VID Value795 * VCAP_AF_VLAN_POP_CNT: W2, lan966x: is1796 *   See VLAN_POP_CNT_ENA797 * VCAP_AF_VLAN_POP_CNT_ENA: W1, lan966x: is1798 *   If set, use VLAN_POP_CNT as the number of VLAN tags to pop from the incoming799 *   frame. This number is used by the Rewriter. Otherwise, VLAN_POP_CNT from800 *   ANA:PORT:VLAN_CFG.VLAN_POP_CNT is used801 */802 803/* Actionfield names */804enum vcap_action_field {805	VCAP_AF_NO_VALUE,  /* initial value */806	VCAP_AF_ACL_ID,807	VCAP_AF_CLS_VID_SEL,808	VCAP_AF_CNT_ID,809	VCAP_AF_COPY_PORT_NUM,810	VCAP_AF_COPY_QUEUE_NUM,811	VCAP_AF_CPU_COPY_ENA,812	VCAP_AF_CPU_QU,813	VCAP_AF_CPU_QUEUE_NUM,814	VCAP_AF_CUSTOM_ACE_TYPE_ENA,815	VCAP_AF_DEI_A_VAL,816	VCAP_AF_DEI_B_VAL,817	VCAP_AF_DEI_C_VAL,818	VCAP_AF_DEI_ENA,819	VCAP_AF_DEI_VAL,820	VCAP_AF_DLR_SEL,821	VCAP_AF_DP_ENA,822	VCAP_AF_DP_VAL,823	VCAP_AF_DSCP_ENA,824	VCAP_AF_DSCP_SEL,825	VCAP_AF_DSCP_VAL,826	VCAP_AF_ES2_REW_CMD,827	VCAP_AF_ESDX,828	VCAP_AF_FWD_KILL_ENA,829	VCAP_AF_FWD_MODE,830	VCAP_AF_FWD_SEL,831	VCAP_AF_HIT_ME_ONCE,832	VCAP_AF_HOST_MATCH,833	VCAP_AF_IGNORE_PIPELINE_CTRL,834	VCAP_AF_INTR_ENA,835	VCAP_AF_ISDX_ADD_REPLACE_SEL,836	VCAP_AF_ISDX_ADD_VAL,837	VCAP_AF_ISDX_ENA,838	VCAP_AF_ISDX_REPLACE_ENA,839	VCAP_AF_ISDX_VAL,840	VCAP_AF_LOOP_ENA,841	VCAP_AF_LRN_DIS,842	VCAP_AF_MAP_IDX,843	VCAP_AF_MAP_KEY,844	VCAP_AF_MAP_LOOKUP_SEL,845	VCAP_AF_MASK_MODE,846	VCAP_AF_MATCH_ID,847	VCAP_AF_MATCH_ID_MASK,848	VCAP_AF_MIRROR_ENA,849	VCAP_AF_MIRROR_PROBE,850	VCAP_AF_MIRROR_PROBE_ID,851	VCAP_AF_MRP_SEL,852	VCAP_AF_NXT_IDX,853	VCAP_AF_NXT_IDX_CTRL,854	VCAP_AF_OAM_SEL,855	VCAP_AF_PAG_OVERRIDE_MASK,856	VCAP_AF_PAG_VAL,857	VCAP_AF_PCP_A_VAL,858	VCAP_AF_PCP_B_VAL,859	VCAP_AF_PCP_C_VAL,860	VCAP_AF_PCP_ENA,861	VCAP_AF_PCP_VAL,862	VCAP_AF_PIPELINE_ACT,863	VCAP_AF_PIPELINE_FORCE_ENA,864	VCAP_AF_PIPELINE_PT,865	VCAP_AF_POLICE_ENA,866	VCAP_AF_POLICE_IDX,867	VCAP_AF_POLICE_REMARK,868	VCAP_AF_POLICE_VCAP_ONLY,869	VCAP_AF_POP_VAL,870	VCAP_AF_PORT_MASK,871	VCAP_AF_PUSH_CUSTOMER_TAG,872	VCAP_AF_PUSH_INNER_TAG,873	VCAP_AF_PUSH_OUTER_TAG,874	VCAP_AF_QOS_ENA,875	VCAP_AF_QOS_VAL,876	VCAP_AF_REW_OP,877	VCAP_AF_RT_DIS,878	VCAP_AF_SFID_ENA,879	VCAP_AF_SFID_VAL,880	VCAP_AF_SGID_ENA,881	VCAP_AF_SGID_VAL,882	VCAP_AF_SWAP_MACS_ENA,883	VCAP_AF_TAG_A_DEI_SEL,884	VCAP_AF_TAG_A_PCP_SEL,885	VCAP_AF_TAG_A_TPID_SEL,886	VCAP_AF_TAG_A_VID_SEL,887	VCAP_AF_TAG_B_DEI_SEL,888	VCAP_AF_TAG_B_PCP_SEL,889	VCAP_AF_TAG_B_TPID_SEL,890	VCAP_AF_TAG_B_VID_SEL,891	VCAP_AF_TAG_C_DEI_SEL,892	VCAP_AF_TAG_C_PCP_SEL,893	VCAP_AF_TAG_C_TPID_SEL,894	VCAP_AF_TAG_C_VID_SEL,895	VCAP_AF_TYPE,896	VCAP_AF_UNTAG_VID_ENA,897	VCAP_AF_VID_A_VAL,898	VCAP_AF_VID_B_VAL,899	VCAP_AF_VID_C_VAL,900	VCAP_AF_VID_REPLACE_ENA,901	VCAP_AF_VID_VAL,902	VCAP_AF_VLAN_POP_CNT,903	VCAP_AF_VLAN_POP_CNT_ENA,904};905 906#endif /* __VCAP_AG_API__ */907