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, 64c20b8018SElad Raz MLXSW_TRAP_ID_OSPF = 0x55, 657b27ce7bSJiri Pirko MLXSW_TRAP_ID_IP2ME = 0x5F, 667b27ce7bSJiri Pirko MLXSW_TRAP_ID_RTR_INGRESS0 = 0x70, 67616d8040SNogah Frankel MLXSW_TRAP_ID_BGP_IPV4 = 0x88, 687b27ce7bSJiri Pirko MLXSW_TRAP_ID_HOST_MISS_IPV4 = 0x90, 69*0db7b386SJiri Pirko MLXSW_TRAP_ID_ACL0 = 0x1C0, 7093c1edb2SJiri Pirko 7193c1edb2SJiri Pirko MLXSW_TRAP_ID_MAX = 0x1FF 7293c1edb2SJiri Pirko }; 7393c1edb2SJiri Pirko 7493c1edb2SJiri Pirko enum mlxsw_event_trap_id { 7593c1edb2SJiri Pirko /* Port Up/Down event generated by hardware */ 7693c1edb2SJiri Pirko MLXSW_TRAP_ID_PUDE = 0x8, 7793c1edb2SJiri Pirko }; 7893c1edb2SJiri Pirko 7993c1edb2SJiri Pirko #endif /* _MLXSW_TRAP_H */ 80