intel / QAT_Engine

Intel QuickAssist Technology( QAT) OpenSSL Engine (an OpenSSL Plug-In Engine) which provides cryptographic acceleration for both hardware and optimized software using Intel QuickAssist Technology enabled Intel platforms. https://developer.intel.com/quickassist
BSD 3-Clause "New" or "Revised" License
410 stars 128 forks source link

qat_api: Unknown symbol #113

Open 0xFelix opened 5 years ago

0xFelix commented 5 years ago

I tried to install the qat1.7.l.4.6.0-00025.tar.gz driver on Proxmox VE 6 and get the following errors when the installer tries to load the qat_api module:

qat_api: Unknown symbol adf_module_load (err -2) qat_api: Unknown symbol icpSetProcessName (err -2) qat_api: Unknown symbol adf_module_unload (err -2) qat_api: Unknown symbol osalCryptoInterfaceExit (err -2) qat_api: Unknown symbol osalCryptoInterfaceInit (err -2)

The missing symbols should be included in the files libadf_kernel.a and libosal.a under quickassist/lookaside/access_layer/build/libs inside the ICP_ROOT but I suspect they are not linked to qat_api.ko.

The kernel in use is 5.0.21-2-pve / 5.0.21-3.

Is there anything I could try or that I'm missing?

jdschuet commented 5 years ago

@0xFelix - Can you share the steps that were used to configure/compile the QAT1.7 driver? Thanks, Joel

0xFelix commented 5 years ago

Hi Joel,

I used the following steps:

apt install build-essential
apt install pciutils-dev g++ pkg-config libssl-dev
apt install pve-headers
cd /opt
wget https://01.org/sites/default/files/downloads/qat1.7.l.4.6.0-00025.tar.gz
mkdir qat
cd qat
tar xzf ../qat1.7.l.4.6.0-00025.tar.gz
./configure --enable-kapi
make install
jdschuet commented 5 years ago

Hi Felix,

Is access to QAT from kernel space required for your application? If it is not required, can you run the configure step without the --enable-kapi?

Thanks, Joel

0xFelix commented 5 years ago

Hi Joel,

yes I think so. I'd like to use QAT in combination with ZFS.

jdschuet commented 5 years ago

Hi Felix, You are correct - QAT kernel API support is required for ZFS. With the 5.x kernel there are changes that break the building of the module. There are changes required to the QAT build system files to support the 5.x kernel. These changes are targeted for future release. Is using a 4.x kernel an option? Or is 5.0 kernel support required now?

Thanks, Joel

0xFelix commented 5 years ago

Hi Joel,

Proxmox VE 6 is using a 5.x kernel, a 4.x kernel is not available. So I guess things are rather complicated, too bad.... 5.x kernel support would be really helpful.

Best regards, Felix

zyluo commented 5 years ago

Any update on the Kernel 5.x support?

zcwang commented 5 years ago

I also suffer the same issue with qat1.7.l.4.6.0-00025 when enable-kapi added, ... [ 1207.582776] qat_api: Unknown symbol adf_module_load (err -2) [ 1207.582816] qat_api: Unknown symbol icpSetProcessName (err -2) [ 1207.582851] qat_api: Unknown symbol adf_module_unload (err -2) [ 1207.582887] qat_api: Unknown symbol osalCryptoInterfaceExit (err -2) [ 1207.582917] qat_api: Unknown symbol osalCryptoInterfaceInit (err -2) ... My kernel version is Linux cooldevice 5.0.0-23-generic #24~18.04.1-Ubuntu SMP Mon Jul 29 16:12:28

KaraRyougi commented 4 years ago

I have a similar issue with qat1.7.l.4.7.0-00006.tar.gz when I tried to enable SR-IOV by enable-icp-sriov=host. I have the following errors:

Building for linux_2.6
  MODPOST 1 modules
ERROR: "osalCryptoInterfaceInit" [/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "osalCryptoInterfaceExit" [/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "adf_module_unload" [/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "icpSetProcessName" [/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "adf_module_load" [/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!

The kernel version is Linux 5.3.13-1-pve #1 SMP PVE 5.3.13-1 (Thu, 05 Dec 2019 07:18:14 +0100) x86_64 GNU/Linux

KaraRyougi commented 4 years ago

Actually, I found that the build will fail without any configure flags. @jdschuet

...
ERROR: "osalCryptoInterfaceInit" [/root/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "osalCryptoInterfaceExit" [/root/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "adf_module_unload" [/root/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "icpSetProcessName" [/root/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
ERROR: "adf_module_load" [/root/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined!
make[5]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
make[4]: *** [Makefile:1659: modules] Error 2
make[4]: Leaving directory '/usr/src/linux-headers-5.3.13-1-pve'
Copying outputs to build/linux_2.6/kernel_space
make[3]: Leaving directory '/root/QAT/quickassist/lookaside/access_layer/src'
cp /root/QAT/quickassist/lookaside/access_layer//src/build/linux_2.6/kernel_space/qat_api.ko /root/QAT/build/;
cp: cannot stat '/root/QAT/quickassist/lookaside/access_layer//src/build/linux_2.6/kernel_space/qat_api.ko': No such file or directory
make[2]: *** [Makefile:179: lac_kernel] Error 1
make[2]: Leaving directory '/root/QAT/quickassist'
make[1]: *** [Makefile:1043: quickassist-all] Error 2
make[1]: Leaving directory '/root/QAT'
make: *** [Makefile:637: all] Error 2
ajgnet commented 3 years ago

I am having the same error when compiling on 5.10.9-1. Was there any resolution?

ERROR: modpost: "__sync_bool_compare_and_swap_16" [/opt/intel/QAT/quickassist/lookaside/access_layer/src/qat_api.ko] undefined! make[6]: *** [/usr/src/linux-headers-5.10.0-2-common/scripts/Makefile.modpost:111: /opt/intel/QAT/quickassist/lookaside/access_layer/src/Module.symvers] Error 1 make[6]: *** Deleting file '/opt/intel/QAT/quickassist/lookaside/access_layer/src/Module.symvers' make[5]: *** [/usr/src/linux-headers-5.10.0-2-common/Makefile:1721: modules] Error 2 make[4]: *** [/usr/src/linux-headers-5.10.0-2-common/Makefile:185: __sub-make] Error 2 make[4]: Leaving directory '/usr/src/linux-headers-5.10.0-2-amd64' Copying outputs to build/linux_2.6/kernel_space make[3]: Leaving directory '/opt/intel/QAT/quickassist/lookaside/access_layer/src' cp /opt/intel/QAT/quickassist/lookaside/access_layer//src/build/linux_2.6/kernel_space/qat_api.ko /opt/intel/QAT/build/; cp: cannot stat '/opt/intel/QAT/quickassist/lookaside/access_layer//src/build/linux_2.6/kernel_space/qat_api.ko': No such file or directory make[2]: *** [Makefile:178: lac_kernel] Error 1 make[2]: Leaving directory '/opt/intel/QAT/quickassist' make[1]: *** [Makefile:1092: quickassist-all] Error 2 make[1]: Leaving directory '/opt/intel/QAT' make: *** [Makefile:686: all] Error 2