Skip to content

Commit

Permalink
QATlib: 24.09.0 release
Browse files Browse the repository at this point in the history
Changes from 24.02.0 to 24.09.0:

 * Improved performance scaling in multi-thread applications
   (--enable-icp-thread-specific-usdm)
 * Set core affinity mapping based on NUMA node to improve
   performance (near-linear scaling) on multi-socket platforms
 * Bug fixes (See Resolved section in README.md)

Signed-off-by: Fiona Trahe <[email protected]>
Signed-off-by: Firos Sadarul <[email protected]>
  • Loading branch information
fionatrahe authored and gcabiddu committed Sep 10, 2024
1 parent d8ce710 commit a9e5fcf
Show file tree
Hide file tree
Showing 135 changed files with 4,703 additions and 3,510 deletions.
55 changes: 45 additions & 10 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ Web-based documentation for QATlib and related components is available at:
Using the QATlib package
========================

Note: Instructions assume running on Fedora and as non-root user who can
get root access using sudo, i.e. user is in sudoers group. Command-lines
may be different in other Linux distributions.
Note: The build instructions provided are for RPM-based Linux distributions
such as Fedora, Red Hat Enterprise Linux (RHEL), CentOS, and Rocky Linux.
For Debian-based distributions like Debian and Ubuntu, refer to the
installation guide at:
https://intel.github.io/quickassist/qatlib/install.html#installing-from-sources
These instructions assume operation as a non-root user with sudo
privileges. Users on other distributions may need to adapt the command-lines
accordingly.


Check System Prerequisites
Expand Down Expand Up @@ -128,12 +133,25 @@ Check System Prerequisites
-> Platform Configuration
-> Miscellaneous Configuration
-> SR-IOV Support
* Grub settings
set intel_iommu on in grub file, e.g. in Fedora:
* sudo vi /etc/default/grub
* to GRUB_CMDLINE_LINUX add "intel_iommu=on"
* sudo grub2-mkconfig -o /etc/grub2-efi.cfg
* sudo shutdown -r now
* GRUB Configuration Updates
- Step 1: Edit the GRUB configuration file.
* Open the file with a text editor, for example, `sudo vi /etc/default/grub`.

- Step 2: Add the necessary parameters to the `GRUB_CMDLINE_LINUX` entry.
* Enable Intel IOMMU by adding "intel_iommu=on". The line should look like:
`GRUB_CMDLINE_LINUX="... intel_iommu=on"`.
* Add VFIO-PCI device IDs. For a device with the ID 8086:4941, add
"vfio-pci.ids=8086:4941". The line should look like:
`GRUB_CMDLINE_LINUX="... vfio-pci.ids=8086:4941"`.
* Refer to the list of supported devices at
https://intel.github.io/quickassist/qatlib/requirements.html#supported-devices
for other device IDs.

- Step 3: Update the GRUB configuration and reboot the system.
* Generate a new GRUB configuration file:
`sudo grub2-mkconfig -o /etc/grub2-efi.cfg`.
* Reboot the system to apply the changes:
`sudo shutdown -r now`.


===============================================================================
Expand Down Expand Up @@ -182,7 +200,7 @@ Compilation and installation - quickstart instructions

# Install dependencies
sudo dnf install -y gcc systemd-devel automake autoconf libtool
sudo dnf install -y pkg-config openssl-devel zlib-devel nasm
sudo dnf install -y pkg-config openssl-devel zlib-devel nasm numactl-devel

# Clone QATlib into ~/qatlib, i.e. in your home dir
cd ~
Expand Down Expand Up @@ -249,6 +267,7 @@ Compilation and installation - detailed instructions
libraries:
openssl-devel
zlib-devel
numactl-devel

----------------------------------------------------------------------------

Expand Down Expand Up @@ -699,6 +718,19 @@ Full list of Configuration options
Enable deprecated legacy crypto algorithms. See the README.md
for the list of algorithms which are deprecated by default.

--enable-icp-thread-specific-usdm
USDM allocates and handles memory specific to threads.
(For multi-thread apps, allocated memory information will be
maintained separately for each thread; employs thread local storage
feature i.e. TLS. It avoids locking that was needed when a global
data structure being used in non thread-specific implementation).
NOTE: Any memory allocated by a thread must be freed by the same
thread. If it passes the memory to other threads for use, it's
responsible for any synchronisation between those threads.
The thread which did the allocation must live until after all
threads using the memory are finished with it, as any thread
memory not yet freed may be cleaned up on termination of the thread.

MAX_MR
Number of Miller Rabin rounds for prime operations. Setting this
to a smaller value reduces the memory usage required by the
Expand All @@ -714,6 +746,9 @@ Full list of Configuration options
Common issues
=============

Additional details are available at:
https://intel.github.io/quickassist/qatlib/index.html

Issue: errors like these are seen in system logs:
* 4xxx 0000:6b:00.0: IOMMU should be enabled for SR-IOV to work
* vfio-pci: probe of 0000:6b:00.1 failed with error -22
Expand Down
23 changes: 19 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ libadf_la_SOURCES = \
quickassist/lookaside/access_layer/src/qat_direct/common/adf_process_proxy.c \
quickassist/lookaside/access_layer/src/qat_direct/common/adf_user_cfg.c \
quickassist/lookaside/access_layer/src/qat_direct/common/adf_user_device.c \
quickassist/lookaside/access_layer/src/qat_direct/common/adf_user_dyn.c \
quickassist/lookaside/access_layer/src/qat_direct/common/adf_user_ETring_mgr_dp.c \
quickassist/lookaside/access_layer/src/qat_direct/common/adf_user_init.c \
quickassist/lookaside/access_layer/src/qat_direct/common/adf_user_ring.c \
Expand Down Expand Up @@ -107,13 +106,20 @@ qatmgr_CFLAGS = -I$(srcdir)/quickassist/lookaside/access_layer/src/qat_direct/vf
-D USER_SPACE \
$(COMMON_FLAGS)

qatmgr_LDADD = -lpthread
qatmgr_LDADD = -lpthread -lnuma

lib_LTLIBRARIES = lib@[email protected]
lib@LIBUSDMNAME@_la_SOURCES = \
quickassist/utilities/libusdm_drv/user_space/vfio/qae_mem_utils_vfio.c \
quickassist/utilities/libusdm_drv/user_space/qae_mem_utils_common.c \
quickassist/utilities/libusdm_drv/user_space/vfio/qae_mem_hugepage_utils_vfio.c
if ICP_THREAD_SPECIFIC_USDM_AC
lib@LIBUSDMNAME@_la_SOURCES += \
quickassist/utilities/libusdm_drv/user_space/qae_mem_multi_thread_utils.c
else
lib@LIBUSDMNAME@_la_SOURCES += \
quickassist/utilities/libusdm_drv/user_space/qae_mem_common.c
endif
lib@LIBUSDMNAME@_la_CFLAGS = -I$(srcdir)/quickassist/utilities/libusdm_drv \
-I$(srcdir)/quickassist/utilities/libusdm_drv/include \
-I$(srcdir)/quickassist/utilities/libusdm_drv/user_space \
Expand Down Expand Up @@ -221,6 +227,7 @@ lib@LIBQATNAME@_la_SOURCES = \
quickassist/lookaside/access_layer/src/common/utils/sal_versions.c \
quickassist/lookaside/access_layer/src/common/device/sal_dev_info.c \
quickassist/lookaside/access_layer/src/user/sal_user.c \
quickassist/lookaside/access_layer/src/user/sal_user_congestion_mgmt.c \
quickassist/lookaside/access_layer/src/user/sal_user_dyn_instance.c
if USE_CCODE_CRC
lib@LIBQATNAME@_la_SOURCES += \
Expand All @@ -245,7 +252,7 @@ lib@LIBQATNAME@_la_CFLAGS = -I$(srcdir)/quickassist/utilities/libusdm_drv \
-D USER_SPACE \
-D LAC_BYTE_ORDER=__LITTLE_ENDIAN \
$(COMMON_FLAGS)
lib@LIBQATNAME@_la_LIBADD = libosal.la libadf.la lib@[email protected] -lcrypto
lib@LIBQATNAME@_la_LIBADD = libosal.la libadf.la lib@[email protected] -lcrypto -lnuma
if !USE_CCODE_CRC
lib@LIBQATNAME@_la_LIBADD += crc32_gzip_refl_by8.lo crc64_ecma_norm_by8.lo
endif
Expand Down Expand Up @@ -317,7 +324,9 @@ endif

dist_man_MANS = qat_init.sh.8 qatmgr.8

EXTRA_DIST = LICENSE \
EXTRA_DIST = INSTALL README.md SECURITY.md LICENSE \
filelist \
versionfile \
autogen.sh \
quickassist/lookaside/firmware/include \
quickassist/include \
Expand All @@ -327,6 +336,7 @@ EXTRA_DIST = LICENSE \
quickassist/utilities/osal \
quickassist/utilities/libusdm_drv/include \
quickassist/utilities/libusdm_drv/user_space \
quickassist/utilities/service/qat \
quickassist/lookaside/access_layer/src/sample_code

DISTCHECK_CONFIGURE_FLAGS = \
Expand Down Expand Up @@ -401,6 +411,11 @@ else
QAT_LEGACY_ALGORITHMS = n
endif

if ICP_THREAD_SPECIFIC_USDM_AC
ICP_THREAD_SPECIFIC_USDM = 1
COMMON_FLAGS += -DICP_THREAD_SPECIFIC_USDM
endif

include Samples.am

########################
Expand Down
Loading

0 comments on commit a9e5fcf

Please sign in to comment.