OpenNSL API Guide and Reference Manual
rx.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * (C) Copyright Broadcom Corporation 2013-2017
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *********************************************************************
18  * File: rx.h
19  * Details: Packet Receive Reason Types
20  ********************************************************************/
21 
22 #ifndef _SHR_RX_H_
23 #define _SHR_RX_H_
24 
25 #include <shared/types.h>
26 #include <shared/bitop.h>
27 
28 /*
29  * PKT RX Packet Reasons; reason CPU received the packet.
30  * Notes: It is possible no reasons are set (directed to CPU from ARL
31  * for example), or multiple reasons may be set.
32  */
33 
34 typedef enum _shr_rx_reason_e {
36  _SHR_RX_ARP = 1, /* ARP Packet */
37  _SHR_RX_BPDU = 2, /* BPDU Packet */
38  _SHR_RX_BROADCAST = 3, /* Broadcast packet */
39  _SHR_RX_CLASS_BASED_MOVE = 4, /* Class-based move prevented */
40  _SHR_RX_CLASS_TAG_PACKETS = 5, /* Higig Header with PPD=1 */
41  _SHR_RX_CONTROL = 6, /* Control frame or reserved addr */
42  _SHR_RX_CPU_LEARN = 7, /* CPU Learned (or VLAN not found */
43  /* on Strata devices) */
44  _SHR_RX_DEST_LOOKUP_FAIL = 8, /* Destination lookup fail (or L3 */
45  /* station move on Strata devices) */
46  _SHR_RX_DHCP = 9, /* DHCP packets */
47  _SHR_RX_DOS_ATTACK = 10, /* DOS Attack Packet */
48  _SHR_RX_E2E_HOL_IBP = 11, /* E2E HOL or IBP Packet */
49  _SHR_RX_ENCAP_HIGIG_ERROR = 12, /* Non-HG packets received on an */
50  /* E-HG port */
51  _SHR_RX_FILTER_MATCH = 13, /* Filter Match */
52  _SHR_RX_GRE_CHECKSUM = 14, /* GRE checksum */
53  _SHR_RX_GRE_SOURCE_ROUTE = 15, /* GRE source routing */
54  _SHR_RX_HIGIG_CONTROL = 16, /* Higig Packet with Control Opcode */
55  _SHR_RX_HIGIG_HDR_ERROR = 17, /* Higig+ header errors */
56  _SHR_RX_ICMP_REDIRECT = 18, /* ICMP Recirect */
57  _SHR_RX_IGMP = 19, /* IGMP packet */
58  _SHR_RX_INGRESS_FILTER = 20, /* Ingress Filter (VLAN membership) */
59  _SHR_RX_IP = 21, /* IP packet */
60  _SHR_RX_IPFIX_RATE_VIOLATION = 22, /* IPFIX flows exceed metering */
61  _SHR_RX_IP_MCAST_MISS = 23, /* IPMC miss */
62  _SHR_RX_IP_OPTION_VERSION = 24, /* IP options present or IP ver != 4 */
63  _SHR_RX_IPMC = 25, /* Class D IP multicast packet */
64  _SHR_RX_IPMC_RSVD = 26, /* IPMC Reserved Packet */
65  _SHR_RX_L2_CPU = 27, /* L2_TABLE - copy to CPU (on 5690) */
66  _SHR_RX_L2_DEST_MISS = 28, /* L2 destination lookup failure */
67  _SHR_RX_L2_LEARN_LIMIT = 29, /* L2 Learn Limit */
68  _SHR_RX_L2_MOVE = 30, /* L2 Station Movement */
69  _SHR_RX_L2_MTU_FAIL = 31, /* L2 MTU check fail */
70  _SHR_RX_L2_NON_UNICAST_MISS = 32, /* L2 Non-Unicast lookup miss */
71  _SHR_RX_L2_SOURCE_MISS = 33, /* L2 source lookup failure */
72  _SHR_RX_L3_ADDR_BIND_FAIL = 34, /* MAC to IP bind check failure */
73  _SHR_RX_L3_DEST_MISS = 35, /* L3 DIP Miss */
74  _SHR_RX_L3_HEADER_ERROR = 36, /* L3 header - IP options, */
75  _SHR_RX_L3_MTU_FAIL = 37, /* L3 MTU check fail */
76  _SHR_RX_L3_SLOW_PATH = 38, /* L3 slow path processed pkt. */
77  _SHR_RX_L3_SOURCE_MISS = 39, /* L3 SIP Miss */
78  _SHR_RX_L3_SOUCE_MOVE = 40, /* L3 Station Movement */
79  _SHR_RX_MARTIAN_ADDR = 41, /* Pkt. with Martian address */
80  _SHR_RX_MCAST_IDX_ERROR = 42, /* Multicast index error */
81  _SHR_RX_MCAST_MISS = 43, /* MC miss */
82  _SHR_RX_MIM_SERVICE_ERROR = 44, /* MiM terminated unicast packets */
83  /* that do not have a valid I-SID */
84  _SHR_RX_MPLS_CTRL_WORD_ERROR = 45, /* MPLS Control Word type is not 0 */
85  _SHR_RX_MPLS_ERROR = 46, /* MPLS error */
86  _SHR_RX_MPLS_INVALID_ACTION = 47, /* MPLS Invalid Action */
87  _SHR_RX_MPLS_INVALID_PAYLOAD = 48, /* MPLS Invalid Payload */
88  _SHR_RX_MPLS_LABEL_MISS = 49, /* MPLS table miss */
89  _SHR_RX_MPLS_SEQUENCE_NUMBER = 50, /* MPLS Sequence number */
90  _SHR_RX_MPLS_TTL = 51, /* MPLS TTL */
91  _SHR_RX_MULTICAST = 52, /* Multicast packet */
92  _SHR_RX_NHOP = 53, /* Copy to CPU from NH Idx Tbl */
93  _SHR_RX_OAM_ERROR = 54, /* OAM packets to CPU for error cases */
94  _SHR_RX_OAM_SLOW_PATH = 55, /* OAM packets to CPU - slowpath */
95  /* process */
96  _SHR_RX_OAM_LMDM = 56, /* OAM LMM/LMR, DMM/DMR packets to CPU */
97  _SHR_RX_PARITY_ERROR = 57, /* Parity error on IP tables */
98  _SHR_RX_PROTOCOL = 58, /* Protocol Packet */
99  _SHR_RX_SAMPLE_DEST = 59, /* Egress sFlow sampled */
100  _SHR_RX_SAMPLE_SOURCE = 60, /* Ingress sFlow sampled */
101  _SHR_RX_SHARED_VLAN_MISMATCH = 61, /* Private VLAN Mismatch */
102  _SHR_RX_SOURCE_ROUTE = 62, /* Source routing bit set */
103  _SHR_RX_TIME_STAMP = 63, /* Network time sync packet */
104  _SHR_RX_TTL = 64, /* TTL <= 0 or TTL < IPMC threshold */
105  _SHR_RX_TTL1 = 65, /* L3UC or IPMC packet with TTL */
106  /* equal to 1 */
107  _SHR_RX_TUNNEL_ERROR = 66, /* Tunnel error trap */
108  _SHR_RX_UDP_CHECKSUM = 67, /* UDP checksum */
109  _SHR_RX_UNKNOWN_VLAN = 68, /* Unknown VLAN; VID = 0xfff; */
110  /* CPU Learn bit (on 5690 devices) */
111  _SHR_RX_URPF_FAIL = 69, /* URPF Check Failed */
112  _SHR_RX_VC_LABEL_MISS = 70, /* VPLS table miss */
113  _SHR_RX_VLAN_FILTER_MATCH = 71, /* VLAN Filter Match */
114  _SHR_RX_WLAN_CLIENT_ERROR = 72, /* ROC error packets to the CPU */
115  _SHR_RX_WLAN_SLOW_PATH = 73, /* WLAN packets slowpath to the CPU */
116  _SHR_RX_WLAN_DOT1X_DROP = 74, /* WLAN client is unauthenticated */
117  _SHR_RX_EXCEPTION_FLOOD = 75, /* Exception processing or flooding */
118  /* (Robo chips) */
119  _SHR_RX_TIMESYNC = 76, /* Time Sync protocol packet */
120  _SHR_RX_EAV_DATA = 77, /* Ethernet AV data packet */
121  _SHR_RX_SAME_PORT_BRIDGE = 78, /* Hairpin or Same port */
122  /* switching/bridging */
123  _SHR_RX_SPLIT_HORIZON = 79, /* Basic bridging or VPLS Split */
124  /* horizon */
125  _SHR_RX_L4_ERROR = 80, /* TCP/UDP header or port number */
126  /* errors */
127  _SHR_RX_STP = 81, /* STP Ingress or Egress checks */
128  _SHR_RX_EGRESS_FILTER_REDIRECT = 82, /* Vlan egress filter redirect */
129  _SHR_RX_FILTER_REDIRECT = 83, /* Field processor redirect */
130  _SHR_RX_LOOPBACK = 84, /* Loopbacked */
131  _SHR_RX_VLAN_TRANSLATE = 85, /* VLAN translation table missed when */
132  /* it is expected to hit */
133  _SHR_RX_MMRP = 86, /* Packet of type MMRP */
134  _SHR_RX_SRP = 87, /* Packet of type SRP */
135  _SHR_RX_TUNNEL_CONTROL = 88, /* Tunnel control packet */
136  _SHR_RX_L2_MARKED = 89, /* L2 table marked */
137  _SHR_RX_WLAN_SLOWPATH_KEEPALIVE = 90, /* WLAN slowpath to the CPU, */
138  /* otherwise dropped */
139  _SHR_RX_STATION = 91, /* My Station packet to CPU */
140  _SHR_RX_NIV = 92, /* NIV packet */
141  _SHR_RX_NIV_PRIO_DROP = 93, /* NIV packet, priority drop */
142  _SHR_RX_NIV_INTERFACE_MISS = 94, /* NIV packet, interface miss */
143  _SHR_RX_NIV_RPF_FAIL = 95, /* NIV packet, RPF failed */
144  _SHR_RX_NIV_TAG_INVALID = 96, /* NIV packet, invalid tag */
145  _SHR_RX_NIV_TAG_DROP = 97, /* NIV packet, tag drop */
146  _SHR_RX_NIV_UNTAG_DROP = 98, /* NIV packet, untagged drop */
147  _SHR_RX_TRILL = 99, /* TRILL packet */
148  _SHR_RX_TRILL_INVALID = 100, /* TRILL packet, header error */
149  _SHR_RX_TRILL_MISS = 101, /* TRILL packet, lookup miss */
150  _SHR_RX_TRILL_RPF_FAIL = 102, /* TRILL packet, RPF check failed */
151  _SHR_RX_TRILL_SLOWPATH = 103, /* TRILL packet, slowpath to CPU */
152  _SHR_RX_TRILL_CORE_IS_IS = 104, /* TRILL packet, Core IS-IS */
153  _SHR_RX_TRILL_TTL = 105, /* TRILL packet, TTL check failed */
154  _SHR_RX_BFD_SLOWPATH = 106, /* The BFD packet is being fwd to the */
155  /* local uC for processing */
156  _SHR_RX_BFD = 107, /* BFD Error */
157  _SHR_RX_MIRROR = 108, /* Mirror packet */
158  _SHR_RX_REGEX_ACTION = 109, /* Flow tracker */
159  _SHR_RX_REGEX_MATCH = 110, /* Signature Match */
160  _SHR_RX_FAILOVER_DROP = 111, /* Protection drop data */
161  _SHR_RX_WLAN_TUNNEL_ERROR = 112, /* WLAN shim header error to CPU */
162  _SHR_RX_CONGESTION_CNM_PROXY = 113, /* Congestion CNM Proxy */
163  _SHR_RX_CONGESTION_CNM_PROXY_ERROR = 114, /* Congestion CNM Proxy Error */
164  _SHR_RX_CONGESTION_CNM = 115, /* Congestion CNM Internal Packet */
165  _SHR_RX_MPLS_UNKNOWN_ACH = 116, /* MPLS Unknown ACH */
166  _SHR_RX_MPLS_LOOKUPS_EXCEEDED = 117, /* MPLS out of lookups */
167  _SHR_RX_MPLS_RESERVED_ENTROPY_LABEL = 118, /* MPLS Entropy label in unallowed */
168  /* range */
169  _SHR_RX_MPLS_ILLEGAL_RESERVED_LABEL = 119, /* MPLS illegal reserved label */
170  _SHR_RX_MPLS_ROUTER_ALERT_LABEL = 120, /* MPLS alert label */
171  _SHR_RX_NIV_PRUNE = 121, /* NIV access port pruning (dst = src) */
172  _SHR_RX_VIRTUAL_PORT_PRUNE = 122, /* SVP == DVP */
173  _SHR_RX_NON_UNICAST_DROP = 123, /* Explicit multicast packet drop */
174  _SHR_RX_TRILL_PACKET_PORT_MISMATCH = 124, /* TRILL packet vs Rbridge port */
175  /* conflict */
176  _SHR_RX_WLAN_CLIENT_MOVE = 125, /* WLAN client moved */
177  _SHR_RX_WLAN_SOURCE_PORT_MISS = 126, /* WLAN SVP miss */
178  _SHR_RX_WLAN_CLIENT_SOURCE_MISS = 127, /* WLAN client database SA miss */
179  _SHR_RX_WLAN_CLIENT_DEST_MISS = 128, /* WLAN client database DA miss */
180  _SHR_RX_WLAN_MTU = 129, /* WLAN MTU error */
181  _SHR_RX_TRILL_NAME = 130, /* TRILL packet, Name check failed */
182  _SHR_RX_L2GRE_SIP_MISS = 131, /* L2 GRE SIP miss */
183  _SHR_RX_L2GRE_VPN_ID_MISS = 132, /* L2 GRE VPN id miss */
184  _SHR_RX_TIMESYNC_UNKNOWN_VERSION = 133, /* Unknown version of IEEE1588 */
185  _SHR_RX_BFD_ERROR = 134, /* BFD ERROR */
186  _SHR_RX_BFD_UNKNOWN_VERSION = 135, /* BFD UNKNOWN VERSION */
187  _SHR_RX_BFD_INVALID_VERSION = 136, /* BFD INVALID VERSION */
188  _SHR_RX_BFD_LOOKUP_FAILURE = 137, /* BFD LOOKUP FAILURE */
189  _SHR_RX_BFD_INVALID_PACKET = 138, /* BFD INVALID PACKET */
190  _SHR_RX_VXLAN_SIP_MISS = 139, /* Vxlan SIP miss */
191  _SHR_RX_VXLAN_VPN_ID_MISS = 140, /* Vxlan VPN id miss */
192  _SHR_RX_FCOE_ZONE_CHECK_FAIL = 141, /* Fcoe zone check failed */
193  _SHR_RX_IPMC_INTERFACE_MISMATCH = 142, /* IPMC input interface check failed */
194  _SHR_RX_NAT = 143, /* NAT */
195  _SHR_RX_TCP_UDP_NAT_MISS = 144, /* TCP/UDP packet NAT lookup miss */
196  _SHR_RX_ICMP_NAT_MISS = 145, /* ICMP packet NAT lookup miss */
197  _SHR_RX_NAT_FRAGMENT = 146, /* NAT lookup on fragmented packet */
198  _SHR_RX_NAT_MISS = 147, /* Non TCP/UDP/ICMP packet NAT lookup */
199  /* miss */
200  _SHR_RX_UNKNOWN_SUBTENTING_PORT = 148, /* UNKNOWN_SUBTENTING_PORT */
201  _SHR_RX_LLTAG_ABSENT_DROP = 149, /* LLTAG_ABSENT */
202  _SHR_RX_LLTAG_PRESENT_DROP = 150, /* LLTAG_PRESENT */
203  _SHR_RX_OAM_CCM_SLOWPATH = 151, /* OAM CCM packet copied to CPU */
204  _SHR_RX_OAM_INCOMPLETE_OPCODE = 152, /* OAM INCOMPLETE_OPCODE */
205  _SHR_RX_BHH_OAM_PACKET = 153, /* BHH OAM Packet */
206  _SHR_RX_RESERVED_0 = 154, /* Broadcom Reserved */
207  _SHR_RX_OAM_MPLS_LMDM = 155, /* MPLS LM/DM (RFC 6374) packet */
208  _SHR_RX_SAT = 156, /* OAM SAT pkt */
209  _SHR_RX_SAMPLE_SOURCE_FLEX = 157, /* Flexible sampled packets to CPU */
210  _SHR_RX_FLEX_SFLOW = 158, /* Flex Sflow? */
211  _SHR_RX_VXLT_MISS = 159, /* VLAN Translation miss packet */
212  _SHR_RX_TUNNEL_DECAP_ECN_ERROR = 160, /* Tunnel decap ECN error */
213  _SHR_RX_TUNNEL_OBJECT_VALIDATION_FAIL = 161, /* Tunnel Object Validation Fail */
214  _SHR_RX_L3_CPU = 162, /* L3 Copy to CPU */
215  _SHR_RX_TUNNEL_ADAPT_LOOKUP_MISS = 163, /* Tunnel Adapt Lookup Miss Drop */
216  _SHR_RX_PACKET_FLOW_SELECT_MISS = 164, /* Packet Flow Select Miss */
217  _SHR_RX_PROTECTION_DATA_DROP = 165, /* Protection Data Drop */
218  _SHR_RX_PACKET_FLOW_SELECT = 166, /* Packet Flow Select */
219  _SHR_RX_OTHER_LOOKUP_MISS = 167, /* Neither Source or Dest type of Lookup Miss */
220  _SHR_RX_INVALID_TPID = 168, /* Invalid TPID */
221  _SHR_RX_MPLS_CONTROL_PACKET = 169, /* MPLS Control Packet */
222  _SHR_RX_TUNNEL_TTL_ERROR = 170, /* Tunnel TTL Error */
223  _SHR_RX_L2_HEADER_ERROR = 171, /* L2 header */
224  _SHR_RX_OTHER_LOOKUP_HIT = 172, /* Neither Source or Dest type of Lookup Hit */
225  _SHR_RX_L2_SRC_LOOKUP_MISS = 173, /* L2 Source Lookup Miss */
226  _SHR_RX_L2_SRC_LOOKUP_HIT = 174, /* L2 Source Lookup Hit */
227  _SHR_RX_L2_DST_LOOKUP_MISS = 175, /* L2 Dest Lookup Miss */
228  _SHR_RX_L2_DST_LOOKUP_HIT = 176, /* L2 Dest Lookup Hit */
229  _SHR_RX_L3_SRC_ROUTE_LOOKUP_MISS = 177, /* L3 Source Route Lookup Miss */
230  _SHR_RX_L3_SRC_HOST_LOOKUP_MISS = 178, /* L3 Source Host Lookup Miss */
231  _SHR_RX_L3_SRC_ROUTE_LOOKUP_HIT = 179, /* L3 Source Route Lookup Hit */
232  _SHR_RX_L3_SRC_HOST_LOOKUP_HIT = 180, /* L3 Source Host Lookup Hit */
233  _SHR_RX_L3_DST_ROUTE_LOOKUP_MISS = 181, /* L3 Dest Route Lookup Miss */
234  _SHR_RX_L3_DST_HOST_LOOKUP_MISS = 182, /* L3 Dest Host Lookup Miss */
235  _SHR_RX_L3_DST_ROUTE_LOOKUP_HIT = 183, /* L3 Dest Route Lookup Hit */
236  _SHR_RX_L3_DST_HOST_LOOKUP_HIT = 184, /* L3 Dest Host Lookup Hit */
237  _SHR_RX_VLAN_TRANSLATE1_LOOKUP1_MISS = 185, /* VLAN Translate1 Lookup1 Miss */
238  _SHR_RX_VLAN_TRANSLATE1_LOOKUP2_MISS = 186, /* VLAN Translate1 Lookup2 Miss */
239  _SHR_RX_MPLS_LOOKUP1_MISS = 187, /* MPLS Lookup1 Miss */
240  _SHR_RX_MPLS_LOOKUP2_MISS = 188, /* MPLS Lookup2 Miss */
241  _SHR_RX_L3_TUNNEL_LOOKUP_MISS = 189, /* L3 Tunnel Lookup Miss */
242  _SHR_RX_VLAN_TRANSLATE2_LOOKUP1_MISS = 190, /* VLAN Translate2 Lookup1 Miss */
243  _SHR_RX_VLAN_TRANSLATE2_LOOKUP2_MISS = 191, /* VLAN Translate2 Lookup2 Miss */
244  _SHR_RX_L2_STU_FAIL = 192, /* L2 STU check fail */
245  _SHR_RX_SR_COUNTER_EXCEEDED = 193, /* Seamless Redundancy(SR) - */
246  /* Counter Threshold Exceeded */
247  _SHR_RX_SR_COPY_TO_CPU_BIT0 = 194, /* Seamless Redundancy(SR) copy to CPU */
248  /* SR custom reason code bit 0 */
249  _SHR_RX_SR_COPY_TO_CPU_BIT1 = 195, /* SR custom reason code bit 1 */
250  _SHR_RX_SR_COPY_TO_CPU_BIT2 = 196, /* SR custom reason code bit 2 */
251  _SHR_RX_SR_COPY_TO_CPU_BIT3 = 197, /* SR custom reason code bit 3 */
252  _SHR_RX_SR_COPY_TO_CPU_BIT4 = 198, /* SR custom reason code bit 4 */
253  _SHR_RX_SR_COPY_TO_CPU_BIT5 = 199, /* SR custom reason code bit 5 */
254  _SHR_RX_L3_HEADER_MISMATCH = 200, /* L3 Header Mismatch */
255  _SHR_RX_REASON_COUNT = 201 /* MUST BE LAST */
257 /* __doxy_func_body_end__ */
258 
259 #define _SHR_RX_REASON_NAMES_INITIALIZER { \
260  "Invalid", \
261  "Arp", \
262  "Bpdu", \
263  "Broadcast", \
264  "ClassBasedMove", \
265  "ClassTagPackets", \
266  "Control", \
267  "CpuLearn", \
268  "DestLookupFail", \
269  "Dhcp", \
270  "DosAttack", \
271  "E2eHolIbp", \
272  "EncapHiGigError", \
273  "FilterMatch", \
274  "GreChecksum", \
275  "GreSourceRoute", \
276  "HigigControl", \
277  "HigigHdrError", \
278  "IcmpRedirect", \
279  "Igmp", \
280  "IngressFilter", \
281  "Ip", \
282  "IpfixRateViolation", \
283  "IpMcastMiss", \
284  "IpOptionVersion", \
285  "Ipmc", \
286  "IpmcRsvd", \
287  "L2Cpu", \
288  "L2DestMiss", \
289  "L2LearnLimit", \
290  "L2Move", \
291  "L2MtuFail", \
292  "L2NonUnicastMiss", \
293  "L2SourceMiss", \
294  "L3AddrBindFail", \
295  "L3DestMiss", \
296  "L3HeaderError", \
297  "L3MtuFail", \
298  "L3Slowpath", \
299  "L3SourceMiss", \
300  "L3SourceMove", \
301  "MartianAddr", \
302  "McastIdxError", \
303  "McastMiss", \
304  "MimServiceError", \
305  "MplsCtrlWordError", \
306  "MplsError", \
307  "MplsInvalidAction", \
308  "MplsInvalidPayload", \
309  "MplsLabelMiss", \
310  "MplsSequenceNumber", \
311  "MplsTtl", \
312  "Multicast", \
313  "Nhop", \
314  "OamError", \
315  "OamSlowPath", \
316  "OamLMDM", \
317  "ParityError", \
318  "Protocol", \
319  "SampleDest", \
320  "SampleSource", \
321  "SharedVlanMismatch", \
322  "SourceRoute", \
323  "TimeStamp", \
324  "Ttl", \
325  "Ttl1", \
326  "TunnelError", \
327  "UdpChecksum", \
328  "UnknownVlan", \
329  "UrpfFail", \
330  "VcLabelMiss", \
331  "VlanFilterMatch", \
332  "WlanClientError", \
333  "WlanSlowPath", \
334  "WlanDot1xDrop", \
335  "ExceptionFlood", \
336  "Timesync", \
337  "EavData", \
338  "SamePortBridge", \
339  "SplitHorizon", \
340  "L4Error", \
341  "Stp", \
342  "EgressFilterRedirect", \
343  "FilterRedirect", \
344  "Loopback", \
345  "VlanTranslate", \
346  "Mmrp", \
347  "Srp", \
348  "TunnelControl", \
349  "L2Marked", \
350  "WlanSlowpathKeepalive", \
351  "Station", \
352  "Niv", \
353  "NivPrioDrop", \
354  "NivInterfaceMiss", \
355  "NivRpfFail", \
356  "NivTagInvalid", \
357  "NivTagDrop", \
358  "NivUntagDrop", \
359  "Trill", \
360  "TrillInvalid", \
361  "TrillMiss", \
362  "TrillRpfFail", \
363  "TrillSlowpath", \
364  "TrillCoreIsIs", \
365  "TrillTtl", \
366  "BfdSlowpath", \
367  "Bfd", \
368  "Mirror", \
369  "RegexAction", \
370  "RegexMatch", \
371  "FailoverDrop", \
372  "WlanTunnelError", \
373  "CongestionCnmProxy", \
374  "CongestionCnmProxyError", \
375  "CongestionCnm", \
376  "MplsUnknownAch", \
377  "MplsLookupsExceeded", \
378  "MplsReservedEntropyLabel", \
379  "MplsIllegalReservedLabel", \
380  "MplsRouterAlertLabel", \
381  "NivPrune", \
382  "VirtualPortPrune", \
383  "NonUnicastDrop", \
384  "TrillPacketPortMismatch", \
385  "WlanClientMove", \
386  "WlanSourcePortMiss", \
387  "WlanClientSourceMiss", \
388  "WlanClientDestMiss", \
389  "WlanMtu", \
390  "TrillName", \
391  "L2GreSipMiss", \
392  "L2GreVpnIdMiss", \
393  "TimesyncUnknownVersion", \
394  "BfdError", \
395  "BfdUnknownVersion", \
396  "BfdInvalidVersion", \
397  "BfdLookupFailure", \
398  "BfdInvalidPacket", \
399  "VxlanSipMiss", \
400  "VxlanVpnIdMiss", \
401  "FcoeZoneCheckFail", \
402  "IpmcInterfaceMismatch", \
403  "Nat", \
404  "TcpUdpNatMiss", \
405  "IcmpNatMiss", \
406  "NatFragment", \
407  "NatMiss", \
408  "UnknownSubtentingPort", \
409  "LLTagAbsentDrop", \
410  "LLTagpresenDrop", \
411  "OAMCCMslowpath", \
412  "OAMIncompleteOpcode", \
413  "OAMCCMpacket", \
414  "Reserved0", \
415  "OAMMplsLmDM", \
416  "SAT", \
417  "SampleSourceFlex", \
418  "FlexSflow", \
419  "VxltMiss", \
420  "TunnelDecapEcnError", \
421  "TunnelObjectValidationFail", \
422  "L3Cpu", \
423  "TunnelAdaptLookupMiss", \
424  "PacketFlowSelectMiss", \
425  "ProtectionDataDrop", \
426  "PacketFlowSelect", \
427  "OtherLookupMiss", \
428  "InvalidTpid", \
429  "MplsControlPacket", \
430  "TunnelTtlError", \
431  "L2HeaderError", \
432  "OtherLookupHit", \
433  "L2SrcLookupMiss", \
434  "L2SrcLookupHit", \
435  "L2DstLookupMiss", \
436  "L2DstLookupHit", \
437  "L3SrcRouteLookupMiss", \
438  "L3SrcHostLookupMiss", \
439  "L3SrcRouteLookupHit", \
440  "L3SrcHostLookupHit", \
441  "L3DstRouteLookupMiss", \
442  "L3DstHostLookupMiss", \
443  "L3DstRouteLookupHit", \
444  "L3DstHostLookupHit", \
445  "MplsLookup1Miss", \
446  "MplsLookup2Miss", \
447  "L3TunnelLookupMiss", \
448  "VlanTranslate1Lookup1Miss",\
449  "VlanTranslate1Lookup2Miss",\
450  "VlanTranslate2Lookup1Miss",\
451  "VlanTranslate2Lookup2Miss",\
452  "L2StuFail", \
453  "SrCounterExceeded", \
454  "SrCopyToCpuBit0", \
455  "SrCopyToCpuBit1", \
456  "SrCopyToCpuBit2", \
457  "SrCopyToCpuBit3", \
458  "SrCopyToCpuBit4", \
459  "SrCopyToCpuBit5", \
460  "L3HeaderMismatch", \
461 }
462 /* __doxy_func_body_end__ */
463 
464 /*
465  * Set of "reasons" (see _SHR_RX_*) why a packet came to the CPU.
466  */
467 typedef struct _shr_rx_reasons_s {
470 /* __doxy_func_body_end__ */
471 
472 /*
473  * Macro to check if a reason (_SHR_RX_*) is included in a
474  * set of reasons (_shr_rx_reasons_t). Returns:
475  * zero => reason is not included in the set
476  * non-zero => reason is included in the set
477  */
478 #define _SHR_RX_REASON_GET(_reasons, _reason) \
479  SHR_BITGET(((_reasons).pbits), (_reason))
480 
481 /*
482  * Macro to add a reason (_SHR_RX_*) to a set of
483  * reasons (_shr_rx_reasons_t)
484  */
485 #define _SHR_RX_REASON_SET(_reasons, _reason) \
486  SHR_BITSET(((_reasons).pbits), (_reason))
487 
488 /*
489  * Macro to add all reasons (_SHR_RX_*) to a set of
490  * reasons (_shr_rx_reasons_t)
491  */
492 #define _SHR_RX_REASON_SET_ALL(_reasons) \
493  SHR_BITSET_RANGE(((_reasons).pbits), 0, _SHR_RX_REASON_COUNT)
494 
495 /*
496  * Macro to clear a reason (_SHR_RX_*) from a set of
497  * reasons (_shr_rx_reasons_t)
498  */
499 #define _SHR_RX_REASON_CLEAR(_reasons, _reason) \
500  SHR_BITCLR(((_reasons).pbits), (_reason))
501 
502 /*
503  * Macro to clear a set of reasons (_shr_rx_reasons_t).
504  */
505 #define _SHR_RX_REASON_CLEAR_ALL(_reasons) \
506  SHR_BITCLR_RANGE(((_reasons).pbits), 0, _SHR_RX_REASON_COUNT)
507 
508 #define _SHR_RX_REASON_IS_NULL(_reasons) \
509  SHR_BITNULL_RANGE(((_reasons).pbits), \
510  0, _SHR_RX_REASON_COUNT)
511 #define _SHR_RX_REASON_ITER(_reasons, reason) \
512  for(reason = _SHR_RX_INVALID; reason < (int)_SHR_RX_REASON_COUNT; reason++) \
513  if(_SHR_RX_REASON_GET(_reasons, reason))
514 
515 #define _SHR_RX_REASON_COUNT(_reasons, _count) \
516  SHR_BITCOUNT_RANGE(((_reasons).pbits), _count, \
517  0, _SHR_RX_REASON_COUNT)
518 #define _SHR_RX_REASON_EQ(_reasons1, _reasons2) \
519  SHR_BITEQ_RANGE(((_reasons1).pbits), ((_reasons2).pbits), \
520  0, _SHR_RX_REASON_COUNT)
521 #define _SHR_RX_REASON_NEQ(_reasons1, _reasons2) \
522  (!SHR_BITEQ_RANGE(((_reasons1).pbits), ((_reasons2).pbits), \
523  0, _SHR_RX_REASON_COUNT))
524 #define _SHR_RX_REASON_AND(_reasons1, _reasons2) \
525  SHR_BITAND_RANGE(((_reasons1).pbits), ((_reasons2).pbits), 0, \
526  _SHR_RX_REASON_COUNT, ((_reasons1).pbits))
527 #define _SHR_RX_REASON_OR(_reasons1, _reasons2) \
528  SHR_BITOR_RANGE(((_reasons1).pbits), ((_reasons2).pbits), 0, \
529  _SHR_RX_REASON_COUNT, ((_reasons1).pbits))
530 #define _SHR_RX_REASON_XOR(_reasons1, _reasons2) \
531  SHR_BITXOR_RANGE(((_reasons1).pbits), ((_reasons2).pbits), 0, \
532  _SHR_RX_REASON_COUNT, ((_reasons1).pbits))
533 #define _SHR_RX_REASON_REMOVE(_reasons1, _reasons2) \
534  SHR_BITREMOVE_RANGE(((_reasons1).pbits), ((_reasons2).pbits), 0, \
535  _SHR_RX_REASON_COUNT, ((_reasons1).pbits));
536 #define _SHR_RX_REASON_NEGATE(_reasons1, _reasons2) \
537  SHR_BITNEGATE_RANGE(((_reasons2).pbits), 0, \
538  _SHR_RX_REASON_COUNT, ((_reasons1).pbits));
539 
540 #endif /* _SHR_RX_H_ */