From: Michael Baum <michaelba@nvidia.com>
To: <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>, Akhil Goyal <gakhil@marvell.com>,
"Thomas Monjalon" <thomas@monjalon.net>
Subject: [PATCH v2 7/8] common/mlx5: add LZ4 capabilities check
Date: Thu, 2 Feb 2023 18:25:36 +0200 [thread overview]
Message-ID: <20230202162537.1067595-8-michaelba@nvidia.com> (raw)
In-Reply-To: <20230202162537.1067595-1-michaelba@nvidia.com>
Add capabilities check for LZ4 decompression algorithm.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 6 ++++++
drivers/common/mlx5/mlx5_devx_cmds.h | 3 +++
drivers/common/mlx5/mlx5_prm.h | 16 ++++++++++++++--
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index dfec4dcf1b..f30daa19c7 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -989,6 +989,12 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
log_compress_mmo_size);
attr->log_max_mmo_decompress = MLX5_GET(cmd_hca_cap, hcattr,
log_decompress_mmo_size);
+ attr->decomp_lz4_data_only_en = MLX5_GET(cmd_hca_cap, hcattr,
+ decompress_lz4_data_only_v2);
+ attr->decomp_lz4_no_checksum_en = MLX5_GET(cmd_hca_cap, hcattr,
+ decompress_lz4_no_checksum_v2);
+ attr->decomp_lz4_checksum_en = MLX5_GET(cmd_hca_cap, hcattr,
+ decompress_lz4_checksum_v2);
attr->cqe_compression = MLX5_GET(cmd_hca_cap, hcattr, cqe_compression);
attr->mini_cqe_resp_flow_tag = MLX5_GET(cmd_hca_cap, hcattr,
mini_cqe_resp_flow_tag);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index edb387e272..a82af9426d 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -267,6 +267,9 @@ struct mlx5_hca_attr {
uint32_t log_max_mmo_dma:5;
uint32_t log_max_mmo_compress:5;
uint32_t log_max_mmo_decompress:5;
+ uint32_t decomp_lz4_data_only_en:1;
+ uint32_t decomp_lz4_no_checksum_en:1;
+ uint32_t decomp_lz4_checksum_en:1;
uint32_t umr_modify_entity_size_disabled:1;
uint32_t umr_indirect_mkey_disabled:1;
uint32_t log_min_stride_wqe_sz:5;
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 377cbfab87..f89af8b96b 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -578,9 +578,19 @@ struct mlx5_rdma_write_wqe {
#define MLX5_OPC_MOD_MMO_DECOMP 0x3u
#define MLX5_OPC_MOD_MMO_DMA 0x1u
+#define WQE_GGA_DECOMP_DEFLATE 0x0u
+#define WQE_GGA_DECOMP_LZ4 0x2u
+
+#define MLX5_GGA_DECOMP_LZ4_BLOCK_WITHOUT_CHECKSUM 0x1u
+#define MLX5_GGA_DECOMP_LZ4_BLOCK_WITH_CHECKSUM 0x2u
+
#define WQE_GGA_COMP_WIN_SIZE_OFFSET 12u
#define WQE_GGA_COMP_BLOCK_SIZE_OFFSET 16u
#define WQE_GGA_COMP_DYNAMIC_SIZE_OFFSET 20u
+#define WQE_GGA_DECOMP_PARAMS_OFFSET 20u
+#define WQE_GGA_DECOMP_TYPE_OFFSET 8u
+#define WQE_GGA_DECOMP_BLOCK_INDEPENDENT_OFFSET 22u
+
#define MLX5_GGA_COMP_WIN_SIZE_UNITS 1024u
#define MLX5_GGA_COMP_WIN_SIZE_MAX (32u * MLX5_GGA_COMP_WIN_SIZE_UNITS)
#define MLX5_GGA_COMP_LOG_BLOCK_SIZE_MAX 15u
@@ -599,7 +609,7 @@ struct mlx5_gga_wqe {
uint32_t opcode;
uint32_t sq_ds;
uint32_t flags;
- uint32_t gga_ctrl1; /* ws 12-15, bs 16-19, dyns 20-23. */
+ uint32_t gga_ctrl1;
uint32_t gga_ctrl2;
uint32_t opaque_lkey;
uint64_t opaque_vaddr;
@@ -1434,7 +1444,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 log_dma_mmo_size[0x5];
u8 reserved_at_70[0x3];
u8 log_compress_mmo_size[0x5];
- u8 reserved_at_78[0x3];
+ u8 decompress_lz4_data_only_v2[0x1];
+ u8 decompress_lz4_no_checksum_v2[0x1];
+ u8 decompress_lz4_checksum_v2[0x1];
u8 log_decompress_mmo_size[0x5];
u8 log_max_srq_sz[0x8];
u8 log_max_qp_sz[0x8];
--
2.25.1
next prev parent reply other threads:[~2023-02-02 16:26 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 7:58 [PATCH 0/7] compress/mlx5: add LZ4 support Michael Baum
2023-01-09 7:58 ` [PATCH 1/7] compress/mlx5: fix wrong output Adler-32 checksum offset Michael Baum
2023-01-09 7:58 ` [PATCH 2/7] compress/mlx5: fix QP setup for partial transformations Michael Baum
2023-01-09 7:58 ` [PATCH 3/7] compress/mlx5: support new metadata layout added in BF3 Michael Baum
2023-01-09 7:58 ` [PATCH 4/7] compress/mlx5: remove unused variable from priv structure Michael Baum
2023-01-09 7:58 ` [PATCH 5/7] compress/mlx5: add xform validate function Michael Baum
2023-01-09 7:58 ` [PATCH 6/7] common/mlx5: add LZ4 capabilities check Michael Baum
2023-01-09 7:58 ` [PATCH 7/7] compress/mlx5: add support for LZ4 algorithm Michael Baum
2023-02-02 16:25 ` [PATCH v2 0/8] compress/mlx5: add LZ4 support Michael Baum
2023-02-02 16:25 ` [PATCH v2 1/8] compress/mlx5: fix decompress xform validation Michael Baum
2023-02-02 16:25 ` [PATCH v2 2/8] compress/mlx5: fix wrong output Adler-32 checksum offset Michael Baum
2023-02-02 16:25 ` [PATCH v2 3/8] compress/mlx5: fix QP setup for partial transformations Michael Baum
2023-02-02 16:25 ` [PATCH v2 4/8] compress/mlx5: support new metadata layout added in BF3 Michael Baum
2023-02-02 16:25 ` [PATCH v2 5/8] compress/mlx5: remove unused variable from priv structure Michael Baum
2023-02-02 16:25 ` [PATCH v2 6/8] compress/mlx5: add xform validate function Michael Baum
2023-02-02 16:25 ` Michael Baum [this message]
2023-02-02 16:25 ` [PATCH v2 8/8] compress/mlx5: add support for LZ4 algorithm Michael Baum
2023-02-21 7:07 ` [PATCH v3 0/8] compress/mlx5: add LZ4 support Michael Baum
2023-02-21 7:07 ` [PATCH v3 1/8] compress/mlx5: fix decompress xform validation Michael Baum
2023-02-21 7:07 ` [PATCH v3 2/8] compress/mlx5: fix wrong output Adler-32 checksum offset Michael Baum
2023-02-21 7:07 ` [PATCH v3 3/8] compress/mlx5: fix QP setup for partial transformations Michael Baum
2023-02-21 7:07 ` [PATCH v3 4/8] compress/mlx5: support new metadata layout added in BF3 Michael Baum
2023-02-21 7:07 ` [PATCH v3 5/8] compress/mlx5: remove unused variable from priv structure Michael Baum
2023-02-21 7:07 ` [PATCH v3 6/8] compress/mlx5: add xform validate function Michael Baum
2023-02-21 7:07 ` [PATCH v3 7/8] common/mlx5: add LZ4 capabilities check Michael Baum
2023-02-21 7:07 ` [PATCH v3 8/8] compress/mlx5: add support for LZ4 algorithm Michael Baum
2023-02-27 18:17 ` [EXT] [PATCH v3 0/8] compress/mlx5: add LZ4 support Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230202162537.1067595-8-michaelba@nvidia.com \
--to=michaelba@nvidia.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=matan@nvidia.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).