From patchwork Tue Oct 10 20:34:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chautru, Nicolas" X-Patchwork-Id: 132483 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E2D5842356; Tue, 10 Oct 2023 22:34:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 51262402ED; Tue, 10 Oct 2023 22:34:13 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 7409E402A2 for ; Tue, 10 Oct 2023 22:34:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696970052; x=1728506052; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aq0DmXjB6iGxe0klfED19KMW51wIEv/MWOVBXHQtI5k=; b=ZL0zaw/gvnclaqG2EszTlSEuYBvQZUES/HNw/MKUjWrLumnvhE2kBksg c5L8NR4lpgwCQS3MwqMn8q9qMrszymIVUHr5qZvW8PTyoP1545HahHOsU tx+cOhFoU8lWuT39aGj9zbKZEdjU22dyR5Dh541JtQDDx2oFvDhq878r2 7Bb8LCnQEuvR/a+ewY1YqZhTvE3fU9cXI+7yB4Vi7obNQjRy9IbjMTyWG afd8cfhDB3qt3FdhPCA2AqVDClzXmbaTmX2/vB1ZBTdVk5cyYMnk4DGVT 2ndB1Kv7eYvimZrIUiqR8VK+rR7pptw06xFAfpATO3u6okC7FyBY58itr g==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="374844332" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="374844332" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 13:34:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="747180993" X-IronPort-AV: E=Sophos;i="6.03,213,1694761200"; d="scan'208";a="747180993" Received: from spr-npg-bds1-eec2.sn.intel.com (HELO spr-npg-bds1-eec2..) ([10.233.181.123]) by orsmga007.jf.intel.com with ESMTP; 10 Oct 2023 13:34:09 -0700 From: Nicolas Chautru To: dev@dpdk.org, maxime.coquelin@redhat.com Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com, hernan.vargas@intel.com, Nicolas Chautru Subject: [PATCH v1 1/1] doc: bbdev device discovery clarification Date: Tue, 10 Oct 2023 20:34:10 +0000 Message-Id: <20231010203410.773132-2-nicolas.chautru@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010203410.773132-1-nicolas.chautru@intel.com> References: <20231010203410.773132-1-nicolas.chautru@intel.com> MIME-Version: 1.0 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 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.