From b3e6844b4e5bf77ba3b22233e2f155065a53b419 Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Sun, 23 Feb 2025 17:11:03 +0000 Subject: [PATCH] rgw: qat: improve QAT logs when HW is miss-configured for QAT encryption addresses an almost silent failure in RGW's QAT crypto integration by improving error logging to guide users towards the correct QAT configuration in addition, change the qat encryption logs to be output via the debug_crypto subsystem (following the precedence of qat compression logs being output by the debug_compressor subsystem) Fixes: https://tracker.ceph.com/issues/70116 Signed-off-by: Mark Kogan --- src/crypto/qat/qcccrypto.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/crypto/qat/qcccrypto.cc b/src/crypto/qat/qcccrypto.cc index 94c98518a90..cbba5ea19a1 100644 --- a/src/crypto/qat/qcccrypto.cc +++ b/src/crypto/qat/qcccrypto.cc @@ -18,7 +18,7 @@ // ----------------------------------------------------------------------------- #define dout_context g_ceph_context -#define dout_subsys ceph_subsys_rgw +#define dout_subsys ceph_subsys_crypto #undef dout_prefix #define dout_prefix _prefix(_dout) @@ -239,7 +239,10 @@ bool QccCrypto::init(const size_t chunk_size, const size_t max_requests) { stat = cpaCySymDpRegCbFunc(qcc_inst->cy_inst_handles[iter], symDpCallback); if (stat != CPA_STATUS_SUCCESS) { - dout(1) << "Unable to register callback function for instance " << iter << " with status = " << stat << dendl; + dout(1) << "QAT init error, Unable to register callback function for instance " << iter << " with status = " << stat << dendl; + if (stat == CPA_STATUS_FAIL) { + dout(1) << "QAT init: check that 'ServicesEnabled' in '/etc/sysconfig/qat' is configured with 'sym'" << dendl; + } return false; } } else { @@ -324,7 +327,7 @@ bool QccCrypto::perform_op_batch(unsigned char* out, const unsigned char* in, si if (!is_init) { - dout(10) << "QAT not initialized in this instance or init failed" << dendl; + dout(1) << "QAT not initialized in this instance or init failed" << dendl; return is_init; } CpaStatus status = CPA_STATUS_SUCCESS; -- 2.39.5