193c1edb2SJiri Pirko /* 293c1edb2SJiri Pirko * drivers/net/ethernet/mellanox/mlxsw/trap.h 393c1edb2SJiri Pirko * Copyright (c) 2015 Mellanox Technologies. All rights reserved. 493c1edb2SJiri Pirko * Copyright (c) 2015 Elad Raz <eladr@mellanox.com> 593c1edb2SJiri Pirko * Copyright (c) 2015 Jiri Pirko <jiri@mellanox.com> 693c1edb2SJiri Pirko * Copyright (c) 2015 Ido Schimmel <idosch@mellanox.com> 793c1edb2SJiri Pirko * 893c1edb2SJiri Pirko * Redistribution and use in source and binary forms, with or without 993c1edb2SJiri Pirko * modification, are permitted provided that the following conditions are met: 1093c1edb2SJiri Pirko * 1193c1edb2SJiri Pirko * 1. Redistributions of source code must retain the above copyright 1293c1edb2SJiri Pirko * notice, this list of conditions and the following disclaimer. 1393c1edb2SJiri Pirko * 2. Redistributions in binary form must reproduce the above copyright 1493c1edb2SJiri Pirko * notice, this list of conditions and the following disclaimer in the 1593c1edb2SJiri Pirko * documentation and/or other materials provided with the distribution. 1693c1edb2SJiri Pirko * 3. Neither the names of the copyright holders nor the names of its 1793c1edb2SJiri Pirko * contributors may be used to endorse or promote products derived from 1893c1edb2SJiri Pirko * this software without specific prior written permission. 1993c1edb2SJiri Pirko * 2093c1edb2SJiri Pirko * Alternatively, this software may be distributed under the terms of the 2193c1edb2SJiri Pirko * GNU General Public License ("GPL") version 2 as published by the Free 2293c1edb2SJiri Pirko * Software Foundation. 2393c1edb2SJiri Pirko * 2493c1edb2SJiri Pirko * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2593c1edb2SJiri Pirko * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2693c1edb2SJiri Pirko * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2793c1edb2SJiri Pirko * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2893c1edb2SJiri Pirko * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2993c1edb2SJiri Pirko * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 3093c1edb2SJiri Pirko * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3193c1edb2SJiri Pirko * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3293c1edb2SJiri Pirko * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3393c1edb2SJiri Pirko * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3493c1edb2SJiri Pirko * POSSIBILITY OF SUCH DAMAGE. 3593c1edb2SJiri Pirko */ 3693c1edb2SJiri Pirko #ifndef _MLXSW_TRAP_H 3793c1edb2SJiri Pirko #define _MLXSW_TRAP_H 3893c1edb2SJiri Pirko 3993c1edb2SJiri Pirko enum { 4093c1edb2SJiri Pirko /* Ethernet EMAD and FDB miss */ 4193c1edb2SJiri Pirko MLXSW_TRAP_ID_FDB_MC = 0x01, 4293c1edb2SJiri Pirko MLXSW_TRAP_ID_ETHEMAD = 0x05, 4393c1edb2SJiri Pirko /* L2 traps for specific packet types */ 4493c1edb2SJiri Pirko MLXSW_TRAP_ID_STP = 0x10, 4593c1edb2SJiri Pirko MLXSW_TRAP_ID_LACP = 0x11, 4693c1edb2SJiri Pirko MLXSW_TRAP_ID_EAPOL = 0x12, 4793c1edb2SJiri Pirko MLXSW_TRAP_ID_LLDP = 0x13, 4893c1edb2SJiri Pirko MLXSW_TRAP_ID_MMRP = 0x14, 4993c1edb2SJiri Pirko MLXSW_TRAP_ID_MVRP = 0x15, 5093c1edb2SJiri Pirko MLXSW_TRAP_ID_RPVST = 0x16, 5193c1edb2SJiri Pirko MLXSW_TRAP_ID_DHCP = 0x19, 5293c1edb2SJiri Pirko MLXSW_TRAP_ID_IGMP_QUERY = 0x30, 5393c1edb2SJiri Pirko MLXSW_TRAP_ID_IGMP_V1_REPORT = 0x31, 5493c1edb2SJiri Pirko MLXSW_TRAP_ID_IGMP_V2_REPORT = 0x32, 5593c1edb2SJiri Pirko MLXSW_TRAP_ID_IGMP_V2_LEAVE = 0x33, 5693c1edb2SJiri Pirko MLXSW_TRAP_ID_IGMP_V3_REPORT = 0x34, 5798d0f7b9SYotam Gigi MLXSW_TRAP_ID_PKT_SAMPLE = 0x38, 589d41acccSJiri Pirko MLXSW_TRAP_ID_FID_MISS = 0x3D, 597b27ce7bSJiri Pirko MLXSW_TRAP_ID_ARPBC = 0x50, 607b27ce7bSJiri Pirko MLXSW_TRAP_ID_ARPUC = 0x51, 61c20b8018SElad Raz MLXSW_TRAP_ID_MTUERROR = 0x52, 62c20b8018SElad Raz MLXSW_TRAP_ID_TTLERROR = 0x53, 63a94a614fSIdo Schimmel MLXSW_TRAP_ID_LBERROR = 0x54, 648d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV4_OSPF = 0x55, 65b48cfc80SYotam Gigi MLXSW_TRAP_ID_IPV4_PIM = 0x58, 66*11566d34SIdo Schimmel MLXSW_TRAP_ID_IPV4_VRRP = 0x59, 67b48cfc80SYotam Gigi MLXSW_TRAP_ID_RPF = 0x5C, 687b27ce7bSJiri Pirko MLXSW_TRAP_ID_IP2ME = 0x5F, 698d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_UNSPECIFIED_ADDRESS = 0x60, 708d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_LINK_LOCAL_DEST = 0x61, 718d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_LINK_LOCAL_SRC = 0x62, 728d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_ALL_NODES_LINK = 0x63, 738d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_OSPF = 0x64, 74588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV12_LISTENER_QUERY = 0x65, 75588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV1_LISTENER_REPORT = 0x66, 76588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV1_LISTENER_DONE = 0x67, 77588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV2_LISTENER_REPORT = 0x68, 788d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_DHCP = 0x69, 798d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_ALL_ROUTERS_LINK = 0x6F, 807b27ce7bSJiri Pirko MLXSW_TRAP_ID_RTR_INGRESS0 = 0x70, 816a170d32SYuval Mintz MLXSW_TRAP_ID_IPV6_PIM = 0x79, 82*11566d34SIdo Schimmel MLXSW_TRAP_ID_IPV6_VRRP = 0x7A, 838d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV4_BGP = 0x88, 848d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_BGP = 0x89, 858d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_ROUTER_SOLICITATION = 0x8A, 868d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_ROUTER_ADVERTISMENT = 0x8B, 878d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_NEIGHBOR_SOLICITATION = 0x8C, 888d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_NEIGHBOR_ADVERTISMENT = 0x8D, 898d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_REDIRECTION = 0x8E, 907b27ce7bSJiri Pirko MLXSW_TRAP_ID_HOST_MISS_IPV4 = 0x90, 918d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MC_LINK_LOCAL_DEST = 0x91, 928d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_HOST_MISS_IPV6 = 0x92, 9386484de2SPetr Machata MLXSW_TRAP_ID_IPIP_DECAP_ERROR = 0xB1, 947607dd35SIdo Schimmel MLXSW_TRAP_ID_ROUTER_ALERT_IPV4 = 0xD6, 958d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_ROUTER_ALERT_IPV6 = 0xD7, 960db7b386SJiri Pirko MLXSW_TRAP_ID_ACL0 = 0x1C0, 97b48cfc80SYotam Gigi /* Multicast trap used for routes with trap action */ 98b48cfc80SYotam Gigi MLXSW_TRAP_ID_ACL1 = 0x1C1, 99a0040c8cSYotam Gigi /* Multicast trap used for routes with trap-and-forward action */ 100a0040c8cSYotam Gigi MLXSW_TRAP_ID_ACL2 = 0x1C2, 10193c1edb2SJiri Pirko 10293c1edb2SJiri Pirko MLXSW_TRAP_ID_MAX = 0x1FF 10393c1edb2SJiri Pirko }; 10493c1edb2SJiri Pirko 10593c1edb2SJiri Pirko enum mlxsw_event_trap_id { 10693c1edb2SJiri Pirko /* Port Up/Down event generated by hardware */ 10793c1edb2SJiri Pirko MLXSW_TRAP_ID_PUDE = 0x8, 10893c1edb2SJiri Pirko }; 10993c1edb2SJiri Pirko 11093c1edb2SJiri Pirko #endif /* _MLXSW_TRAP_H */ 111