From patchwork Wed Nov 13 02:33:18 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Hanxiao Li
X-Patchwork-Id: 148383
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 1735245CC8;
Wed, 13 Nov 2024 03:40:26 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
by mails.dpdk.org (Postfix) with ESMTP id 243BD40E39;
Wed, 13 Nov 2024 03:39:38 +0100 (CET)
Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35])
by mails.dpdk.org (Postfix) with ESMTP id 2A37840E16
for ; Wed, 13 Nov 2024 03:39:29 +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 4Xp6tm13KPz5B1J5
for ; Wed, 13 Nov 2024 10:39:28 +0800 (CST)
Received: from szxlzmapp07.zte.com.cn ([10.5.230.251])
by mse-fl2.zte.com.cn with SMTP id 4AD2d6lt065785
for ; Wed, 13 Nov 2024 10:39:06 +0800 (+08)
(envelope-from li.hanxiao@zte.com.cn)
Received: from localhost.localdomain (unknown [192.168.6.15])
by smtp (Zmail) with SMTP; Wed, 13 Nov 2024 10:39:07 +0800
X-Zmail-TransId: 3e816734114b005-aaef9
From: Hanxiao Li
To: dev@dpdk.org
Cc: Hanxiao Li
Subject: [PATCH v22 13/13] compress/zsda: add zsda compressdev capabilities
Date: Wed, 13 Nov 2024 10:33:18 +0800
Message-ID: <20241113023323.3228516-12-li.hanxiao@zte.com.cn>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20241113023323.3228516-1-li.hanxiao@zte.com.cn>
References: <20241113022918.3228337-2-li.hanxiao@zte.com.cn>
<20241113023323.3228516-1-li.hanxiao@zte.com.cn>
MIME-Version: 1.0
X-MAIL: mse-fl2.zte.com.cn 4AD2d6lt065785
X-Fangmail-Anti-Spam-Filtered: true
X-Fangmail-MID-QID: 67341160.001/4Xp6tm13KPz5B1J5
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_24_11.rst | 7 +++++++
drivers/compress/zsda/zsda_comp_pmd.c | 15 ++++++++++++++-
4 files changed, 53 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 c02423d650..30d1c55766 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_24_11.rst b/doc/guides/rel_notes/release_24_11.rst
index 0ff70d9057..583e509a45 100644
--- a/doc/guides/rel_notes/release_24_11.rst
+++ b/doc/guides/rel_notes/release_24_11.rst
@@ -24,6 +24,13 @@ DPDK Release 24.11
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 ea3de2f505..85c934ace1 100644
--- a/drivers/compress/zsda/zsda_comp_pmd.c
+++ b/drivers/compress/zsda/zsda_comp_pmd.c
@@ -9,6 +9,19 @@
#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,
+ .window_size = {.min = 15, .max = 15, .increment = 0},
+ },
+};
+
static int
zsda_comp_xform_size(void)
{
@@ -405,7 +418,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) {