diff --git a/.tools/Makefile.am b/.tools/Makefile.am index bb9ecd2e..3528cedc 100644 --- a/.tools/Makefile.am +++ b/.tools/Makefile.am @@ -177,7 +177,7 @@ MAKE = make err-files && make endif install-data-am: - cp -L --remove-destination .libs/libqat.so $(ENGINE_LIB) + cp -f .libs/libqat.so $(ENGINE_LIB) err-files: if QAT_OPENSSL_102 diff --git a/.tools/configure.ac b/.tools/configure.ac index 0603a082..6e664a40 100644 --- a/.tools/configure.ac +++ b/.tools/configure.ac @@ -249,7 +249,7 @@ then AC_CHECK_LIB(qat_s, cpaCyRsaDecrypt, [AC_MSG_NOTICE([QAT Offload with libraries from standard location])], [AC_MSG_NOTICE([QAT Library not found in the standard location])], []) if test "x$ac_cv_lib_qat_s_cpaCyRsaDecrypt" = "xno" then - AC_CHECK_LIB(crypto-mb, ifma_getversion, [AC_ARG_WITH(cflags_multibuff_offload, AS_HELP_STRING(), , cflags_multibuff_offload="-DOPENSSL_MULTIBUFF_OFFLOAD")], [AC_MSG_ERROR([Both QAT and Multibuff IFMA Library not found in the standard path. Install either QAT or IFMA library])], []) + AC_CHECK_LIB(crypto_mb, ifma_getversion, [AC_ARG_WITH(cflags_multibuff_offload, AS_HELP_STRING(), , cflags_multibuff_offload="-DOPENSSL_MULTIBUFF_OFFLOAD")], [AC_MSG_ERROR([Both QAT and Multibuff IFMA Library not found in the standard path. Install either QAT or IFMA library])], []) AC_SUBST(cflags_multibuff_offload) AM_CONDITIONAL([OPENSSL_MULTIBUFF_OFFLOAD], [test "x$ac_cv_lib_crypto_mb_ifma_getversion" = "xyes"]) fi @@ -283,7 +283,7 @@ fi if test "x$with_multibuff_install_dir" = "x" -a "x$cflags_multibuff_offload" != "x" then - AC_CHECK_LIB(crypto-mb, ifma_getversion, [AC_MSG_NOTICE([Using from IFMA Library from Default location])], [AC_MSG_ERROR([IFMA Library not found, Install the IFMA library or provide the path to the library using --with-multibuff_install_dir])],[]) + AC_CHECK_LIB(crypto_mb, ifma_getversion, [AC_MSG_NOTICE([Using from IFMA Library from Default location])], [AC_MSG_ERROR([IFMA Library not found, Install the IFMA library or provide the path to the library using --with-multibuff_install_dir])],[]) with_multibuff_install_dir="/usr/local/lib" fi @@ -595,7 +595,7 @@ AC_SUBST(with_ICP_LAC_API_DIR) AC_ARG_WITH(includes_driver, AS_HELP_STRING(), , includes_driver="-I\$(with_ICP_API_DIR) -I\$(with_ICP_LAC_API_DIR) -I\$(with_ICP_SAL_API_DIR)") AC_SUBST(includes_driver) -AC_ARG_WITH(includes_multibuff, AS_HELP_STRING(), , includes_multibuff="-I\$(with_multibuff_dir)/include/public") +AC_ARG_WITH(includes_multibuff, AS_HELP_STRING(), , includes_multibuff="-I\$(with_multibuff_dir)/include") AC_SUBST(includes_multibuff) AC_ARG_WITH(DRIVER, AS_HELP_STRING(), , DRIVER="qat") @@ -650,7 +650,7 @@ fi if test "x$with_multibuff_install_dir" != "x" -a "x$cflags_multibuff_offload" != "x" then - AC_ARG_WITH(QAT_SHARED_LIB_DEPS_MULTIBUFF, AS_HELP_STRING(), , QAT_SHARED_LIB_DEPS_MULTIBUFF=["-Wl,-rpath,\$(with_multibuff_install_dir) -L\$(with_multibuff_install_dir) -lcrypto-mb"]) + AC_ARG_WITH(QAT_SHARED_LIB_DEPS_MULTIBUFF, AS_HELP_STRING(), , QAT_SHARED_LIB_DEPS_MULTIBUFF=["-Wl,-rpath,\$(with_multibuff_install_dir) -L\$(with_multibuff_install_dir) -lcrypto_mb"]) AC_SUBST(QAT_SHARED_LIB_DEPS_MULTIBUFF) fi diff --git a/README.md b/README.md index 5620f32d..3c8035b2 100644 --- a/README.md +++ b/README.md @@ -162,8 +162,8 @@ repository: [10]:https://github.com/openssl/openssl/pull/10080 -* Support for Multibuffer offload is extended to RSA 2k only and other algorithms will - use the standard OpenSSL implemenation when this feature is enabled. +* Support for Multibuffer offload is extended to RSA 2k only. Other key sizes will + use the standard OpenSSL implementation when this feature is enabled. ## Installation Instructions @@ -982,10 +982,9 @@ Mandatory (when using the Intel® IFMA Mutibuffer Library) Specify the path to the source code of the Intel(R) IFMA Mutibuffer library. This path is needed for compilation in order to locate the Intel(R) IFMA Multibuffer header files. If you do not specify this the build will fail. - For example if using Intel® IFMA Mutibuffer library that was - unpacked to `/IFMA`, and you are using the Intel(R) Icelake Server or Client - platform for multibuff offload then you would use the following setting: - --with-multibuff_dir=/IFMA + For example if using Intel® IFMA Mutibuffer library that was cloned from + the ipp-crypto GitHub to `/ipp-crypto`, then you would use the following + setting: --with-multibuff_dir=/ipp-crypto/sources/ippcp/crypto_mb Optional @@ -1492,22 +1491,22 @@ Multiply Add (IFMA) library. The Intel® QAT OpenSSL\* Engine Multibuffer Support, when enabled by the user using the build instructions mentioned below performs operation by batching up -multiple requests maintained in queues and uses the OpenSSL async infrastucture +multiple requests maintained in queues and uses the OpenSSL async infrastructure to submit the batched requests upto 8 to IFMA API which processes them in parallel using AVX512 vector instructions. Multibuffer optimizations will be beneficial to use in asynchronous operations where there are many parallel connections. ### Requirements -1. This Intel® QAT OpenSSL\* Engine supports Multibuffer based software -optimizations for RSA only in the Ice Lake Server(ICX) or Ice Lake Client(ICL) -platform and not supported in any other platform. -2. Successful operation of the Multibuffer support requires a software tool + +Successful operation of the Multibuffer support requires a software tool chain that supports OpenSSL\* 1.1.1 and Intel® AVX-512 Integer Fused -Multiply Add (IFMA) library version 0.5.3 cloned and installed using the -instructions in the Readme from the [IFMA GitHub][13] +Multiply Add (IFMA) library version 0.5.3 or above cloned from the +[ipp-crypto GitHub][13] repo and installed using the instructions in +the Readme from [IFMA Source][14] -[13]:https://github.com/intel/ipp-crypto/tree/develop/sources/ippcp/ifma_rsa_mb +[13]:https://github.com/intel/ipp-crypto +[14]:https://github.com/intel/ipp-crypto/tree/develop/sources/ippcp/crypto_mb ### Build Instructions for Intel® QAT OpenSSL\* Engine to enable Multibuffer Support @@ -1515,9 +1514,9 @@ The following example is assuming: * The Intel® QAT OpenSSL\* Engine was cloned to its own location at the root of the drive: `/`. -* The Intel® AVX-512 Integer Fused Multiply Add (IFMA) library was cloned from the - [IFMA Github][13] to its own location at the root of the drive: `/IFMA` and installed - to `/usr/local/lib` +* The Intel® AVX-512 Integer Fused Multiply Add (IFMA) library was cloned + from the [ipp-crypto GitHub][13] to its own location at the root of the + drive: `/` and IFMA Multibuffer library installed to `/usr/local/lib` * OpenSSL\* 1.1.1 was installed to `/usr/local/ssl`. To build and install the Intel® QAT OpenSSL\* Engine with Multibuffer offload: @@ -1526,7 +1525,7 @@ To build and install the Intel® QAT OpenSSL\* Engine with Multibuffer offloa cd /QAT_Engine ./autogen.sh ./configure \ ---with-multibuff_dir=/IFMA \ +--with-multibuff_dir=/ipp-crypto/sources/ippcp/crypto_mb \ --with-openssl_install_dir=/usr/local/ssl make make install diff --git a/multibuff_rsa.c b/multibuff_rsa.c index 3938f063..f3e3a840 100644 --- a/multibuff_rsa.c +++ b/multibuff_rsa.c @@ -57,7 +57,7 @@ #include #include -#include "rsa_ifma.h" +#include "crypto_mb/rsa_ifma.h" #include "multibuff_init.h" #include "multibuff_rsa.h" #include "qat_events.h"