1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
5 #ifndef TEST_BBDEV_VECTOR_H_
6 #define TEST_BBDEV_VECTOR_H_
8 #include <rte_bbdev_op.h>
10 /* Flags which are set when specific parameter is define in vector file */
12 TEST_BBDEV_VF_E = (1ULL << 0),
13 TEST_BBDEV_VF_EA = (1ULL << 1),
14 TEST_BBDEV_VF_EB = (1ULL << 2),
15 TEST_BBDEV_VF_K = (1ULL << 3),
16 TEST_BBDEV_VF_K_NEG = (1ULL << 4),
17 TEST_BBDEV_VF_K_POS = (1ULL << 5),
18 TEST_BBDEV_VF_C_NEG = (1ULL << 6),
19 TEST_BBDEV_VF_C = (1ULL << 7),
20 TEST_BBDEV_VF_CAB = (1ULL << 8),
21 TEST_BBDEV_VF_RV_INDEX = (1ULL << 9),
22 TEST_BBDEV_VF_ITER_MAX = (1ULL << 10),
23 TEST_BBDEV_VF_ITER_MIN = (1ULL << 11),
24 TEST_BBDEV_VF_EXPECTED_ITER_COUNT = (1ULL << 12),
25 TEST_BBDEV_VF_EXT_SCALE = (1ULL << 13),
26 TEST_BBDEV_VF_NUM_MAPS = (1ULL << 14),
27 TEST_BBDEV_VF_NCB = (1ULL << 15),
28 TEST_BBDEV_VF_NCB_NEG = (1ULL << 16),
29 TEST_BBDEV_VF_NCB_POS = (1ULL << 17),
30 TEST_BBDEV_VF_R = (1ULL << 18),
31 TEST_BBDEV_VF_BG = (1ULL << 19),
32 TEST_BBDEV_VF_ZC = (1ULL << 20),
33 TEST_BBDEV_VF_F = (1ULL << 21),
34 TEST_BBDEV_VF_QM = (1ULL << 22),
35 TEST_BBDEV_VF_CODE_BLOCK_MODE = (1ULL << 23),
36 TEST_BBDEV_VF_OP_FLAGS = (1ULL << 24),
37 TEST_BBDEV_VF_EXPECTED_STATUS = (1ULL << 25),
54 struct op_data_entries {
55 struct op_data_buf segments[RTE_BBDEV_TURBO_MAX_CODE_BLOCKS];
56 unsigned int nb_segments;
59 struct test_bbdev_vector {
60 enum rte_bbdev_op_type op_type;
64 struct rte_bbdev_op_turbo_dec turbo_dec;
65 struct rte_bbdev_op_turbo_enc turbo_enc;
66 struct rte_bbdev_op_ldpc_dec ldpc_dec;
67 struct rte_bbdev_op_ldpc_enc ldpc_enc;
69 /* Additional storage for op data entries */
70 struct op_data_entries entries[DATA_NUM_TYPES];
73 /* fills test vector parameters based on test file */
75 test_bbdev_vector_read(const char *filename,
76 struct test_bbdev_vector *vector);
79 #endif /* TEST_BBDEV_VECTOR_H_ */