From: Mark Kogan Date: Sun, 23 Feb 2025 17:11:03 +0000 (+0000) Subject: rgw: qat: improve QAT logs when HW is miss-configured for QAT encryption X-Git-Tag: testing/wip-vshankar-testing-20250411.090237-debug~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b3e6844b4e5bf77ba3b22233e2f155065a53b419;p=ceph-ci.git 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 --- 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;