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")
16 #define CPERF_DEVTYPE ("devtype")
17 #define CPERF_OPTYPE ("optype")
18 #define CPERF_SESSIONLESS ("sessionless")
19 #define CPERF_OUT_OF_PLACE ("out-of-place")
20 #define CPERF_TEST_FILE ("test-file")
21 #define CPERF_TEST_NAME ("test-name")
23 #define CPERF_CIPHER_ALGO ("cipher-algo")
24 #define CPERF_CIPHER_OP ("cipher-op")
25 #define CPERF_CIPHER_KEY_SZ ("cipher-key-sz")
26 #define CPERF_CIPHER_IV_SZ ("cipher-iv-sz")
28 #define CPERF_AUTH_ALGO ("auth-algo")
29 #define CPERF_AUTH_OP ("auth-op")
30 #define CPERF_AUTH_KEY_SZ ("auth-key-sz")
31 #define CPERF_AUTH_DIGEST_SZ ("auth-digest-sz")
32 #define CPERF_AUTH_AAD_SZ ("auth-aad-sz")
33 #define CPERF_CSV ("csv-friendly")
37 enum cperf_perf_test_type {
38 CPERF_TEST_TYPE_THROUGHPUT,
39 CPERF_TEST_TYPE_LATENCY,
40 CPERF_TEST_TYPE_VERIFY
44 extern const char *cperf_test_type_strs[];
47 CPERF_CIPHER_ONLY = 1,
49 CPERF_CIPHER_THEN_AUTH,
50 CPERF_AUTH_THEN_CIPHER,
54 extern const char *cperf_op_type_strs[];
56 struct cperf_options {
57 enum cperf_perf_test_type test;
62 uint32_t test_buffer_size;
64 uint32_t sessionless:1;
65 uint32_t out_of_place:1;
69 enum rte_crypto_cipher_algorithm cipher_algo;
70 enum rte_crypto_cipher_operation cipher_op;
72 uint16_t cipher_key_sz;
73 uint16_t cipher_iv_sz;
75 enum rte_crypto_auth_algorithm auth_algo;
76 enum rte_crypto_auth_operation auth_op;
79 uint16_t auth_digest_sz;
82 char device_type[RTE_CRYPTODEV_NAME_LEN];
83 enum cperf_op_type op_type;
88 uint32_t buffer_size_list[MAX_LIST];
89 uint8_t buffer_size_count;
90 uint32_t max_buffer_size;
91 uint32_t min_buffer_size;
92 uint32_t inc_buffer_size;
94 uint32_t burst_size_list[MAX_LIST];
95 uint8_t burst_size_count;
96 uint32_t max_burst_size;
97 uint32_t min_burst_size;
98 uint32_t inc_burst_size;
103 cperf_options_default(struct cperf_options *options);
106 cperf_options_parse(struct cperf_options *options,
107 int argc, char **argv);
110 cperf_options_check(struct cperf_options *options);
113 cperf_options_dump(struct cperf_options *options);