From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 643D142348; Tue, 10 Oct 2023 09:40:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33A0A4029F; Tue, 10 Oct 2023 09:40:40 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5ABC640278 for ; Tue, 10 Oct 2023 09:40:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696923637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VY3ub3GfkV68LjV2t3GBpJ97t3G7NNquEla0FyEAhkM=; b=cE9tAxaz7EiZwylo2IGKas62YVUgvSAegytSXFy26brMmqjFwnvvX33eJaPjC7gMeZ47y9 H+fDR8svva7F1K5yjMwnf7HzybSE6BKBxblKDfjwLWwV06kZChZ67f48CYEmY1igpLH6D6 cQh8woYcJRB/uwroc6uk3ym7H691uzQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-5-JP_yjfE1M-yN4BQSVlIhSg-1; Tue, 10 Oct 2023 03:40:24 -0400 X-MC-Unique: JP_yjfE1M-yN4BQSVlIhSg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 725601C06365; Tue, 10 Oct 2023 07:40:24 +0000 (UTC) Received: from [10.39.208.11] (unknown [10.39.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33BDE63F50; Tue, 10 Oct 2023 07:40:22 +0000 (UTC) Message-ID: Date: Tue, 10 Oct 2023 09:40:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v5 02/12] baseband/acc: add FFT window width in the VRB PMD From: Maxime Coquelin To: Nicolas Chautru , dev@dpdk.org Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com, hernan.vargas@intel.com References: <20231005194907.557517-1-nicolas.chautru@intel.com> <20231005194907.557517-3-nicolas.chautru@intel.com> In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 >> --- >>   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 With typo fixed to make patchwork happy: Reviewed-by: Maxime Coquelin > > Thanks, > Maxime >