DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chautru, Nicolas" <nicolas.chautru@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	"Vargas, Hernan" <hernan.vargas@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"gakhil@marvell.com" <gakhil@marvell.com>,
	"trix@redhat.com" <trix@redhat.com>
Cc: "Zhang, Qi Z" <qi.z.zhang@intel.com>
Subject: RE: [PATCH v1 7/9] test/bbdev: check assumptions on fft window
Date: Thu, 20 Jun 2024 18:11:54 +0000	[thread overview]
Message-ID: <SJ0PR11MB669473725570BF6A79F6211CF8C82@SJ0PR11MB6694.namprd11.prod.outlook.com> (raw)
In-Reply-To: <3dad37e0-9953-414f-8ea0-d7834a433cf2@redhat.com>

Hi Maxime, 

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, June 12, 2024 4:11 AM
> To: Vargas, Hernan <hernan.vargas@intel.com>; dev@dpdk.org;
> gakhil@marvell.com; trix@redhat.com
> Cc: Chautru, Nicolas <nicolas.chautru@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Subject: Re: [PATCH v1 7/9] test/bbdev: check assumptions on fft window
> 
> 
> 
> On 4/22/24 21:07, Hernan Vargas wrote:
> > Add check for FFT window width.
> >
> > Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> > ---
> >   app/test-bbdev/test_bbdev_perf.c   | 26 ++++++++++++++++++++++----
> >   app/test-bbdev/test_bbdev_vector.c | 14 ++++++++++++++
> >   app/test-bbdev/test_bbdev_vector.h |  2 ++
> >   3 files changed, 38 insertions(+), 4 deletions(-)
> >
> > diff --git a/app/test-bbdev/test_bbdev_perf.c
> > b/app/test-bbdev/test_bbdev_perf.c
> > index 28d78e73a9c1..57b21730cab2 100644
> > --- a/app/test-bbdev/test_bbdev_perf.c
> > +++ b/app/test-bbdev/test_bbdev_perf.c
> > @@ -106,6 +106,8 @@ static int ldpc_llr_decimals;
> >   static int ldpc_llr_size;
> >   /* Keep track of the LDPC decoder device capability flag */
> >   static uint32_t ldpc_cap_flags;
> > +/* FFT window width predefined on device and on vector. */ static int
> > +fft_window_width_dev;
> >
> >   /* Represents tested active devices */
> >   static struct active_device {
> > @@ -881,6 +883,13 @@ add_bbdev_dev(uint8_t dev_id, struct
> rte_bbdev_info *info,
> >   	rte_bbdev_info_get(dev_id, info);
> >   	if (info->drv.device_status == RTE_BBDEV_DEV_FATAL_ERR)
> >   		printf("Device Status %s\n",
> > rte_bbdev_device_status_str(info->drv.device_status));
> > +	if (info->drv.fft_window_width != NULL)
> > +		fft_window_width_dev = info->drv.fft_window_width[0];
> > +	else
> > +		fft_window_width_dev = 0;
> > +	if (fft_window_width_dev != 0)
> > +		printf("  FFT Window0 width %d\n", fft_window_width_dev);
> 
> Why not print the value systematically?

It would only be zero if the application was not able to get that information, hence that would be irrelevant. 

> 
> > +
> >   	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 */


  reply	other threads:[~2024-06-20 18:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 19:07 [PATCH v1 0/9] test-bbdev fixes and improvements for 24.07 Hernan Vargas
2024-04-22 19:07 ` [PATCH v1 1/9] test/bbdev: fix TB logic Hernan Vargas
2024-06-12  9:18   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 2/9] test/bbdev: fix MLD output size computation Hernan Vargas
2024-06-12  9:25   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 3/9] test/bbdev: fix interrupt tests Hernan Vargas
2024-06-12  9:27   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 4/9] test/bbdev: change iter-max argument Hernan Vargas
2024-06-12  9:37   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 5/9] test/bbdev: improve timeout message format Hernan Vargas
2024-06-12 10:36   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 6/9] test/bbdev: add soft output parsing capability Hernan Vargas
2024-06-12 11:09   ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 7/9] test/bbdev: check assumptions on fft window Hernan Vargas
2024-06-12 11:11   ` Maxime Coquelin
2024-06-20 18:11     ` Chautru, Nicolas [this message]
2024-06-24  7:48       ` Maxime Coquelin
2024-04-22 19:07 ` [PATCH v1 8/9] test/bbdev: update fft measurement output Hernan Vargas
2024-06-12 11:12   ` Maxime Coquelin
2024-04-22 19:08 ` [PATCH v1 9/9] test/bbdev: remove unnecessary line Hernan Vargas
2024-06-12 11:13   ` 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=SJ0PR11MB669473725570BF6A79F6211CF8C82@SJ0PR11MB6694.namprd11.prod.outlook.com \
    --to=nicolas.chautru@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hernan.vargas@intel.com \
    --cc=maxime.coquelin@redhat.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).