[v25,13/13] compress/zsda: add zsda compressdev capabilities

Message ID 20250122093325.3099070-14-li.hanxiao@zte.com.cn (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series drivers/zsda: introduce zsda drivers |

Checks

Context Check Description
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing fail Unit Testing FAIL
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed

Commit Message

Hanxiao Li Jan. 22, 2025, 9:33 a.m. UTC
Add zsda compressdev capabilities

Signed-off-by: Hanxiao Li <li.hanxiao@zte.com.cn>
---
 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
  

Comments

Hanxiao Li Jan. 23, 2025, 2:32 a.m. UTC | #1
Hi, Akhil:

There are warning and some errors in the patches.


The warning is 

>_coding style issues_
>
>
>__rte_packed_begin and __rte_packed_end should always be used in pairs.

And the context in the patch is:

> struct __rte_packed_begin zsda_admin_req {
> 	uint16_t msg_type;
> 	uint8_t data[26];
>@@ -105,10 +114,30 @@  struct zsda_qp_stat {
> 	uint64_t dequeue_err_count;
> };
 
It's the locating information for the modified code. 
So, the warning may be caused by a bug of checkpatches.sh


The errors are:

> ci/loongarch-unit-testing	fail	Unit Testing FAIL
> 43/119 DPDK:fast-tests / eventdev_selftest_sw                    TIMEOUT        80.08s   exit status -15

and

> <!doctype html>
> <html lang="en">
> <head>
>   <title>Not Found</title>
> </head>
> <body>
>   <h1>Not Found</h1><p>The requested resource was not found on this server.</p>
> </body>
> </html>

For the both errors, I have no idea about the cause of the problem and how to solve it.
I even don't modify the code about eventdev. 

Thanks.
  
Akhil Goyal Jan. 23, 2025, 6:27 a.m. UTC | #2
> Hi, Akhil:
> 
> There are warning and some errors in the patches.
> 
> 
> The warning is
> 
> >_coding style issues_
> >
> >
> >__rte_packed_begin and __rte_packed_end should always be used in pairs.
> 
> And the context in the patch is:
> 
> > struct __rte_packed_begin zsda_admin_req {
> >     uint16_t msg_type;
> >     uint8_t data[26];
> >@@ -105,10 +114,30 @@  struct zsda_qp_stat {
> >     uint64_t dequeue_err_count;
> > };
> 
> It's the locating information for the modified code.
> So, the warning may be caused by a bug of checkpatches.sh
> 
@Andre Muezerie Can you please look into this checkpatch issue for rte_packet_begin/end?
I think instead of doing grep on patch, it should grep the complete file.


> 
> The errors are:
> 
> > ci/loongarch-unit-testing    fail    Unit Testing FAIL
> > 43/119 DPDK:fast-tests / eventdev_selftest_sw                    TIMEOUT        80.08s
> exit status -15
> 
> and
> 
> > <!doctype html>
> > <html lang="en">
> > <head>
> >   <title>Not Found</title>
> > </head>
> > <body>
> >   <h1>Not Found</h1><p>The requested resource was not found on this
> server.</p>
> > </body>
> > </html>
> 
> For the both errors, I have no idea about the cause of the problem and how to
> solve it.
> I even don't modify the code about eventdev.
> 
> Thanks.
>
  

Patch

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 85986ffa61..59d9ea19d9 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) {