DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Nicolas Chautru <nicolas.chautru@intel.com>, dev@dpdk.org
Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com,
	hernan.vargas@intel.com
Subject: Re: [PATCH v3 02/12] baseband/acc: add FFT window width in the VRB PMD
Date: Tue, 3 Oct 2023 13:52:28 +0200	[thread overview]
Message-ID: <3fc8f63e-a242-35e5-1563-9df30d258f73@redhat.com> (raw)
In-Reply-To: <20230929163516.3636499-3-nicolas.chautru@intel.com>



On 9/29/23 18:35, Nicolas Chautru wrote:
> This allows to expose the FFT window width being introduced in
> previous commit based on what is configured dynamically on the
> device platform.
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>   drivers/baseband/acc/acc_common.h  |  3 +++
>   drivers/baseband/acc/rte_vrb_pmd.c | 29 +++++++++++++++++++++++++++++
>   2 files changed, 32 insertions(+)
> 
> diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
> index 5bb00746c3..7d24c644c0 100644
> --- a/drivers/baseband/acc/acc_common.h
> +++ b/drivers/baseband/acc/acc_common.h
> @@ -512,6 +512,8 @@ struct acc_deq_intr_details {
>   enum {
>   	ACC_VF2PF_STATUS_REQUEST = 1,
>   	ACC_VF2PF_USING_VF = 2,
> +	ACC_VF2PF_LUT_VER_REQUEST = 3,
> +	ACC_VF2PF_FFT_WIN_REQUEST = 4,
>   };
>   
>   
> @@ -558,6 +560,7 @@ struct acc_device {
>   	queue_offset_fun_t queue_offset;  /* Device specific queue offset */
>   	uint16_t num_qgroups;
>   	uint16_t num_aqs;
> +	uint16_t fft_window_width[RTE_BBDEV_MAX_FFT_WIN]; /* FFT windowing width. */
>   };
>   
>   /* Structure associated with each queue. */
> diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
> index 9e5a73c9c7..c5a74bae11 100644
> --- a/drivers/baseband/acc/rte_vrb_pmd.c
> +++ b/drivers/baseband/acc/rte_vrb_pmd.c
> @@ -298,6 +298,34 @@ vrb_device_status(struct rte_bbdev *dev)
>   	return reg;
>   }
>   
> +/* Request device FFT windowing information. */
> +static inline void
> +vrb_device_fft_win(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
> +{
> +	struct acc_device *d = dev->data->dev_private;
> +	uint32_t reg, time_out = 0, win;
> +
> +	if (d->pf_device)
> +		return;
> +
> +	/* Check from the device the first time. */
> +	if (d->fft_window_width[0] == 0) {

O is not a possible value? Might not be a big deal as it would just
perform reading of 16 x 2 registers every time .info_get() is called,
just wondering.

> +		for (win = 0; win < RTE_BBDEV_MAX_FFT_WIN; win++) {
> +			vrb_vf2pf(d, ACC_VF2PF_FFT_WIN_REQUEST | win);

That looks broken, as extending RTE_BBDEV_MAX_FFT_WIN to support other
devices may break this implementation.

To me, it tends to show how this fft_window_width array is more device
specific than generic.

> +			reg = acc_reg_read(d, d->reg_addr->pf2vf_doorbell);
> +			while ((time_out < ACC_STATUS_TO) && (reg == RTE_BBDEV_DEV_NOSTATUS)) {
> +				usleep(ACC_STATUS_WAIT); /*< Wait or VF->PF->VF Comms */
> +				reg = acc_reg_read(d, d->reg_addr->pf2vf_doorbell);
> +				time_out++;
> +			}
> +			d->fft_window_width[win] = reg;
> +		}
> +	}
> +
> +	for (win = 0; win < RTE_BBDEV_MAX_FFT_WIN; win++)
> +		dev_info->fft_window_width[win] = d->fft_window_width[win];
> +}
> +
>   /* Checks PF Info Ring to find the interrupt cause and handles it accordingly. */
>   static inline void
>   vrb_check_ir(struct acc_device *acc_dev)
> @@ -1100,6 +1128,7 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
>   	fetch_acc_config(dev);
>   	/* Check the status of device. */
>   	dev_info->device_status = vrb_device_status(dev);
> +	vrb_device_fft_win(dev, dev_info);
>   
>   	/* Exposed number of queues. */
>   	dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;


  reply	other threads:[~2023-10-03 11:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 16:35 [PATCH v3 00/12] VRB2 bbdev PMD introduction Nicolas Chautru
2023-09-29 16:35 ` [PATCH v3 01/12] bbdev: add FFT window width member in driver info Nicolas Chautru
2023-09-29 16:35 ` [PATCH v3 02/12] baseband/acc: add FFT window width in the VRB PMD Nicolas Chautru
2023-10-03 11:52   ` Maxime Coquelin [this message]
2023-10-03 19:06     ` Chautru, Nicolas
2023-10-04  7:55       ` Maxime Coquelin
2023-09-29 16:35 ` [PATCH v3 03/12] baseband/acc: remove the 4G SO capability for VRB1 Nicolas Chautru
2023-10-03 12:04   ` Maxime Coquelin
2023-09-29 16:35 ` [PATCH v3 04/12] baseband/acc: allocate FCW memory separately Nicolas Chautru
2023-10-03 12:51   ` Maxime Coquelin
2023-09-29 16:35 ` [PATCH v3 05/12] baseband/acc: add support for MLD operation Nicolas Chautru
2023-09-29 16:35 ` [PATCH v3 06/12] baseband/acc: refactor to allow unified driver extension Nicolas Chautru
2023-10-03 13:14   ` Maxime Coquelin
2023-10-03 18:54     ` Chautru, Nicolas
2023-10-04  7:35       ` Maxime Coquelin
2023-10-04 21:28         ` Chautru, Nicolas
2023-10-05 14:31           ` Maxime Coquelin
2023-10-05 15:00             ` Chautru, Nicolas
2023-09-29 16:35 ` [PATCH v3 07/12] baseband/acc: adding VRB2 device variant Nicolas Chautru
2023-10-03 13:41   ` Maxime Coquelin
2023-09-29 16:35 ` [PATCH v3 08/12] baseband/acc: add FEC capabilities for the VRB2 variant Nicolas Chautru
2023-10-03 14:28   ` Maxime Coquelin
2023-10-04 21:11     ` Chautru, Nicolas
2023-10-05 14:36       ` Maxime Coquelin
2023-09-29 16:35 ` [PATCH v3 09/12] baseband/acc: add FFT support to " Nicolas Chautru
2023-10-03 14:36   ` Maxime Coquelin
2023-10-03 18:20     ` Chautru, Nicolas
2023-10-04  7:11       ` Maxime Coquelin
2023-10-04 21:18         ` Chautru, Nicolas
2023-10-05 14:34           ` Maxime Coquelin
2023-10-05 17:59             ` Chautru, Nicolas
2023-10-06 12:05               ` Maxime Coquelin
2023-10-06 20:25                 ` Chautru, Nicolas
2023-09-29 16:35 ` [PATCH v3 10/12] baseband/acc: add MLD support in " Nicolas Chautru
2023-10-03 15:12   ` Maxime Coquelin
2023-10-03 18:12     ` Chautru, Nicolas
2023-09-29 16:35 ` [PATCH v3 11/12] baseband/acc: add support for VRB2 engine error detection Nicolas Chautru
2023-10-03 15:16   ` Maxime Coquelin
2023-10-03 17:22     ` Chautru, Nicolas
2023-10-03 17:26       ` Maxime Coquelin
2023-09-29 16:35 ` [PATCH v3 12/12] baseband/acc: add configure helper for VRB2 Nicolas Chautru
2023-10-03 15:30   ` 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=3fc8f63e-a242-35e5-1563-9df30d258f73@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hernan.vargas@intel.com \
    --cc=nicolas.chautru@intel.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).