iaa_crypto_stats.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright(c) 2021 Intel Corporation. All rights rsvd. */
  3. #ifndef __CRYPTO_DEV_IAA_CRYPTO_STATS_H__
  4. #define __CRYPTO_DEV_IAA_CRYPTO_STATS_H__
  5. #if defined(CONFIG_CRYPTO_DEV_IAA_CRYPTO_STATS)
  6. int iaa_crypto_debugfs_init(void);
  7. void iaa_crypto_debugfs_cleanup(void);
  8. void update_total_comp_calls(void);
  9. void update_total_comp_bytes_out(int n);
  10. void update_total_decomp_calls(void);
  11. void update_total_sw_decomp_calls(void);
  12. void update_total_decomp_bytes_in(int n);
  13. void update_completion_einval_errs(void);
  14. void update_completion_timeout_errs(void);
  15. void update_completion_comp_buf_overflow_errs(void);
  16. void update_wq_comp_calls(struct idxd_wq *idxd_wq);
  17. void update_wq_comp_bytes(struct idxd_wq *idxd_wq, int n);
  18. void update_wq_decomp_calls(struct idxd_wq *idxd_wq);
  19. void update_wq_decomp_bytes(struct idxd_wq *idxd_wq, int n);
  20. #else
  21. static inline int iaa_crypto_debugfs_init(void) { return 0; }
  22. static inline void iaa_crypto_debugfs_cleanup(void) {}
  23. static inline void update_total_comp_calls(void) {}
  24. static inline void update_total_comp_bytes_out(int n) {}
  25. static inline void update_total_decomp_calls(void) {}
  26. static inline void update_total_sw_decomp_calls(void) {}
  27. static inline void update_total_decomp_bytes_in(int n) {}
  28. static inline void update_completion_einval_errs(void) {}
  29. static inline void update_completion_timeout_errs(void) {}
  30. static inline void update_completion_comp_buf_overflow_errs(void) {}
  31. static inline void update_wq_comp_calls(struct idxd_wq *idxd_wq) {}
  32. static inline void update_wq_comp_bytes(struct idxd_wq *idxd_wq, int n) {}
  33. static inline void update_wq_decomp_calls(struct idxd_wq *idxd_wq) {}
  34. static inline void update_wq_decomp_bytes(struct idxd_wq *idxd_wq, int n) {}
  35. #endif // CONFIG_CRYPTO_DEV_IAA_CRYPTO_STATS
  36. #endif