]>
git.proxmox.com Git - ceph.git/blob - ceph/src/crypto/isa-l/isal_crypto_plugin.h
2 * Ceph - scalable distributed file system
4 * Copyright (C) 2016 Mirantis, Inc.
6 * Author: Adam Kupczyk <akupczyk@mirantis.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
15 #ifndef ISAL_CRYPTO_PLUGIN_H
16 #define ISAL_CRYPTO_PLUGIN_H
17 // -----------------------------------------------------------------------------
18 #include "crypto/crypto_plugin.h"
19 #include "crypto/isa-l/isal_crypto_accel.h"
20 #include "arch/intel.h"
21 #include "arch/probe.h"
22 // -----------------------------------------------------------------------------
25 class ISALCryptoPlugin
: public CryptoPlugin
{
29 explicit ISALCryptoPlugin(CephContext
* cct
) : CryptoPlugin(cct
)
33 virtual int factory(CryptoAccelRef
*cs
,
36 if (cryptoaccel
== nullptr)
39 if (ceph_arch_intel_aesni
&& ceph_arch_intel_sse41
) {
40 cryptoaccel
= CryptoAccelRef(new ISALCryptoAccel
);