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, 657b27ce7bSJiri Pirko MLXSW_TRAP_ID_IP2ME = 0x5F, 668d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_UNSPECIFIED_ADDRESS = 0x60, 678d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_LINK_LOCAL_DEST = 0x61, 688d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_LINK_LOCAL_SRC = 0x62, 698d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_ALL_NODES_LINK = 0x63, 708d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_OSPF = 0x64, 71588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV12_LISTENER_QUERY = 0x65, 72588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV1_LISTENER_REPORT = 0x66, 73588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV1_LISTENER_DONE = 0x67, 74588823f9SArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MLDV2_LISTENER_REPORT = 0x68, 758d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_DHCP = 0x69, 768d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_ALL_ROUTERS_LINK = 0x6F, 777b27ce7bSJiri Pirko MLXSW_TRAP_ID_RTR_INGRESS0 = 0x70, 788d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV4_BGP = 0x88, 798d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_BGP = 0x89, 808d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_ROUTER_SOLICITATION = 0x8A, 818d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_ROUTER_ADVERTISMENT = 0x8B, 828d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_NEIGHBOR_SOLICITATION = 0x8C, 838d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_NEIGHBOR_ADVERTISMENT = 0x8D, 848d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_L3_IPV6_REDIRECTION = 0x8E, 857b27ce7bSJiri Pirko MLXSW_TRAP_ID_HOST_MISS_IPV4 = 0x90, 868d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_IPV6_MC_LINK_LOCAL_DEST = 0x91, 878d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_HOST_MISS_IPV6 = 0x92, 88*86484de2SPetr Machata MLXSW_TRAP_ID_IPIP_DECAP_ERROR = 0xB1, 897607dd35SIdo Schimmel MLXSW_TRAP_ID_ROUTER_ALERT_IPV4 = 0xD6, 908d54814eSArkadi Sharshevsky MLXSW_TRAP_ID_ROUTER_ALERT_IPV6 = 0xD7, 910db7b386SJiri Pirko MLXSW_TRAP_ID_ACL0 = 0x1C0, 9293c1edb2SJiri Pirko 9393c1edb2SJiri Pirko MLXSW_TRAP_ID_MAX = 0x1FF 9493c1edb2SJiri Pirko }; 9593c1edb2SJiri Pirko 9693c1edb2SJiri Pirko enum mlxsw_event_trap_id { 9793c1edb2SJiri Pirko /* Port Up/Down event generated by hardware */ 9893c1edb2SJiri Pirko MLXSW_TRAP_ID_PUDE = 0x8, 9993c1edb2SJiri Pirko }; 10093c1edb2SJiri Pirko 10193c1edb2SJiri Pirko #endif /* _MLXSW_TRAP_H */ 102