# QAT wrapper for Ceph
##
-# Build QAT driver library first
-include(BuildQatDrv)
-
set(qat_crypto_plugin_srcs
qat_crypto_accel.cc
qat_crypto_plugin.cc
qcccrypto.cc)
add_library(ceph_crypto_qat SHARED ${qat_crypto_plugin_srcs})
-add_dependencies(ceph_crypto_qat QatDrv)
-target_include_directories(ceph_crypto_qat PRIVATE
- ${EXTRA_LIBS}
- ${QatDrv_INCLUDE_DIRS})
add_dependencies(crypto_plugins ceph_crypto_qat)
-target_link_libraries(ceph_crypto_qat
- ${QatDrv_LIBRARIES})
+target_link_libraries(ceph_crypto_qat PRIVATE
+ QatDrv::qat_s
+ QatDrv::usdm_drv_s)
+
add_dependencies(crypto_plugins ceph_crypto_qat)
set_target_properties(ceph_crypto_qat PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS ceph_crypto_qat DESTINATION ${crypto_plugin_dir})
{}
~QccCryptoPlugin()
{}
- virtual int factory(CryptoAccelRef *cs,
- ostream *ss)
+ virtual int factory(CryptoAccelRef *cs, std::ostream *ss)
{
std::lock_guard<std::mutex> l(qat_init);
if (cryptoaccel == nullptr)
#include <pthread.h>
#include "common/debug.h"
#include "include/scope_guard.h"
+#include "common/dout.h"
+#include "common/errno.h"
// -----------------------------------------------------------------------------
#define dout_context g_ceph_context
#undef dout_prefix
#define dout_prefix _prefix(_dout)
-static ostream&
-_prefix(std::ostream* _dout)
+static std::ostream& _prefix(std::ostream* _dout)
{
return *_dout << "QccCrypto: ";
}
void* QccCrypto::crypt_thread(void *args) {
struct qcc_thread_args *thread_args = (struct qcc_thread_args *)args;
thread_args->qccinstance->do_crypt(thread_args);
+ return thread_args;
}
void QccCrypto::QccFreeInstance(int entry) {