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 v5 02/12] baseband/acc: add FFT window width in the VRB PMD
Date: Tue, 10 Oct 2023 09:40:20 +0200 [thread overview]
Message-ID: <a8522015-645c-03bf-2e86-c340312c61c8@redhat.com> (raw)
In-Reply-To: <a19db7ab-8e8e-4b0b-da01-8524f3190755@redhat.com>
On 10/6/23 09:55, Maxime Coquelin wrote:
>
>
> On 10/5/23 21:48, 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 | 6 +++++
>> drivers/baseband/acc/rte_vrb_pmd.c | 41 +++++++++++++++++++++++++-----
>> 2 files changed, 41 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/baseband/acc/acc_common.h
>> b/drivers/baseband/acc/acc_common.h
>> index 5bb00746c3..afece863bc 100644
>> --- a/drivers/baseband/acc/acc_common.h
>> +++ b/drivers/baseband/acc/acc_common.h
>> @@ -131,6 +131,8 @@
>> #define ACC_LIM_31 20 /* 0.31 */
>> #define ACC_MAX_E (128 * 1024 - 2)
>> +#define ACC_MAX_FFT_WIN 16
>> +
>> /* Helper macro for logging */
>> #define rte_acc_log(level, fmt, ...) \
>> rte_log(RTE_LOG_ ## level, RTE_LOG_NOTICE, fmt "\n", \
>> @@ -512,6 +514,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 +562,8 @@ 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[ACC_MAX_FFT_WIN]; /* FFT windowing
>> size. */
>> +
>
> Remove new line.
>
>> };
>> /* 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..b86e814f8f 100644
>> --- a/drivers/baseband/acc/rte_vrb_pmd.c
>> +++ b/drivers/baseband/acc/rte_vrb_pmd.c
>> @@ -183,6 +183,37 @@ vrb_check_device_enable(struct rte_bbdev *dev)
>> return false;
>> }
>> +static inline void
>> +vrb_vf2pf(struct acc_device *d, unsigned int payload)
>> +{
>> + acc_reg_write(d, d->reg_addr->vf2pf_doorbell, payload);
>> +}
>> +
>> +/* Request device FFT windowing information. */
>> +static inline void
>> +vrb_device_fft_win(struct rte_bbdev *dev)
>> +{
>> + 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) {
>> + for (win = 0; win < ACC_MAX_FFT_WIN; win++) {
>> + vrb_vf2pf(d, ACC_VF2PF_FFT_WIN_REQUEST | win);
>> + 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;
>> + }
>> + }
>> +}
>> +
>> /* Fetch configuration enabled for the PF/VF using MMIO Read (slow). */
>> static inline void
>> fetch_acc_config(struct rte_bbdev *dev)
>> @@ -206,6 +237,8 @@ fetch_acc_config(struct rte_bbdev *dev)
>> return;
>> }
>> + vrb_device_fft_win(dev);
>> +
>> d->ddr_size = 0;
>> /* Single VF Bundle by VF. */
>> @@ -271,12 +304,6 @@ fetch_acc_config(struct rte_bbdev *dev)
>> acc_conf->q_fft.aq_depth_log2);
>> }
>> -static inline void
>> -vrb_vf2pf(struct acc_device *d, unsigned int payload)
>> -{
>> - acc_reg_write(d, d->reg_addr->vf2pf_doorbell, payload);
>> -}
>> -
>> /* Request device status information. */
>> static inline uint32_t
>> vrb_device_status(struct rte_bbdev *dev)
>> @@ -1085,6 +1112,7 @@ vrb_dev_info_get(struct rte_bbdev *dev, struct
>> rte_bbdev_driver_info *dev_info)
>> RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
>> .num_buffers_dst =
>> RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
>> + .fft_windows_num = ACC_MAX_FFT_WIN,
>> }
>> },
>> RTE_BBDEV_END_OF_CAPABILITIES_LIST()
>> @@ -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);
>> + dev_info->fft_window_width = d->fft_window_width;
>> /* Exposed number of queues. */
>> dev_info->num_queues[RTE_BBDEV_OP_NONE] = 0;
>
> With new line removed:
>
> Reviewed-by; Maxime Coquelin <maxime.coquelin@redhat.com>
With typo fixed to make patchwork happy:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> Thanks,
> Maxime
>
next prev parent reply other threads:[~2023-10-10 7:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 19:48 [PATCH v5 00/12] VRB2 bbdev PMD introduction Nicolas Chautru
2023-10-05 19:48 ` [PATCH v5 01/12] bbdev: add FFT window width member in driver info Nicolas Chautru
2023-10-06 7:54 ` Maxime Coquelin
2023-10-06 20:08 ` Chautru, Nicolas
2023-10-10 7:21 ` Maxime Coquelin
2023-10-05 19:48 ` [PATCH v5 02/12] baseband/acc: add FFT window width in the VRB PMD Nicolas Chautru
2023-10-06 7:55 ` Maxime Coquelin
2023-10-10 7:40 ` Maxime Coquelin [this message]
2023-10-05 19:48 ` [PATCH v5 03/12] baseband/acc: remove the 4G SO capability for VRB1 Nicolas Chautru
2023-10-05 19:48 ` [PATCH v5 04/12] baseband/acc: allocate FCW memory separately Nicolas Chautru
2023-10-05 19:49 ` [PATCH v5 05/12] baseband/acc: add support for MLD operation Nicolas Chautru
2023-10-05 19:49 ` [PATCH v5 06/12] baseband/acc: refactor to allow unified driver extension Nicolas Chautru
2023-10-06 9:32 ` Maxime Coquelin
2023-10-05 19:49 ` [PATCH v5 07/12] baseband/acc: adding VRB2 device variant Nicolas Chautru
2023-10-05 19:49 ` [PATCH v5 08/12] baseband/acc: add FEC capabilities for the VRB2 variant Nicolas Chautru
2023-10-06 9:51 ` Maxime Coquelin
2023-10-06 20:05 ` Chautru, Nicolas
2023-10-10 7:19 ` Maxime Coquelin
2023-10-05 19:49 ` [PATCH v5 09/12] baseband/acc: add FFT support to " Nicolas Chautru
2023-10-10 14:06 ` Maxime Coquelin
2023-10-05 19:49 ` [PATCH v5 10/12] baseband/acc: add MLD support in " Nicolas Chautru
2023-10-06 12:20 ` Maxime Coquelin
2023-10-05 19:49 ` [PATCH v5 11/12] baseband/acc: add support for VRB2 engine error detection Nicolas Chautru
2023-10-05 19:49 ` [PATCH v5 12/12] baseband/acc: add configure helper for VRB2 Nicolas Chautru
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=a8522015-645c-03bf-2e86-c340312c61c8@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).