2 #ifndef _CPERF_OPTIONS_
3 #define _CPERF_OPTIONS_
5 #include <rte_crypto.h>
7 #define CPERF_PTEST_TYPE ("ptest")
8 #define CPERF_SILENT ("silent")
10 #define CPERF_POOL_SIZE ("pool-sz")
11 #define CPERF_TOTAL_OPS ("total-ops")
12 #define CPERF_BURST_SIZE ("burst-sz")
13 #define CPERF_BUFFER_SIZE ("buffer-sz")
14 #define CPERF_SEGMENTS_NB ("segments-nb")
15 #define CPERF_DESC_NB ("desc-nb")
17 #define CPERF_DEVTYPE ("devtype")
18 #define CPERF_OPTYPE ("optype")
19 #define CPERF_SESSIONLESS ("sessionless")
20 #define CPERF_OUT_OF_PLACE ("out-of-place")
21 #define CPERF_TEST_FILE ("test-file")
22 #define CPERF_TEST_NAME ("test-name")
24 #define CPERF_CIPHER_ALGO ("cipher-algo")
25 #define CPERF_CIPHER_OP ("cipher-op")
26 #define CPERF_CIPHER_KEY_SZ ("cipher-key-sz")
27 #define CPERF_CIPHER_IV_SZ ("cipher-iv-sz")
29 #define CPERF_AUTH_ALGO ("auth-algo")
30 #define CPERF_AUTH_OP ("auth-op")
31 #define CPERF_AUTH_KEY_SZ ("auth-key-sz")
32 #define CPERF_AUTH_IV_SZ ("auth-iv-sz")
34 #define CPERF_AEAD_ALGO ("aead-algo")
35 #define CPERF_AEAD_OP ("aead-op")
36 #define CPERF_AEAD_KEY_SZ ("aead-key-sz")
37 #define CPERF_AEAD_IV_SZ ("aead-iv-sz")
38 #define CPERF_AEAD_AAD_SZ ("aead-aad-sz")
40 #define CPERF_DIGEST_SZ ("digest-sz")
42 #define CPERF_CSV ("csv-friendly")
46 enum cperf_perf_test_type {
47 CPERF_TEST_TYPE_THROUGHPUT,
48 CPERF_TEST_TYPE_LATENCY,
49 CPERF_TEST_TYPE_VERIFY
53 extern const char *cperf_test_type_strs[];
56 CPERF_CIPHER_ONLY = 1,
58 CPERF_CIPHER_THEN_AUTH,
59 CPERF_AUTH_THEN_CIPHER,
63 extern const char *cperf_op_type_strs[];
65 struct cperf_options {
66 enum cperf_perf_test_type test;
71 uint32_t test_buffer_size;
72 uint32_t nb_descriptors;
74 uint32_t sessionless:1;
75 uint32_t out_of_place:1;
79 enum rte_crypto_cipher_algorithm cipher_algo;
80 enum rte_crypto_cipher_operation cipher_op;
82 uint16_t cipher_key_sz;
83 uint16_t cipher_iv_sz;
85 enum rte_crypto_auth_algorithm auth_algo;
86 enum rte_crypto_auth_operation auth_op;
91 enum rte_crypto_aead_algorithm aead_algo;
92 enum rte_crypto_aead_operation aead_op;
100 char device_type[RTE_CRYPTODEV_NAME_LEN];
101 enum cperf_op_type op_type;
106 uint32_t buffer_size_list[MAX_LIST];
107 uint8_t buffer_size_count;
108 uint32_t max_buffer_size;
109 uint32_t min_buffer_size;
110 uint32_t inc_buffer_size;
112 uint32_t burst_size_list[MAX_LIST];
113 uint8_t burst_size_count;
114 uint32_t max_burst_size;
115 uint32_t min_burst_size;
116 uint32_t inc_burst_size;
121 cperf_options_default(struct cperf_options *options);
124 cperf_options_parse(struct cperf_options *options,
125 int argc, char **argv);
128 cperf_options_check(struct cperf_options *options);
131 cperf_options_dump(struct cperf_options *options);