]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: qat: improve QAT logs when HW is miss-configured for QAT encryption
authorMark Kogan <mkogan@ibm.com>
Sun, 23 Feb 2025 17:11:03 +0000 (17:11 +0000)
committerMark Kogan <mkogan@ibm.com>
Sun, 23 Feb 2025 17:11:03 +0000 (17:11 +0000)
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 <mkogan@ibm.com>
src/crypto/qat/qcccrypto.cc

index 94c98518a90b6a20761602c3c50a68b32e05319a..cbba5ea19a1c5dfdc93db0b0ae8bd9682716dd46 100644 (file)
@@ -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;