From patchwork Thu Jan 9 10:44:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanxiao Li X-Patchwork-Id: 149772 X-Patchwork-Delegate: gakhil@marvell.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 1F6AD45FDF; Thu, 9 Jan 2025 11:56:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACC524113D; Thu, 9 Jan 2025 11:55:26 +0100 (CET) Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by mails.dpdk.org (Postfix) with ESMTP id E8A43410F1 for ; Thu, 9 Jan 2025 11:55:24 +0100 (CET) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4YTMBg6vmfz5B1H4 for ; Thu, 9 Jan 2025 18:55:23 +0800 (CST) Received: from szxl2zmapp06.zte.com.cn ([10.1.32.108]) by mse-fl2.zte.com.cn with SMTP id 509Ashb1043548 for ; Thu, 9 Jan 2025 18:54:43 +0800 (+08) (envelope-from li.hanxiao@zte.com.cn) Received: from localhost.localdomain (unknown [192.168.6.15]) by smtp (Zmail) with SMTP; Sat, 9 Jan 2025 18:54:46 +0800 X-Zmail-TransId: 3e81677faaf6002-53b4f From: Hanxiao Li To: dev@dpdk.org Cc: Hanxiao Li Subject: [PATCH v23 13/13] compress/zsda: add zsda compressdev capabilities Date: Thu, 9 Jan 2025 18:44:17 +0800 Message-ID: <20250109104454.2404815-12-li.hanxiao@zte.com.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250109104454.2404815-1-li.hanxiao@zte.com.cn> References: <20250109104203.2404659-2-li.hanxiao@zte.com.cn> <20250109104454.2404815-1-li.hanxiao@zte.com.cn> MIME-Version: 1.0 X-MAIL: mse-fl2.zte.com.cn 509Ashb1043548 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 677FAB1B.000/4YTMBg6vmfz5B1H4 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 Add zsda compressdev capabilities Signed-off-by: Hanxiao Li --- doc/guides/compressdevs/features/zsda.ini | 9 +++++++++ doc/guides/compressdevs/zsda.rst | 23 +++++++++++++++++++++++ doc/guides/rel_notes/release_25_03.rst | 7 +++++++ drivers/compress/zsda/zsda_comp_pmd.c | 16 +++++++++++++++- 4 files changed, 54 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/doc/guides/compressdevs/features/zsda.ini b/doc/guides/compressdevs/features/zsda.ini index 5cc9a3b1a6..3b087ea7f9 100644 --- a/doc/guides/compressdevs/features/zsda.ini +++ b/doc/guides/compressdevs/features/zsda.ini @@ -4,3 +4,12 @@ ; Supported features of 'ZSDA' compression driver. ; [Features] +HW Accelerated = Y +OOP SGL In SGL Out = Y +OOP SGL In LB Out = Y +OOP LB In SGL Out = Y +Deflate = Y +Adler32 = Y +Crc32 = Y +Fixed = Y +Dynamic = Y diff --git a/doc/guides/compressdevs/zsda.rst b/doc/guides/compressdevs/zsda.rst index da7117b45e..77de026a16 100644 --- a/doc/guides/compressdevs/zsda.rst +++ b/doc/guides/compressdevs/zsda.rst @@ -13,6 +13,29 @@ support for the following hardware accelerator devices: Features -------- +ZSDA compression PMD has support for: + +Compression/Decompression algorithm: + + * DEFLATE - using Fixed and Dynamic Huffman encoding + +Checksum generation: + + * CRC32, Adler32 + +Huffman code type: + + * FIXED + * DYNAMIC + + +Limitations +----------- + +* Compressdev level 0, no compression, is not supported. +* No BSD support as BSD ZSDA kernel driver not available. +* Stateful is not supported. + Installation ------------ diff --git a/doc/guides/rel_notes/release_25_03.rst b/doc/guides/rel_notes/release_25_03.rst index 426dfcd982..62fc20701b 100644 --- a/doc/guides/rel_notes/release_25_03.rst +++ b/doc/guides/rel_notes/release_25_03.rst @@ -24,6 +24,13 @@ DPDK Release 25.03 New Features ------------ +* **Added ZTE Storage Data Accelerator(ZSDA) device driver.** + + Added a new compress driver for ZSDA devices to support + the deflate compression and decompression algorithm. + + See the :doc:`../compressdevs/zsda` guide for more details on the new driver. + .. This section should contain new features added in this release. Sample format: diff --git a/drivers/compress/zsda/zsda_comp_pmd.c b/drivers/compress/zsda/zsda_comp_pmd.c index dc8b07f5f7..fb3fa6679b 100644 --- a/drivers/compress/zsda/zsda_comp_pmd.c +++ b/drivers/compress/zsda/zsda_comp_pmd.c @@ -10,6 +10,20 @@ #include "zsda_comp_pmd.h" #include "zsda_comp.h" +static const struct rte_compressdev_capabilities zsda_comp_capabilities[] = { + { + .algo = RTE_COMP_ALGO_DEFLATE, + .comp_feature_flags = RTE_COMP_FF_HUFFMAN_DYNAMIC | + RTE_COMP_FF_OOP_SGL_IN_SGL_OUT | + RTE_COMP_FF_OOP_SGL_IN_LB_OUT | + RTE_COMP_FF_OOP_LB_IN_SGL_OUT | + RTE_COMP_FF_CRC32_CHECKSUM | + RTE_COMP_FF_ADLER32_CHECKSUM | + RTE_COMP_FF_SHAREABLE_PRIV_XFORM, + .window_size = {.min = 15, .max = 15, .increment = 0}, + }, +}; + static int zsda_comp_xform_size(void) { @@ -358,7 +372,7 @@ zsda_comp_dev_create(struct zsda_pci_device *zsda_pci_dev) comp_dev->zsda_pci_dev = zsda_pci_dev; comp_dev->compressdev = compressdev; - capabilities = NULL; + capabilities = zsda_comp_capabilities; comp_dev->capa_mz = rte_memzone_lookup(capa_memz_name); if (comp_dev->capa_mz == NULL) {