]>
git.proxmox.com Git - ceph.git/blob - ceph/src/crypto/qat/qat_crypto_plugin.h
2 * Ceph - scalable distributed file system
4 * Copyright (C) 2017 Intel Corporation
6 * Author: Qiaowei Ren <qiaowei.ren@intel.com>
7 * Author: Ganesh Mahalingam <ganesh.mahalingam@intel.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
16 #ifndef QAT_CRYPTO_PLUGIN_H
17 #define QAT_CRYPTO_PLUGIN_H
19 #include "crypto/crypto_plugin.h"
20 #include "crypto/qat/qat_crypto_accel.h"
23 class QccCryptoPlugin
: public CryptoPlugin
{
24 static std::mutex qat_init
;
28 explicit QccCryptoPlugin(CephContext
* cct
) : CryptoPlugin(cct
)
32 virtual int factory(CryptoAccelRef
*cs
,
35 std::lock_guard
<std::mutex
> l(qat_init
);
36 if (cryptoaccel
== nullptr)
37 cryptoaccel
= CryptoAccelRef(new QccCryptoAccel
);