mlxsw.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2. /* Copyright (c) 2019 Mellanox Technologies. All rights reserved */
  3. #undef TRACE_SYSTEM
  4. #define TRACE_SYSTEM mlxsw
  5. #if !defined(_MLXSW_TRACEPOINT_H) || defined(TRACE_HEADER_MULTI_READ)
  6. #define _MLXSW_TRACEPOINT_H
  7. #include <linux/tracepoint.h>
  8. struct mlxsw_sp;
  9. struct mlxsw_sp_acl_atcam_region;
  10. struct mlxsw_sp_acl_tcam_vregion;
  11. TRACE_EVENT(mlxsw_sp_acl_atcam_entry_add_ctcam_spill,
  12. TP_PROTO(const struct mlxsw_sp *mlxsw_sp,
  13. const struct mlxsw_sp_acl_atcam_region *aregion),
  14. TP_ARGS(mlxsw_sp, aregion),
  15. TP_STRUCT__entry(
  16. __field(const void *, mlxsw_sp)
  17. __field(const void *, aregion)
  18. ),
  19. TP_fast_assign(
  20. __entry->mlxsw_sp = mlxsw_sp;
  21. __entry->aregion = aregion;
  22. ),
  23. TP_printk("mlxsw_sp %p, aregion %p",
  24. __entry->mlxsw_sp, __entry->aregion)
  25. );
  26. TRACE_EVENT(mlxsw_sp_acl_tcam_vregion_rehash,
  27. TP_PROTO(const struct mlxsw_sp *mlxsw_sp,
  28. const struct mlxsw_sp_acl_tcam_vregion *vregion),
  29. TP_ARGS(mlxsw_sp, vregion),
  30. TP_STRUCT__entry(
  31. __field(const void *, mlxsw_sp)
  32. __field(const void *, vregion)
  33. ),
  34. TP_fast_assign(
  35. __entry->mlxsw_sp = mlxsw_sp;
  36. __entry->vregion = vregion;
  37. ),
  38. TP_printk("mlxsw_sp %p, vregion %p",
  39. __entry->mlxsw_sp, __entry->vregion)
  40. );
  41. TRACE_EVENT(mlxsw_sp_acl_tcam_vregion_migrate,
  42. TP_PROTO(const struct mlxsw_sp *mlxsw_sp,
  43. const struct mlxsw_sp_acl_tcam_vregion *vregion),
  44. TP_ARGS(mlxsw_sp, vregion),
  45. TP_STRUCT__entry(
  46. __field(const void *, mlxsw_sp)
  47. __field(const void *, vregion)
  48. ),
  49. TP_fast_assign(
  50. __entry->mlxsw_sp = mlxsw_sp;
  51. __entry->vregion = vregion;
  52. ),
  53. TP_printk("mlxsw_sp %p, vregion %p",
  54. __entry->mlxsw_sp, __entry->vregion)
  55. );
  56. TRACE_EVENT(mlxsw_sp_acl_tcam_vregion_migrate_end,
  57. TP_PROTO(const struct mlxsw_sp *mlxsw_sp,
  58. const struct mlxsw_sp_acl_tcam_vregion *vregion),
  59. TP_ARGS(mlxsw_sp, vregion),
  60. TP_STRUCT__entry(
  61. __field(const void *, mlxsw_sp)
  62. __field(const void *, vregion)
  63. ),
  64. TP_fast_assign(
  65. __entry->mlxsw_sp = mlxsw_sp;
  66. __entry->vregion = vregion;
  67. ),
  68. TP_printk("mlxsw_sp %p, vregion %p",
  69. __entry->mlxsw_sp, __entry->vregion)
  70. );
  71. TRACE_EVENT(mlxsw_sp_acl_tcam_vregion_rehash_rollback_failed,
  72. TP_PROTO(const struct mlxsw_sp *mlxsw_sp,
  73. const struct mlxsw_sp_acl_tcam_vregion *vregion),
  74. TP_ARGS(mlxsw_sp, vregion),
  75. TP_STRUCT__entry(
  76. __field(const void *, mlxsw_sp)
  77. __field(const void *, vregion)
  78. ),
  79. TP_fast_assign(
  80. __entry->mlxsw_sp = mlxsw_sp;
  81. __entry->vregion = vregion;
  82. ),
  83. TP_printk("mlxsw_sp %p, vregion %p",
  84. __entry->mlxsw_sp, __entry->vregion)
  85. );
  86. #endif /* _MLXSW_TRACEPOINT_H */
  87. /* This part must be outside protection */
  88. #include <trace/define_trace.h>