trap.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2. /* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */
  3. #ifndef _MLXSW_TRAP_H
  4. #define _MLXSW_TRAP_H
  5. enum {
  6. /* Ethernet EMAD and FDB miss */
  7. MLXSW_TRAP_ID_FDB_MC = 0x01,
  8. MLXSW_TRAP_ID_ETHEMAD = 0x05,
  9. /* L2 traps for specific packet types */
  10. MLXSW_TRAP_ID_STP = 0x10,
  11. MLXSW_TRAP_ID_LACP = 0x11,
  12. MLXSW_TRAP_ID_EAPOL = 0x12,
  13. MLXSW_TRAP_ID_LLDP = 0x13,
  14. MLXSW_TRAP_ID_MMRP = 0x14,
  15. MLXSW_TRAP_ID_MVRP = 0x15,
  16. MLXSW_TRAP_ID_RPVST = 0x16,
  17. MLXSW_TRAP_ID_DHCP = 0x19,
  18. MLXSW_TRAP_ID_IGMP_QUERY = 0x30,
  19. MLXSW_TRAP_ID_IGMP_V1_REPORT = 0x31,
  20. MLXSW_TRAP_ID_IGMP_V2_REPORT = 0x32,
  21. MLXSW_TRAP_ID_IGMP_V2_LEAVE = 0x33,
  22. MLXSW_TRAP_ID_IGMP_V3_REPORT = 0x34,
  23. MLXSW_TRAP_ID_PKT_SAMPLE = 0x38,
  24. MLXSW_TRAP_ID_FID_MISS = 0x3D,
  25. MLXSW_TRAP_ID_ARPBC = 0x50,
  26. MLXSW_TRAP_ID_ARPUC = 0x51,
  27. MLXSW_TRAP_ID_MTUERROR = 0x52,
  28. MLXSW_TRAP_ID_TTLERROR = 0x53,
  29. MLXSW_TRAP_ID_LBERROR = 0x54,
  30. MLXSW_TRAP_ID_IPV4_OSPF = 0x55,
  31. MLXSW_TRAP_ID_IPV4_PIM = 0x58,
  32. MLXSW_TRAP_ID_IPV4_VRRP = 0x59,
  33. MLXSW_TRAP_ID_RPF = 0x5C,
  34. MLXSW_TRAP_ID_IP2ME = 0x5F,
  35. MLXSW_TRAP_ID_IPV6_UNSPECIFIED_ADDRESS = 0x60,
  36. MLXSW_TRAP_ID_IPV6_LINK_LOCAL_DEST = 0x61,
  37. MLXSW_TRAP_ID_IPV6_LINK_LOCAL_SRC = 0x62,
  38. MLXSW_TRAP_ID_IPV6_ALL_NODES_LINK = 0x63,
  39. MLXSW_TRAP_ID_IPV6_OSPF = 0x64,
  40. MLXSW_TRAP_ID_IPV6_MLDV12_LISTENER_QUERY = 0x65,
  41. MLXSW_TRAP_ID_IPV6_MLDV1_LISTENER_REPORT = 0x66,
  42. MLXSW_TRAP_ID_IPV6_MLDV1_LISTENER_DONE = 0x67,
  43. MLXSW_TRAP_ID_IPV6_MLDV2_LISTENER_REPORT = 0x68,
  44. MLXSW_TRAP_ID_IPV6_DHCP = 0x69,
  45. MLXSW_TRAP_ID_IPV6_ALL_ROUTERS_LINK = 0x6F,
  46. MLXSW_TRAP_ID_RTR_INGRESS0 = 0x70,
  47. MLXSW_TRAP_ID_IPV6_PIM = 0x79,
  48. MLXSW_TRAP_ID_IPV6_VRRP = 0x7A,
  49. MLXSW_TRAP_ID_IPV4_BGP = 0x88,
  50. MLXSW_TRAP_ID_IPV6_BGP = 0x89,
  51. MLXSW_TRAP_ID_L3_IPV6_ROUTER_SOLICITATION = 0x8A,
  52. MLXSW_TRAP_ID_L3_IPV6_ROUTER_ADVERTISMENT = 0x8B,
  53. MLXSW_TRAP_ID_L3_IPV6_NEIGHBOR_SOLICITATION = 0x8C,
  54. MLXSW_TRAP_ID_L3_IPV6_NEIGHBOR_ADVERTISMENT = 0x8D,
  55. MLXSW_TRAP_ID_L3_IPV6_REDIRECTION = 0x8E,
  56. MLXSW_TRAP_ID_HOST_MISS_IPV4 = 0x90,
  57. MLXSW_TRAP_ID_IPV6_MC_LINK_LOCAL_DEST = 0x91,
  58. MLXSW_TRAP_ID_HOST_MISS_IPV6 = 0x92,
  59. MLXSW_TRAP_ID_IPIP_DECAP_ERROR = 0xB1,
  60. MLXSW_TRAP_ID_ROUTER_ALERT_IPV4 = 0xD6,
  61. MLXSW_TRAP_ID_ROUTER_ALERT_IPV6 = 0xD7,
  62. MLXSW_TRAP_ID_ACL0 = 0x1C0,
  63. /* Multicast trap used for routes with trap action */
  64. MLXSW_TRAP_ID_ACL1 = 0x1C1,
  65. /* Multicast trap used for routes with trap-and-forward action */
  66. MLXSW_TRAP_ID_ACL2 = 0x1C2,
  67. MLXSW_TRAP_ID_MAX = 0x1FF
  68. };
  69. enum mlxsw_event_trap_id {
  70. /* Port Up/Down event generated by hardware */
  71. MLXSW_TRAP_ID_PUDE = 0x8,
  72. };
  73. #endif /* _MLXSW_TRAP_H */