Skip to content

Commit b3e6844

Browse files
committed
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 <[email protected]>
1 parent 64849a8 commit b3e6844

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/crypto/qat/qcccrypto.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// -----------------------------------------------------------------------------
2020
#define dout_context g_ceph_context
21-
#define dout_subsys ceph_subsys_rgw
21+
#define dout_subsys ceph_subsys_crypto
2222
#undef dout_prefix
2323
#define dout_prefix _prefix(_dout)
2424

@@ -239,7 +239,10 @@ bool QccCrypto::init(const size_t chunk_size, const size_t max_requests) {
239239

240240
stat = cpaCySymDpRegCbFunc(qcc_inst->cy_inst_handles[iter], symDpCallback);
241241
if (stat != CPA_STATUS_SUCCESS) {
242-
dout(1) << "Unable to register callback function for instance " << iter << " with status = " << stat << dendl;
242+
dout(1) << "QAT init error, Unable to register callback function for instance " << iter << " with status = " << stat << dendl;
243+
if (stat == CPA_STATUS_FAIL) {
244+
dout(1) << "QAT init: check that 'ServicesEnabled' in '/etc/sysconfig/qat' is configured with 'sym'" << dendl;
245+
}
243246
return false;
244247
}
245248
} else {
@@ -324,7 +327,7 @@ bool QccCrypto::perform_op_batch(unsigned char* out, const unsigned char* in, si
324327

325328
if (!is_init)
326329
{
327-
dout(10) << "QAT not initialized in this instance or init failed" << dendl;
330+
dout(1) << "QAT not initialized in this instance or init failed" << dendl;
328331
return is_init;
329332
}
330333
CpaStatus status = CPA_STATUS_SUCCESS;

0 commit comments

Comments
 (0)