Skip to contentSkip to conversation

common/qat: increase IM buffer size for QAT GEN3

PATCH In review Adam Dybkowski 3 participants 5 messages Apr 28, 2021 – May 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 common/qat: increase IM buffer size for QAT GEN3

This patch increases the intermediate buffer size used for the compression on QAT GEN3 to accommodate new hardware versions.

Fixes a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
---
 drivers/common/qat/qat_device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/qat/qat_device.h +1 -1
index e6337c688d..9c6a3ca4e6 100644
@@ -29,7 +29,7 @@ struct qat_dev_cmd_param {
 enum qat_comp_num_im_buffers {
 	QAT_NUM_INTERM_BUFS_GEN1 = 12,
 	QAT_NUM_INTERM_BUFS_GEN2 = 20,
-	QAT_NUM_INTERM_BUFS_GEN3 = 20
+	QAT_NUM_INTERM_BUFS_GEN3 = 64
 };
 
 struct qat_device_info {
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 compress/qat: enable compression on QAT GEN3

This patch enables the compression on QAT GEN3 (on hardware versions that support it) and changes the error message shown on older hardware versions that don't support the compression.

It also fixes the crash that happened on IM buffer allocation failure (not enough memory) during the PMD cleaning phase.

Fixes a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
Fixes 352332744c3a ("compress/qat: add dynamic SGL allocation")
---
 drivers/compress/qat/qat_comp.c     |   7 +-
 drivers/compress/qat/qat_comp_pmd.c | 111 +++++++++++++++++++---------
 2 files changed, 79 insertions(+), 39 deletions(-)
drivers/compress/qat/qat_comp.c +4 -3
index 3a064ec3b2..7ac25a3b4c 100644
@@ -191,8 +191,8 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
 					ICP_QAT_FW_COMP_EOP
 				      : ICP_QAT_FW_COMP_NOT_EOP,
 				ICP_QAT_FW_COMP_NOT_BFINAL,
-				ICP_QAT_FW_COMP_NO_CNV,
-				ICP_QAT_FW_COMP_NO_CNV_RECOVERY);
+				ICP_QAT_FW_COMP_CNV,
+				ICP_QAT_FW_COMP_CNV_RECOVERY);
 	}
 
 	/* common for sgl and flat buffers */
@@ -603,7 +603,8 @@ qat_comp_process_response(void **op, uint8_t *resp, void *op_cookie,
 			rx_op->status = RTE_COMP_OP_STATUS_ERROR;
 			rx_op->debug_status = ERR_CODE_QAT_COMP_WRONG_FW;
 			*op = (void *)rx_op;
-			QAT_DP_LOG(ERR, "QAT has wrong firmware");
+			QAT_DP_LOG(ERR,
+					"This QAT hardware doesn't support compression operation");
 			++(*dequeue_err_count);
 			return 1;
 		}
drivers/compress/qat/qat_comp_pmd.c +75 -36

182 lines not on this page · raw message

Signature · 1 line
2.25.1
Acked-by on v1 2/2
#2 lore raw

Re: [dpdk-dev] [PATCH 2/2] compress/qat: enable compression on QAT GEN3

Quoted 12 lines

-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Wednesday, April 28, 2021 3:42 PM
To: [email protected]; Zhang, Roy Fan <[email protected]>; Kusztal, ArkadiuszX <[email protected]>; [email protected]
Cc: Dybkowski, AdamX <[email protected]>
Subject: [PATCH 2/2] compress/qat: enable compression on QAT GEN3

This patch enables the compression on QAT GEN3 (on hardware versions that support it) and changes the error message shown on older hardware versions that don't support the compression.

Quoted 8 lines

It also fixes the crash that happened on IM buffer allocation failure (not enough memory) during the PMD cleaning phase.

Fixes a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
Fixes 352332744c3a ("compress/qat: add dynamic SGL allocation")

---

Acked-by on v1 1/2
#3 lore raw
In reply to Adam Dybkowski
Quoted 33 lines

-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Wednesday, April 28, 2021 3:42 PM
To: [email protected]; Zhang, Roy Fan <[email protected]>; Kusztal, ArkadiuszX <[email protected]>; [email protected]
Cc: Dybkowski, AdamX <[email protected]>
Subject: [PATCH 1/2] common/qat: increase IM buffer size for QAT GEN3

This patch increases the intermediate buffer size used for the compression on QAT GEN3 to accommodate new hardware versions.

Fixes a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
---
 drivers/common/qat/qat_device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/qat/qat_device.h +1 -2
index e6337c688d..9c6a3ca4e6 100644
@@ -29,7 +29,7 @@ struct qat_dev_cmd_param {
 enum qat_comp_num_im_buffers {
 	QAT_NUM_INTERM_BUFS_GEN1 = 12,
 	QAT_NUM_INTERM_BUFS_GEN2 = 20,
-	QAT_NUM_INTERM_BUFS_GEN3 = 20
+	QAT_NUM_INTERM_BUFS_GEN3 = 64
 };
 
 struct qat_device_info {
--
Quoted 1 line

2.25.1

#4 lore raw
Quoted 9 lines
Quoted 9 lines

Subject: [PATCH 1/2] common/qat: increase IM buffer size for QAT GEN3

This patch increases the intermediate buffer size used for the compression on QAT GEN3 to accommodate new hardware versions.

Fixes a124830a6f00 ("compress/qat: enable dynamic huffman encoding")

---

Series applied to dpdk-next-crypto

Cc [email protected] for both patches.