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