xref: /isa-l_crypto/examples/saturation_test/isal_multithread_perf.h (revision 868f05eaebc8818b13f3b2f7cdf8448020b6a77f)
1 
2 #ifndef ISAL_MULTITHREAD_PERF_H_
3 #define ISAL_MULTITHREAD_PERF_H_
4 
5 #include "isa-l_crypto.h"
6 
7 /* multibuffer hash */
8 void *
9 md5_ossl_func(void *arg);
10 void *
11 md5_mb_func(void *arg);
12 void *
13 sha1_ossl_func(void *arg);
14 void *
15 sha1_mb_func(void *arg);
16 void *
17 sha256_ossl_func(void *arg);
18 void *
19 sha256_mb_func(void *arg);
20 void *
21 sha512_ossl_func(void *arg);
22 void *
23 sha512_mb_func(void *arg);
24 
25 /* aes */
26 void *
27 cbc_128_dec_func(void *arg);
28 void *
29 cbc_192_dec_func(void *arg);
30 void *
31 cbc_256_dec_func(void *arg);
32 void *
33 xts_128_enc_func(void *arg);
34 void *
35 xts_256_enc_func(void *arg);
36 #define AAD_LENGTH 16
37 void *
38 gcm_128_enc_func(void *arg);
39 void *
40 gcm_256_enc_func(void *arg);
41 
42 typedef struct {
43         char *name;
44         void *(*thread_func)(void *arg);
45         uint32_t rounds_nbuf; /* bufs number of one processing round */
46 } alg_method;
47 
48 /* Global parameters*/
49 extern long long run_secs;
50 extern uint32_t num_threads;
51 extern uint32_t buflen;
52 extern uint32_t prememcpy;
53 extern uint32_t postmemcpy;
54 
55 extern pthread_mutex_t count_lock;
56 extern pthread_cond_t count_cond;
57 extern volatile uint32_t count;
58 
59 extern int verbose;
60 #define printfv(format, args...)                                                                   \
61         {                                                                                          \
62                 if (verbose)                                                                       \
63                         printf(format, ##args);                                                    \
64         }
65 
66 #endif /* ISAL_MULTITHREAD_PERF_H_ */
67