+
nb_queues = RTE_MIN(rte_lcore_count(), info-
drv.max_num_queues);
nb_queues = RTE_MIN(nb_queues, (unsigned int) MAX_QUEUES);
@@ -2583,7 +2592,8 @@ validate_ldpc_enc_op(struct rte_bbdev_enc_op
**ops, const uint16_t n,
}
static inline int
-validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
op_data_entries *orig_op)
+validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
op_data_entries *orig_op,
+ bool skip_validate_output)
{
struct rte_mbuf *m = op->data;
uint8_t i, nb_dst_segments = orig_op->nb_segments; @@ -2613,7
+2623,7 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct
op_data_entries *orig
abs_delt = delt > 0 ? delt : -delt;
error_num += (abs_delt > thres_hold ? 1 : 0);
}
- if (error_num > 0) {
+ if ((error_num > 0) && !skip_validate_output) {
rte_memdump(stdout, "Buffer A", ref_out, data_len);
rte_memdump(stdout, "Buffer B", op_out, data_len);
TEST_ASSERT(error_num == 0,
@@ -2686,16 +2696,24 @@ validate_fft_op(struct rte_bbdev_fft_op **ops,
const uint16_t n,
int ret;
struct op_data_entries *fft_data_orig =
&test_vector.entries[DATA_HARD_OUTPUT];
struct op_data_entries *fft_pwr_orig =
&test_vector.entries[DATA_SOFT_OUTPUT];
+ bool skip_validate_output = false;
+
+ if ((test_vector.fft_window_width_vec > 0) &&
+ (test_vector.fft_window_width_vec !=
fft_window_width_dev)) {
+ printf("The vector FFT width doesn't match with device - skip
%d %d\n",
+ test_vector.fft_window_width_vec,
fft_window_width_dev);
+ skip_validate_output = true;
+ }
for (i = 0; i < n; ++i) {
ret = check_fft_status_and_ordering(ops[i], i, ref_op->status);
TEST_ASSERT_SUCCESS(ret, "Checking status and ordering for
FFT failed");
TEST_ASSERT_SUCCESS(validate_op_fft_chain(
- &ops[i]->fft.base_output, fft_data_orig),
+ &ops[i]->fft.base_output, fft_data_orig,
skip_validate_output),
"FFT Output buffers (op=%u) are not
matched", i);
if (check_bit(ops[i]->fft.op_flags,
RTE_BBDEV_FFT_POWER_MEAS))
TEST_ASSERT_SUCCESS(validate_op_fft_chain(
- &ops[i]->fft.power_meas_output,
fft_pwr_orig),
+ &ops[i]->fft.power_meas_output,
fft_pwr_orig,
+skip_validate_output),
"FFT Power Output buffers (op=%u) are not
matched", i);
}
diff --git a/app/test-bbdev/test_bbdev_vector.c
b/app/test-bbdev/test_bbdev_vector.c
index b3e9d4bb7504..e48947b211ac 100644
--- a/app/test-bbdev/test_bbdev_vector.c
+++ b/app/test-bbdev/test_bbdev_vector.c
@@ -1050,6 +1050,20 @@ parse_fft_params(const char *key_token, char
*token,
}
}
ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+ } else if (!strcmp(key_token, "fft_window_width")) {
+ tok = strtok(token, VALUE_DELIMITER);
+ if (tok == NULL)
+ return -1;
+ for (i = 0; i < FFT_WIN_SIZE; i++) {
+ if (i == 0)
+ vector->fft_window_width_vec = (uint32_t)
strtoul(tok, &err, 0);
+ if (i < (FFT_WIN_SIZE - 1)) {
+ tok = strtok(NULL, VALUE_DELIMITER);
+ if (tok == NULL)
+ return -1;
+ }
+ }
+ ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
} else if (!strcmp(key_token, "op_flags")) {
vector->mask |= TEST_BBDEV_VF_OP_FLAGS;
ret = parse_turbo_flags(token, &op_flags, vector->op_type);
diff
--git a/app/test-bbdev/test_bbdev_vector.h
b/app/test-bbdev/test_bbdev_vector.h
index 14b8ef2764ad..ba1d0d20f9ea 100644
--- a/app/test-bbdev/test_bbdev_vector.h
+++ b/app/test-bbdev/test_bbdev_vector.h
@@ -69,6 +69,8 @@ struct test_bbdev_vector {
};
/* Additional storage for op data entries */
struct op_data_entries entries[DATA_NUM_TYPES];
+ /* Vector FFT window width assumption. */
+ uint16_t fft_window_width_vec;
};
/* fills test vector parameters based on test file */