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

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

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
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
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing warning Testing issues

Commit Message

Hanxiao Li Nov. 13, 2024, 2: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_24_11.rst    |  7 +++++++
 drivers/compress/zsda/zsda_comp_pmd.c     | 15 ++++++++++++++-
 4 files changed, 53 insertions(+), 1 deletion(-)

-- 
2.27.0
  

Comments

Hanxiao Li Dec. 4, 2024, 1:33 a.m. UTC | #1
Hi akhil:

I noticed that DPDK24.11 has been released and state of the my patches has been changed to "New" from "Defer".

And I have some questions about how to proceed with submitting patches.

1.	In the last version, I have submitted to v22. If I want to continue submitting, should I submit to v23 or v1?

2.	Should I submit patches based on the latest version as soon as possible, or wait for your comments before submitting?

3.	I think I need to add something to the release_25_03.rst. But I did not find the file in code.
	So, what should I do? 
	Don鈥檛 write this document for now, and add it after it is released later?
	Or should I wait until this file exists before submitting?

Thanks
Hanxiao Li.
  
David Marchand Dec. 5, 2024, 8:04 a.m. UTC | #2
Hello Hanxiao,

My two cents.

On Wed, Dec 4, 2024 at 2:41 AM Hanxiao Li <li.hanxiao@zte.com.cn> wrote:
>
> Hi akhil:
>
> I noticed that DPDK24.11 has been released and state of the my patches has been changed to "New" from "Defer".
>
> And I have some questions about how to proceed with submitting patches.
>
> 1.    In the last version, I have submitted to v22. If I want to continue submitting, should I submit to v23 or v1?

It would be confusing to have multiple patches on the mailing list
with the same numbering.
The more recent patches have already gone through a number of reviews
and changes, and the numbering helps tracking this down.

So please keep on increasing the revision number when submitting new series.


>
> 2.    Should I submit patches based on the latest version as soon as possible, or wait for your comments before submitting?
>
> 3.    I think I need to add something to the release_25_03.rst. But I did not find the file in code.
>     So, what should I do?
>     Don鈥檛 write this document for now, and add it after it is released later?
>     Or should I wait until this file exists before submitting?

We merged the rc0 patch yesterday.
Once Akhil rebases next-crypto, the new RN file will be present.
  
Akhil Goyal Dec. 5, 2024, 8:25 a.m. UTC | #3
Hi Hanxiao,

> > 2.    Should I submit patches based on the latest version as soon as possible, or
> wait for your comments before submitting?
I can review probably next week. You can wait until then. 

> >
> > 3.    I think I need to add something to the release_25_03.rst. But I did not find
> the file in code.
> >     So, what should I do?
> >     Don鈥檛 write this document for now, and add it after it is released later?
> >     Or should I wait until this file exists before submitting?
> 
> We merged the rc0 patch yesterday.
> Once Akhil rebases next-crypto, the new RN file will be present.
The next-crypto tree is rebased over main.

Regards,
Akhil
  
Akhil Goyal Jan. 7, 2025, 2:38 p.m. UTC | #4
> 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_24_11.rst    |  7 +++++++
>  drivers/compress/zsda/zsda_comp_pmd.c     | 15 ++++++++++++++-
>  4 files changed, 53 insertions(+), 1 deletion(-)
> 
> 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.
> +

Move to 25.03 release notes.

>  .. 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) {
> --
> 2.27.0
  

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 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) {