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 04C73426CC; Fri, 6 Oct 2023 09:56:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D61B1402A8; Fri, 6 Oct 2023 09:56:25 +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 8EC0E4014F for ; Fri, 6 Oct 2023 09:56:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696578983; 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=xOmA1K+8AdQXRNdu/pOlnfia+goH+r/JdkScly7xYyI=; b=BLc9D9rYm9t4d6gVW8CVfcGPnfQ6LrKolpSJXL/LCB3eNhwrRdSJ0i1ygTm0YyW3CnBkS+ 9zOIdpdyyvNb+uBm++2YY8WW78eiqI+87u+jSti9maawo8l2WvW06/pL8MwPl9FR2GJVAh vASqQ9Go9g6E9ujSnNE4cdIYzIjIDXM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-487-klsNJhejP-KbCP49-H8jaw-1; Fri, 06 Oct 2023 03:55:54 -0400 X-MC-Unique: klsNJhejP-KbCP49-H8jaw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 81AFE811E7B; Fri, 6 Oct 2023 07:55:54 +0000 (UTC) Received: from [10.39.208.34] (unknown [10.39.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A504492B05; Fri, 6 Oct 2023 07:55:53 +0000 (UTC) Message-ID: Date: Fri, 6 Oct 2023 09:55:52 +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 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> From: Maxime Coquelin In-Reply-To: <20231005194907.557517-3-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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: 7bit 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/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 Thanks, Maxime