From: Nicolas Chautru <nicolas.chautru@intel.com>
To: dev@dpdk.org, maxime.coquelin@redhat.com
Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com,
hernan.vargas@intel.com, stable@dpdk.org
Subject: [PATCH v3 08/10] test/bbdev: support new FFT capabilities
Date: Fri, 3 Nov 2023 23:34:11 +0000 [thread overview]
Message-ID: <20231103233413.756110-9-nicolas.chautru@intel.com> (raw)
In-Reply-To: <20231103233413.756110-1-nicolas.chautru@intel.com>
From: Hernan Vargas <hernan.vargas@intel.com>
Adding support to test new FFT capabilities.
Optional frequency domain dewindowing, frequency resampling,
timing error correction and time offset per CS.
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev_perf.c | 26 ++++++++++---
app/test-bbdev/test_bbdev_vector.c | 61 ++++++++++++++++++++++++++++--
2 files changed, 78 insertions(+), 9 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index d2e3542356..84596e28da 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -864,6 +864,7 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,
conf.q_fft.num_qgroups = VRB_QMGR_NUM_QGS;
conf.q_fft.first_qgroup_index = VRB_QMGR_INVALID_IDX;
conf.q_fft.num_aqs_per_groups = VRB_QMGR_NUM_AQS;
+ conf.q_fft.aq_depth_log2 = VRB_QMGR_AQ_DEPTH;
conf.q_mld.num_qgroups = VRB_QMGR_NUM_QGS;
conf.q_mld.first_qgroup_index = VRB_QMGR_INVALID_IDX;
conf.q_mld.num_aqs_per_groups = VRB_QMGR_NUM_AQS;
@@ -1970,7 +1971,7 @@ static void
copy_reference_fft_op(struct rte_bbdev_fft_op **ops, unsigned int n,
unsigned int start_idx, struct rte_bbdev_op_data *inputs,
struct rte_bbdev_op_data *outputs, struct rte_bbdev_op_data *pwrouts,
- struct rte_bbdev_fft_op *ref_op)
+ struct rte_bbdev_op_data *win_inputs, struct rte_bbdev_fft_op *ref_op)
{
unsigned int i, j;
struct rte_bbdev_op_fft *fft = &ref_op->fft;
@@ -1982,6 +1983,11 @@ copy_reference_fft_op(struct rte_bbdev_fft_op **ops, unsigned int n,
fft->output_leading_depadding;
for (j = 0; j < RTE_BBDEV_MAX_CS_2; j++)
ops[i]->fft.window_index[j] = fft->window_index[j];
+ for (j = 0; j < RTE_BBDEV_MAX_CS; j++) {
+ ops[i]->fft.cs_theta_0[j] = fft->cs_theta_0[j];
+ ops[i]->fft.cs_theta_d[j] = fft->cs_theta_d[j];
+ ops[i]->fft.time_offset[j] = fft->time_offset[j];
+ }
ops[i]->fft.cs_bitmap = fft->cs_bitmap;
ops[i]->fft.num_antennas_log2 = fft->num_antennas_log2;
ops[i]->fft.idft_log2 = fft->idft_log2;
@@ -1992,8 +1998,12 @@ copy_reference_fft_op(struct rte_bbdev_fft_op **ops, unsigned int n,
ops[i]->fft.ncs_reciprocal = fft->ncs_reciprocal;
ops[i]->fft.power_shift = fft->power_shift;
ops[i]->fft.fp16_exp_adjust = fft->fp16_exp_adjust;
+ ops[i]->fft.output_depadded_size = fft->output_depadded_size;
+ ops[i]->fft.freq_resample_mode = fft->freq_resample_mode;
ops[i]->fft.base_output = outputs[start_idx + i];
ops[i]->fft.base_input = inputs[start_idx + i];
+ if (win_inputs != NULL)
+ ops[i]->fft.dewindowing_input = win_inputs[start_idx + i];
if (pwrouts != NULL)
ops[i]->fft.power_meas_output = pwrouts[start_idx + i];
ops[i]->fft.op_flags = fft->op_flags;
@@ -2575,7 +2585,7 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig
{
struct rte_mbuf *m = op->data;
uint8_t i, nb_dst_segments = orig_op->nb_segments;
- int16_t delt, abs_delt, thres_hold = 3;
+ int16_t delt, abs_delt, thres_hold = 4;
uint32_t j, data_len_iq, error_num;
int16_t *ref_out, *op_out;
@@ -2754,6 +2764,9 @@ create_reference_fft_op(struct rte_bbdev_fft_op *op)
entry = &test_vector.entries[DATA_INPUT];
for (i = 0; i < entry->nb_segments; ++i)
op->fft.base_input.length += entry->segments[i].length;
+ entry = &test_vector.entries[DATA_HARQ_INPUT];
+ for (i = 0; i < entry->nb_segments; ++i)
+ op->fft.dewindowing_input.length += entry->segments[i].length;
}
static void
@@ -3722,7 +3735,8 @@ throughput_intr_lcore_fft(void *arg)
num_to_process);
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_fft_op(ops, num_to_process, 0, bufs->inputs,
- bufs->hard_outputs, bufs->soft_outputs, tp->op_params->ref_fft_op);
+ bufs->hard_outputs, bufs->soft_outputs, bufs->harq_inputs,
+ tp->op_params->ref_fft_op);
/* Set counter to validate the ordering */
for (j = 0; j < num_to_process; ++j)
@@ -4596,7 +4610,7 @@ throughput_pmd_lcore_fft(void *arg)
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_fft_op(ops_enq, num_ops, 0, bufs->inputs,
- bufs->hard_outputs, bufs->soft_outputs, ref_op);
+ bufs->hard_outputs, bufs->soft_outputs, bufs->harq_inputs, ref_op);
/* Set counter to validate the ordering */
for (j = 0; j < num_ops; ++j)
@@ -5452,7 +5466,7 @@ latency_test_fft(struct rte_mempool *mempool,
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_fft_op(ops_enq, burst_sz, dequeued,
bufs->inputs,
- bufs->hard_outputs, bufs->soft_outputs,
+ bufs->hard_outputs, bufs->soft_outputs, bufs->harq_inputs,
ref_op);
/* Set counter to validate the ordering */
@@ -5714,7 +5728,7 @@ offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs,
if (test_vector.op_type != RTE_BBDEV_OP_NONE)
copy_reference_fft_op(ops_enq, burst_sz, dequeued,
bufs->inputs,
- bufs->hard_outputs, bufs->soft_outputs,
+ bufs->hard_outputs, bufs->soft_outputs, bufs->harq_inputs,
ref_op);
/* Start time meas for enqueue function offload latency */
diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
index 8f464db838..56b882533c 100644
--- a/app/test-bbdev/test_bbdev_vector.c
+++ b/app/test-bbdev/test_bbdev_vector.c
@@ -215,7 +215,6 @@ op_ldpc_decoder_flag_strtoul(char *token, uint32_t *op_flag_value)
return 0;
}
-
/* Convert FFT flag from string to unsigned long int. */
static int
op_fft_flag_strtoul(char *token, uint32_t *op_flag_value)
@@ -236,6 +235,14 @@ op_fft_flag_strtoul(char *token, uint32_t *op_flag_value)
*op_flag_value = RTE_BBDEV_FFT_FP16_INPUT;
else if (!strcmp(token, "RTE_BBDEV_FFT_FP16_OUTPUT"))
*op_flag_value = RTE_BBDEV_FFT_FP16_OUTPUT;
+ else if (!strcmp(token, "RTE_BBDEV_FFT_TIMING_OFFSET_PER_CS"))
+ *op_flag_value = RTE_BBDEV_FFT_TIMING_OFFSET_PER_CS;
+ else if (!strcmp(token, "RTE_BBDEV_FFT_TIMING_ERROR"))
+ *op_flag_value = RTE_BBDEV_FFT_TIMING_ERROR;
+ else if (!strcmp(token, "RTE_BBDEV_FFT_DEWINDOWING"))
+ *op_flag_value = RTE_BBDEV_FFT_DEWINDOWING;
+ else if (!strcmp(token, "RTE_BBDEV_FFT_FREQ_RESAMPLING"))
+ *op_flag_value = RTE_BBDEV_FFT_FREQ_RESAMPLING;
else {
printf("The given value is not a FFT flag\n");
return -1;
@@ -907,8 +914,7 @@ parse_ldpc_decoder_params(const char *key_token, char *token,
return 0;
}
-
-/* Parse FFT parameters and assigns to global variable. */
+/* Parses FFT parameters and assigns to global variable. */
static int
parse_fft_params(const char *key_token, char *token,
struct test_bbdev_vector *vector)
@@ -923,6 +929,10 @@ parse_fft_params(const char *key_token, char *token,
ret = parse_data_entry(key_token, token, vector,
DATA_INPUT,
op_data_prefixes[DATA_INPUT]);
+ } else if (starts_with(key_token, "dewin_input")) {
+ ret = parse_data_entry(key_token, token, vector,
+ DATA_HARQ_INPUT,
+ "dewin_input");
} else if (starts_with(key_token, "output")) {
ret = parse_data_entry(key_token, token, vector,
DATA_HARD_OUTPUT,
@@ -989,6 +999,51 @@ parse_fft_params(const char *key_token, char *token,
fft->fp16_exp_adjust = (uint32_t) strtoul(token, &err, 0);
printf("%d\n", fft->fp16_exp_adjust);
ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+ } else if (!strcmp(key_token, "freq_resample_mode")) {
+ fft->freq_resample_mode = (uint32_t) strtoul(token, &err, 0);
+ ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+ } else if (!strcmp(key_token, "out_depadded_size")) {
+ fft->output_depadded_size = (uint32_t) strtoul(token, &err, 0);
+ ret = ((err == NULL) || (*err != '\0')) ? -1 : 0;
+ } else if (!strcmp(key_token, "cs_theta_0")) {
+ tok = strtok(token, VALUE_DELIMITER);
+ if (tok == NULL)
+ return -1;
+ for (i = 0; i < FFT_WIN_SIZE; i++) {
+ fft->cs_theta_0[i] = (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, "cs_theta_d")) {
+ tok = strtok(token, VALUE_DELIMITER);
+ if (tok == NULL)
+ return -1;
+ for (i = 0; i < FFT_WIN_SIZE; i++) {
+ fft->cs_theta_d[i] = (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, "time_offset")) {
+ tok = strtok(token, VALUE_DELIMITER);
+ if (tok == NULL)
+ return -1;
+ for (i = 0; i < FFT_WIN_SIZE; i++) {
+ fft->time_offset[i] = (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);
--
2.34.1
next prev parent reply other threads:[~2023-11-03 23:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 23:34 [PATCH v3 00/10] test-bbdev changes for 23.11 Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 01/10] test/bbdev: fix python script subprocess Nicolas Chautru
2023-11-09 12:37 ` Maxime Coquelin
2023-11-03 23:34 ` [PATCH v3 02/10] test/bbdev: rename macros from acc200 to vrb Nicolas Chautru
2023-11-09 12:37 ` Maxime Coquelin
2023-11-03 23:34 ` [PATCH v3 03/10] test/bbdev: handle exception for LLR generation Nicolas Chautru
2023-11-09 12:46 ` Maxime Coquelin
2023-11-03 23:34 ` [PATCH v3 04/10] test/bbdev: improve test log messages Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 05/10] test/bbdev: assert failed test for queue configure Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 06/10] test/bbdev: ldpc encoder concatenation vector Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 07/10] test/bbdev: add MLD support Nicolas Chautru
2023-11-09 15:44 ` Maxime Coquelin
2023-11-03 23:34 ` Nicolas Chautru [this message]
2023-11-03 23:34 ` [PATCH v3 09/10] test/bbdev: support 4 bit LLR compression Nicolas Chautru
2023-11-03 23:34 ` [PATCH v3 10/10] test/bbdev: update python script parameters Nicolas Chautru
2023-11-09 10:16 ` Maxime Coquelin
2023-11-09 15:37 ` Chautru, Nicolas
2023-11-09 15:51 ` [PATCH v3 00/10] test-bbdev changes for 23.11 Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231103233413.756110-9-nicolas.chautru@intel.com \
--to=nicolas.chautru@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=hernan.vargas@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).