DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Hernan Vargas <hernan.vargas@intel.com>,
	dev@dpdk.org, gakhil@marvell.com, trix@redhat.com
Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com
Subject: Re: [PATCH v1 10/11] test/bbdev: support new FFT capabilities
Date: Tue, 17 Oct 2023 22:06:57 +0200	[thread overview]
Message-ID: <7ea0fdcc-a8b0-447a-9066-e90d91f375b4@redhat.com> (raw)
In-Reply-To: <20230929181328.104311-11-hernan.vargas@intel.com>



On 9/29/23 20:13, Hernan Vargas wrote:
> 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>
> ---
>   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 8a349fdb03d5..82deb9b1b4b9 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 8f464db83882..56b882533cda 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);

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2023-10-17 20:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 18:13 [PATCH v1 00/11] test-bbdev changes for 23.11 Hernan Vargas
2023-09-29 18:13 ` [PATCH v1 01/11] test/bbdev: fix python script subprocess Hernan Vargas
2023-10-17 19:05   ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 02/11] test/bbdev: update python script parameters Hernan Vargas
2023-10-17 19:07   ` Maxime Coquelin
2023-10-19  9:01     ` Chautru, Nicolas
2023-10-19  9:19       ` Maxime Coquelin
2023-10-19 12:09         ` Chautru, Nicolas
2023-10-19 12:20           ` Maxime Coquelin
2023-10-27 20:02           ` Chautru, Nicolas
2023-11-02 17:00             ` Maxime Coquelin
2023-11-02 18:18               ` Chautru, Nicolas
2023-11-03  9:48                 ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 03/11] test/bbdev: rename macros from acc200 to vrb Hernan Vargas
2023-10-17 19:30   ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 04/11] test/bbdev: handle exception for LLR generation Hernan Vargas
2023-10-17 19:30   ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 05/11] test/bbdev: improve test log messages Hernan Vargas
2023-10-17 19:40   ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 06/11] test/bbdev: assert failed test for queue configure Hernan Vargas
2023-10-17 19:43   ` Maxime Coquelin
2023-10-19  8:41     ` Chautru, Nicolas
2023-10-19  8:47       ` Maxime Coquelin
2023-10-19 12:12         ` Chautru, Nicolas
2023-10-23  9:05           ` Maxime Coquelin
2023-10-23  9:07             ` Maxime Coquelin
2023-10-23 15:10               ` Kevin Traynor
2023-09-29 18:13 ` [PATCH v1 07/11] test/bbdev: ldpc encoder concatenation vector Hernan Vargas
2023-10-17 19:44   ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 08/11] test/bbdev: increase max burst size Hernan Vargas
2023-10-17 19:45   ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 09/11] test/bbdev: add MLD support Hernan Vargas
2023-10-17 20:03   ` Maxime Coquelin
2023-09-29 18:13 ` [PATCH v1 10/11] test/bbdev: support new FFT capabilities Hernan Vargas
2023-10-17 20:06   ` Maxime Coquelin [this message]
2023-09-29 18:13 ` [PATCH v1 11/11] test/bbdev: support 4 bit LLR compression Hernan Vargas
2023-10-17 20:08   ` 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=7ea0fdcc-a8b0-447a-9066-e90d91f375b4@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hernan.vargas@intel.com \
    --cc=nicolas.chautru@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=trix@redhat.com \
    /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).