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 05686431E0; Mon, 23 Oct 2023 11:21:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D9AD402EA; Mon, 23 Oct 2023 11:21:56 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id E9DAE40270 for ; Mon, 23 Oct 2023 11:21:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698052914; 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:autocrypt:autocrypt; bh=bXK808sqyv+dLiD6xro7YjKybUmXjNcAneJFK1nrOBQ=; b=Xa46IYOZeNqnufws4a0Ms8SMNWr83Oa1zTPREL0i4g0yTetL93UWxlbZcdjvQ4COBOG5Oa Tc+zh60JlOv+f/tTaSyvZVi9NDVjCyFe5TE8IXU21fl2EKbRSSGCS7klN/f5nX7m32I5BW RKvgrlceZNT7edaF756AcBJ60lEX9N0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-76-8O3CjqdRNSmzybfj9tJJNA-1; Mon, 23 Oct 2023 05:21:51 -0400 X-MC-Unique: 8O3CjqdRNSmzybfj9tJJNA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DC57384B048; Mon, 23 Oct 2023 09:21:50 +0000 (UTC) Received: from [10.39.208.17] (unknown [10.39.208.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B576240C6F79; Mon, 23 Oct 2023 09:21:49 +0000 (UTC) Message-ID: Date: Mon, 23 Oct 2023 11:21:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] doc: bbdev device discovery clarification To: Nicolas Chautru , dev@dpdk.org Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com, hernan.vargas@intel.com References: <20231013214238.902741-1-nicolas.chautru@intel.com> <20231013214238.902741-2-nicolas.chautru@intel.com> From: Maxime Coquelin Autocrypt: addr=maxime.coquelin@redhat.com; keydata= xsFNBFOEQQIBEADjNLYZZqghYuWv1nlLisptPJp+TSxE/KuP7x47e1Gr5/oMDJ1OKNG8rlNg kLgBQUki3voWhUbMb69ybqdMUHOl21DGCj0BTU3lXwapYXOAnsh8q6RRM+deUpasyT+Jvf3a gU35dgZcomRh5HPmKMU4KfeA38cVUebsFec1HuJAWzOb/UdtQkYyZR4rbzw8SbsOemtMtwOx YdXodneQD7KuRU9IhJKiEfipwqk2pufm2VSGl570l5ANyWMA/XADNhcEXhpkZ1Iwj3TWO7XR uH4xfvPl8nBsLo/EbEI7fbuUULcAnHfowQslPUm6/yaGv6cT5160SPXT1t8U9QDO6aTSo59N jH519JS8oeKZB1n1eLDslCfBpIpWkW8ZElGkOGWAN0vmpLfdyiqBNNyS3eGAfMkJ6b1A24un /TKc6j2QxM0QK4yZGfAxDxtvDv9LFXec8ENJYsbiR6WHRHq7wXl/n8guyh5AuBNQ3LIK44x0 KjGXP1FJkUhUuruGyZsMrDLBRHYi+hhDAgRjqHgoXi5XGETA1PAiNBNnQwMf5aubt+mE2Q5r qLNTgwSo2dpTU3+mJ3y3KlsIfoaxYI7XNsPRXGnZi4hbxmeb2NSXgdCXhX3nELUNYm4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JZiig/9CG3dXmKfi2H+wdUCSvEFHRpgo7GK8/Kh3vGhgKmnnxhl8ACBaGy9n fxjSxjSO6rj4/MeenmlJw1yebzkX8ZmaSi8BHe+n6jTGEFNrbiOdWpJgc5yHIZZnwXaW54QT UhhSjDL1rV2B4F28w30jYmlRmm2RdN7iCZfbyP3dvFQTzQ4ySquuPkIGcOOHrvZzxbRjzMx1 Mwqu3GQ= In-Reply-To: <20231013214238.902741-2-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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/13/23 23:42, Nicolas Chautru wrote: > Adding more context and information related the data exposed > through device discovery notably for FEC and FFT operations. > > Signed-off-by: Nicolas Chautru > --- > doc/guides/prog_guide/bbdev.rst | 60 ++++++++++++++++++++++++++++----- > lib/bbdev/rte_bbdev.h | 6 ++++ > 2 files changed, 57 insertions(+), 9 deletions(-) > > diff --git a/doc/guides/prog_guide/bbdev.rst b/doc/guides/prog_guide/bbdev.rst > index c43e478eda..01a8a6d79b 100644 > --- a/doc/guides/prog_guide/bbdev.rst > +++ b/doc/guides/prog_guide/bbdev.rst > @@ -261,16 +261,58 @@ information: > structure, this is where capabilities reside along with other specifics like: > maximum queue sizes and priority level. > > -.. code-block:: c > +.. literalinclude:: ../../../lib/bbdev/rte_bbdev.h > + :language: c > + :start-after: Structure rte_bbdev_driver_info 8< > + :end-before: >8 End of structure rte_bbdev_driver_info. > > - struct rte_bbdev_info { > - int socket_id; > - const char *dev_name; > - const struct rte_device *device; > - uint16_t num_queues; > - bool started; > - struct rte_bbdev_driver_info drv; > - }; > +.. literalinclude:: ../../../lib/bbdev/rte_bbdev.h > + :language: c > + :start-after: Structure rte_bbdev_info 8< > + :end-before: >8 End of structure rte_bbdev_info. > + > +Capabilities details for LDPC Decoder > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +On top of the ``RTE_BBDEV_LDPC_<*>`` capabilities the device also exposes the LLR numerical > +representation expected by the decoder as a fractional fixed-point representation. > +For instance, when the representation (``llr_size``, ``llr_decimals``) = (8, 2) respectively, > +this means that each input LLR in the data provided by the application must be computed as 8 total > +bits (including sign bit) where 2 of these are fractions bits (also referred to as S8.2 format). > +It is up to the user application during LLR generation to scale the LLR according to this > +optimal numerical representation. Any mis-scaled LLR would cause wireless performance degradation. > + > +The ``harq_buffer_size`` exposes the amount of dedicated DDR made available for the device operation. > +This is specific for accelerator non-integrated on the CPU (separate PCIe device) which may > +include separate on-card memory. > + > +Capabilities details for FFT function > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +The total number of distinct time windows supported for the post-FFT point-wise multiplication is > +exposed as ``fft_windows_num``. The ``window_index`` provided for each cyclic shift in each > +``rte_bbdev_op_fft`` operation is expected to be limited to that size. > + > +The information related to the width of each of these pre-configured window is also exposed > +using the ``fft_window_width`` array. This provides the number of non-null samples used for each > +window index when scaling back the size to a reference of 1024 FFT. The actual shape size is > +effectively scaled up or down based on the dynamic size of the FFT operation being used. > + > +This allows to distinguish different version of the flexible pointwise windowing applied to the > +FFT and exposes this platform configuration to the application. > + > +Other optional capabilities exposed during device discovery > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +The device status can be used to expose additional information related to the state of the > +platform notably based on its configuration state or related to error management > +(correctable or non). > + > +The queue topology exposed to the device is provided on top of the capabilities. This provides > +the number of queues available for the exposed bbdev device (the physical device may have more) > +for each operation as well as the different level of priority available for arbitration. > +These are based on the arrays and parameters ``num_queues``, ``queue_priority``, > +``max_num_queues``, ``queue_size_lim``. > > > Operation Processing > diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h > index d12e2e7fbc..925c78cae1 100644 > --- a/lib/bbdev/rte_bbdev.h > +++ b/lib/bbdev/rte_bbdev.h > @@ -313,6 +313,8 @@ int > rte_bbdev_stats_reset(uint16_t dev_id); > > /** Device information supplied by the device's driver */ > + > +/* Structure rte_bbdev_driver_info 8< */ > struct rte_bbdev_driver_info { > /** Driver name */ > const char *driver_name; > @@ -352,6 +354,7 @@ struct rte_bbdev_driver_info { > /** FFT windowing width for 2048 FFT - size defined in capability. */ > uint16_t *fft_window_width; > }; > +/* >8 End of structure rte_bbdev_driver_info. */ > > /** Macro used at end of bbdev PMD list */ > #define RTE_BBDEV_END_OF_CAPABILITIES_LIST() \ > @@ -361,6 +364,8 @@ struct rte_bbdev_driver_info { > * Device information structure used by an application to discover a devices > * capabilities and current configuration > */ > + > +/* Structure rte_bbdev_info 8< */ > struct rte_bbdev_info { > int socket_id; /**< NUMA socket that device is on */ > const char *dev_name; /**< Unique device name */ > @@ -369,6 +374,7 @@ struct rte_bbdev_info { > bool started; /**< Set if device is currently started */ > struct rte_bbdev_driver_info drv; /**< Info from device driver */ > }; > +/* >8 End of structure rte_bbdev_info. */ > > /** > * Retrieve information about a device. Reviewed-by: Maxime Coquelin Thanks, Maxime