Skip to content

Commit ec81762

Browse files
sfirosfionatrahe
authored andcommitted
QATlib: 24.02.0 release
Changes from 23.11.0 to 24.02.0: * Added Heartbeat support. * Added support for QAT GEN 5 devices, including support for a range of crypto wireless algorithms. * RAS - Device error reset and recovery handling. * Bug fixes (See Resolved section in README.md) Signed-off-by: Firos Sadarul <[email protected]>
1 parent abe15d7 commit ec81762

File tree

98 files changed

+4002
-666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+4002
-666
lines changed

INSTALL

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Reference
66
=========
77

88

9-
- Intel® Communications Chipset 4xxx Series Software for Linux*
9+
- Intel® Communications Chipset 4xxx/4xxxx Series Software for Linux*
1010
Getting Started Guide
1111

1212
===============================================================================
@@ -70,13 +70,15 @@ Check System Prerequisites
7070
4xxx : Use "lspci -d 8086:4940" to check Physical Function (PF)
7171
devices are present.
7272
401xx : Use "lspci -d 8086:4942" to check PF devices are present.
73+
420xx : Use "lspci -d 8086:4946" to check PF devices are present.
7374
Note: Later, after "systemctl start qat" or "make install" steps, the
7475
corresponding Virtual Function devices will also be visible and bound
7576
to the vfio-pci driver.
7677
4xxx : Use "lspci -d 8086:4941" to check VF devices have been created.
7778
401xx : Use "lspci -d 8086:4943" to check VF devices have been created.
79+
420xx : Use "lspci -d 8086:4947" to check VF devices have been created.
7880
* firmware must be available
79-
Check that these files exist:
81+
For 4xxx or 401xx devices check that these files exist:
8082
/lib/firmware/qat_4xxx.bin or /lib/firmware/qat_4xxx.bin.xz
8183
/lib/firmware/qat_4xxx_mmp.bin or /lib/firmware/qat_4xxx_mmp.bin.xz
8284
If not, download the firmware images from linux-firmware and copy them
@@ -85,17 +87,23 @@ Check System Prerequisites
8587
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qat_4xxx_mmp.bin
8688
sudo mv qat_4xxx.bin /lib/firmware
8789
sudo mv qat_4xxx_mmp.bin /lib/firmware
88-
On updating these files run "sudo dracut --force" to update initramfs.
90+
For 420xx, these firmware files are needed:
91+
/lib/firmware/qat_420xx.bin
92+
/lib/firmware/qat_420xx_mmp.bin
93+
If not present please contact [email protected]
94+
On updating any firmware files run "sudo dracut --force" to update
95+
initramfs.
8996
* kernel driver must be running
9097
Use "lsmod | grep qat" to check that these kernel modules are running:
9198
intel_qat
92-
qat_4xxx
99+
qat_4xxx or qat_420xx
93100
They should load by default if using any of the following:
94101
* A recent Linux kernel (see https://intel.github.io/quickassist/qatlib/requirements.html#kernel-firmware-requirements )
95-
* Fedora 36+
102+
* Fedora 36+ (39+ for 420xx)
96103
* RHEL 8.4+ (for compression use 9.0+)
97-
* each PF device must be bound to the 4xxx driver
98-
Use "ls /sys/bus/pci/drivers/4xxx/" to show the BDFs of each bound PF
104+
* each PF device must be bound to the 4xxx or 420xx driver
105+
Use "cd /sys/bus/pci/drivers; ls 4xxx; ls 420xx" to show the BDFs of
106+
each bound PF
99107
* BIOS settings
100108
Intel VT-d and SR-IOV must be enabled in the platform BIOS.
101109
Consult your platform guide on how to do this.
@@ -367,7 +375,9 @@ Compilation and installation - detailed instructions
367375

368376
In Managed mode, qatmgr manages allocation of the VF resources to
369377
each process on process startup.
370-
The following parameters can be set in /etc/sysconfig/qat:
378+
A sample config file can be found in quickassist/utilities/service/qat.
379+
it can be copied to /etc/sysconfig/qat and used to set the following
380+
parameters:
371381

372382
POLICY
373383
Indicates how many VFs will be assigned to each process.
@@ -572,7 +582,7 @@ Compilation and installation - detailed instructions
572582
continue
573583
fi
574584

575-
if [ "$did" != "0x4941" ] && [ "$did" != "0x4943" ]; then
585+
if [ "$did" != "0x4941" ] && [ "$did" != "0x4943" ] && [ "$did" != "0x4947" ]; then
576586
continue
577587
fi
578588

@@ -661,6 +671,9 @@ Full list of Configuration options
661671
--enable-dc-error-simulation
662672
Enables Data Compression Error Simulation.
663673

674+
--enable-hb-error-simulation
675+
Enables Heartbeat Error Simulation.
676+
664677
--enable-legacy-lib-names
665678
Enables legacy names for libraries.
666679

@@ -719,10 +732,12 @@ Common issues
719732
bound to qat_4xxx:
720733
sudo lspci -vvd:4940 | grep "Kernel driver in use".
721734
sudo lspci -vvd:4942 | grep "Kernel driver in use"
735+
sudo lspci -vvd:4946 | grep "Kernel driver in use"
722736
upgrade to a recent Linux Kernel.
723737
(2) No VFs available. Check VFs are available and bound to vfio-pci
724738
sudo lspci -vvd:4941 | grep "Kernel driver in use"
725739
sudo lspci -vvd:4943 | grep "Kernel driver in use"
740+
sudo lspci -vvd:4947 | grep "Kernel driver in use"
726741

727742
Issue: On running ./autogen.sh following warning appears:
728743
aclocal: warning: couldn't open directory 'm4': No such file or dir...
@@ -786,6 +801,14 @@ Common issues
786801
extra 's'. Sorry if it causes confusion.
787802
Fix: sudo make samples-uninstall
788803

804+
Issue: on Ubuntu on make install, this error may be seen:
805+
“Failed to start qat.service: Unit qat.service not found.”
806+
Likely cause: The qat.service file is not installed by Ubuntu in the
807+
expected directory
808+
Fix: Explicitly configure the systemd path to where Ubuntu has installed
809+
the qat.service, e.g.
810+
./configure --enable-service systemdsystemunitdir=/lib/systemd/system/
811+
789812
===============================================================================
790813

791814

Makefile.am

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,11 @@ ICP_DC_ERROR_SIMULATION = 1
384384
COMMON_FLAGS += -DICP_DC_ERROR_SIMULATION
385385
endif
386386

387+
if ICP_HB_ERROR_SIMULATION_AC
388+
ICP_HB_FAIL_SIM = 1
389+
COMMON_FLAGS += -DICP_HB_FAIL_SIM
390+
endif
391+
387392

388393
if USE_CCODE_CRC
389394
COMMON_FLAGS += -DUSE_CCODE_CRC

README.md

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626

2727
| Date | Doc Revision | Version | Details |
2828
|----------|:-------------:|------:|:------|
29+
| February 2024 | 012 | 24.02 | - Added Heartbeat support. <br> - Added support for QAT GEN 5 devices, including support for a range of crypto wireless algorithms. <br> - RAS - Device error reset and recovery handling. <br> - Bug Fixes. See [Resolved Issues](#resolved-issues). |
2930
| November 2023 | 011 | 23.11 | - Support DC NS (NoSession) APIs. <br> - Support DC compressBound APIs. <br> - Support Symmetric Crypto SM3 & SM4. <br> - Support Asymmetric Crypto SM2. <br> - Bug Fixes. See [Resolved Issues](#resolved-issues). |
30-
| August 2023 | 010 | 23.08 | - Removal of following insecure algorithms: Diffie-Hellman and Elliptic curves less than 256-bits. <br> - Additional configuration profiles, including sym which facilitates improved symmetric crypto performance. <br> - DC Chaining (Hash then compress) <br> - Bug Fixes. See [Resolved Issues](#resolved-issues). |
31+
| August 2023 | 010 | 23.08 | - Removal of following insecure algorithms: Diffie-Hellman and Elliptic curves less than 256-bits. <br> - Additional configuration profiles, including sym which facilitates improved symmetric crypto performance. <br> - DC Chaining (Hash then compress) <br> - Bug Fixes. See [Resolved Issues](#resolved-issues). <br> - The shared object version is changed from 3->4. |
3132
| February 2023 | 009 | 23.02 | - Added configuration option --enable-legacy-algorithms to use these insecure crypto algorithms and disabled them by default (AES-ECB, SHA-1, SHA2-224, SHA3-224, RSA512/1024/1536, DSA)<br>- Refactored code in quickassist/utilities/libusdm_drv<br>- Bugfixes<br>- Updated documentation with configuration and tuning information |
3233
| November 2022 | 008 | 22.07.2 | - Changed from yasm to nasm for assembly compilation<br> - Added configuration option to use C implementation of soft CRC implementation instead of asm<br>- Added support for pkg-config<br>- Added missing lock around accesses to some global data in qatmgr |
3334
| October 2022 | 007 | 22.07.1 | - Fix for QATE-86605 |
34-
| July 2022 | 006 | 22.07 | - Added support for lz4/lz4s compression algorithms<br>- Added support for Compression End-to-end (E2E) integrity check<br>- Added support for PKE generic point multiply<br>- Updated QAT APIs<br>- Enabled CPM2.0b<br>- Split rpm package |
35+
| July 2022 | 006 | 22.07 | - Added support for lz4/lz4s compression algorithms<br>- Added support for Compression End-to-end (E2E) integrity check<br>- Added support for PKE generic point multiply<br>- Updated QAT APIs (as a result the shared object version changed from 2->3). <br>- Enabled CPM2.0b<br>- Split rpm package |
3536
| November 2021 | 005 | 21.11 | - Added qatlib-tests rpm package<br>- Added option to configure script to skip building sample code |
3637
| August 2021 | 004 | 21.08 | - Added support for deflate compression - Compress and Verify (CnV) and Compress and Verify and Recover (CnVnR)<br>- Added Physical Function to Virtual Function (PFVF) communication support |
3738
| May 2021 | 003 | 21.05 | - Added support for AES-CCM 192/265<br>- Added support for SHA3-224/384/512 (no partials support)<br>- Added support for ChaCha20-Poly1305<br>- Added support for PKE 8K (RSA, DH, ModExp, ModInv)<br>- Fixed device enumeration on different nodes<br>- Fixed pci_vfio_set_command for 32 bit builds |
@@ -61,7 +62,7 @@ The following services are available in qatlib via the QuickAssist API:
6162
SM4-CBC, SM4-CTR)
6263
* Message digest/hash ([SHA1](#insecure-algorithms), SHA2 ([224](#insecure-algorithms)/256/384/512),
6364
SHA3 ([224](#insecure-algorithms)/256/384/512) (no partials support), SM3) and
64-
authentication (AES-CBC-MAC, AES-XCBC-MAC)
65+
authentication (AES-CBC-MAC, AES-XCBC-MAC, AES-CMAC-128)
6566
* Algorithm chaining (one cipher and one hash in a single operation)
6667
* Authenticated encryption (CCM-128 (no partials support),
6768
GCM (128/192/256) (no partials support), GMAC (no partials support)
@@ -90,6 +91,9 @@ The following services are available in qatlib via the QuickAssist API:
9091
* DC NS (No Session) APIs
9192
* Compression Chaining (Deflate only)
9293
* Hash then compress
94+
* Wireless Algorithms (supported on QAT GEN 5 devices)
95+
* Ciphers (SNOW3G-UEA2, ZUC-128, ZUC-256, AES-F8)
96+
* Message digest/hash (SNOW3G-UIA2, ZUC-128, ZUC-256) and authentication (AES-CMAC-128, AES-CMAC-192, AES-CMAC-256)
9397

9498
This package includes:
9599
* libqat: user space library for QAT devices exposed via the vfio kernel driver
@@ -120,7 +124,8 @@ To enable these algorithms, use the following configuration option:
120124
Please refer to [INSTALL](INSTALL) for details on installing the library.
121125

122126
## Supported Devices
123-
* 4xxx (QAT gen 4 devices)
127+
* 4xxx (QAT GEN 4 devices)
128+
* 420xx (QAT GEN 5 devices)
124129

125130
Earlier generations of QAT devices (e.g. c62x, dh895xxcc, etc.) are not
126131
supported.
@@ -187,7 +192,7 @@ where: \<Component\> is one of the following:
187192
| QATE-41707 | [CY - Incorrect digest returned when performing a plain hash operation on input data of size 4GB or larger.](#qate-41707) |
188193
| QATE-76073 | [GEN - If PF device configuration is modified without restarting qatmgr, undefined behavior may occur.](#qate-76073) |
189194
| QATE-76698 | [GEN - Multi-process applications running in guest will fail when running with default Policy settings.](#qate-76698) |
190-
| QATE-94369 | [GEN - SELinux Preventing QAT Service Startup.](#qate-94369) |
195+
| QATE-98551 | [GEN - On a multi-socket platform, there can be a performance degradation on the remote sockets.](#qate-98551) |
191196

192197
## QATE-3241
193198
| Title | CY - cpaCySymPerformOp when used with parameter checking may reveal the amount of padding. |
@@ -230,22 +235,24 @@ where: \<Component\> is one of the following:
230235
| Affected OS | Linux |
231236
| Driver/Module | CPM-IA - General |
232237

233-
## QATE-94369
234-
| Title | GEN - SELinux Preventing QAT Service Startup |
238+
## QATE-98551
239+
| Title | GEN - On a multi-socket platform, there can be a performance degradation on the remote sockets. |
235240
|----------|:-------------
236-
| Reference # | QATE-94369 |
237-
| Description | The qat service fails to start due to SELinux preventing the qat_init.sh script and qatmgr from accessing resources. The issue occurs when the system is running with SELinux enabled, causing insufficient permissions for the qat_init.sh script and qatmgr to function correctly. |
238-
| Implication | This issue affects the proper functioning of the qat service on systems with SELinux enabled, potentially preventing QAT virtual functions (VFs) from functioning. |
239-
| Resolution | None available. |
241+
| Reference # | QATE-98551 |
242+
| Description | On a multi-socket platform, there can be a performance degradation on remote sockets. This can arise when either the threads are not affinitised to the core on the socket the device is on and/or the memory is not allocated on the appropriate NUMA node. |
243+
| Implication | Performance on socket 0 is as expected, but does not scale proportionally on remote sockets. |
244+
| Resolution | This will be fixed in a future release. In the meantime, applications on a multi-socket platform should configure threads using a QAT VF device on a remote socket to be affinitised to the core on that remote socket. Then the memory allocations are more likely to be done on the remote socket, with minimal performance impact. |
240245
| Affected OS | Linux |
241-
| Driver/Module | QAT Linux Upstream - User |
246+
| Driver/Module | CPM-IA - General |
242247

243248
## Resolved Issues
244249
Resolved issues relating to the Intel® QAT software are described
245250
in this section.
246251

247252
| Issue ID | Description |
248253
|-------------|------------|
254+
| QATE-97977 | [DC - 'Unable to get the physical address of Data Integrity buffer' error may be observed when using user-provided address translation functions.](#qate-97977) |
255+
| QATE-94369 | [GEN - SELinux Preventing QAT Service Startup.](#qate-94369) |
249256
| QATE-94286 | [GEN - Compression services not detected when crypto-capable VFs are added to VM.](#qate-94286) |
250257
| QATE-95905 | [GEN - Fix build when building outside of main directory, issue #56](#qate-95905) |
251258
| QATE-93844 | [DC - cpaDcLZ4SCompressBound is not returning correct value, which could lead to a buffer overflow.](#qate-93844)
@@ -255,6 +262,28 @@ in this section.
255262
| QATE-76846 | [GEN - Forking and re-initializing use-cases do not work](#qate-76846) |
256263
| QATE-12241 | [CY - TLS1.2 with secret key lengths greater than 64 are not supported.](#qate-12241) |
257264

265+
## QATE-97977
266+
| Title | DC - 'Unable to get the physical address of Data Integrity buffer' error may be observed when using user-provided address translation functions. |
267+
|----------|:-------------
268+
| Reference # | QATE-97977 |
269+
| Description | When using Integrity CRC feature (integrityCrcCheck in CpaDcOpData) and also user provided address translation functions (cpaDcSetAddressTranslation) the above error may be observed. |
270+
| Implication | Compression request operations may fail in this scenario. |
271+
| Resolution | Fixed in 24.02 |
272+
| Affected OS | Linux |
273+
| Driver/Module | CPM-IA - Data Compression |
274+
275+
276+
277+
## QATE-94369
278+
| Title | GEN - SELinux Preventing QAT Service Startup |
279+
|----------|:-------------
280+
| Reference # | QATE-94369 |
281+
| Description | The qat service fails to start due to SELinux preventing the qat_init.sh script and qatmgr from accessing resources. The issue occurs when the system is running with SELinux enabled, causing insufficient permissions for the qat_init.sh script and qatmgr to function correctly. |
282+
| Implication | This issue affects the proper functioning of the qat service on systems with SELinux enabled, potentially preventing QAT virtual functions (VFs) from functioning. |
283+
| Resolution | The fix is not in the scope of qatlib. Instead there are three possible methods to handle this issue: <br> 1) Update selinux-policy as seen in https://github.com/fedora-selinux/selinux-policy/pull/1992 <br>2) Disable SElinux <br>3) Update mode to SElinux mode to permissive using following commands: <br>semanage permissive -a qatlib_exec_t<br>semanage permissive -a qatlib_t<br>The audit warnings may be generated, but qatlib will be allowed access to vfio devices. |
284+
| Affected OS | Linux |
285+
| Driver/Module | CPM-IA - General |
286+
258287
## QATE-94286
259288
| Title | GEN - Compression services not detected when crypto-capable VFs are also added to VM. |
260289
|----------|:-------------

Samples.am

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,22 @@ ec_montedwds_sample_CFLAGS = -I$(srcdir)/quickassist/lookaside/access_layer/src/
358358
$(COMMON_FLAGS)
359359
ec_montedwds_sample_LDADD = $(COMMON_SAMPLE_LDFLAGS) libcpa_sample_code_s.la
360360

361+
noinst_PROGRAMS += zuc_sample
362+
zuc_sample_SOURCES = \
363+
quickassist/lookaside/access_layer/src/sample_code/functional/common/cpa_sample_utils.c \
364+
quickassist/lookaside/access_layer/src/sample_code/functional/sym/zuc_sample/cpa_zuc_sample.c \
365+
quickassist/lookaside/access_layer/src/sample_code/functional/sym/zuc_sample/cpa_zuc_sample_user.c
366+
zuc_sample_CFLAGS = -I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/functional/include \
367+
$(COMMON_SAMPLE_INCLUDES) \
368+
$(COMMON_SAMPLE_CFLAGS) \
369+
$(COMMON_FLAGS)
370+
zuc_sample_LDADD = $(COMMON_SAMPLE_LDFLAGS) libcpa_sample_code_s.la
371+
361372
samples: $(lib_LTLIBRARIES) cpa_sample_code dc_dp_sample dc_stateless_sample \
362373
dc_stateless_multi_op_sample algchaining_sample ccm_sample \
363374
cipher_sample gcm_sample hash_file_sample hash_sample ipsec_sample \
364375
ssl_sample sym_dp_sample dh_sample prime_sample hkdf_sample \
365-
ec_montedwds_sample eddsa_sample chaining_sample
376+
ec_montedwds_sample eddsa_sample chaining_sample zuc_sample
366377

367378
samples-install: samples
368379
@install -D -m 755 $(srcdir)/.libs/cpa_sample_code $(DESTDIR)$(bindir)/cpa_sample_code
@@ -384,6 +395,7 @@ samples-install: samples
384395
@install -D -m 755 $(srcdir)/.libs/prime_sample $(DESTDIR)$(bindir)/prime_sample
385396
@install -D -m 755 $(srcdir)/.libs/hkdf_sample $(DESTDIR)$(bindir)/hkdf_sample
386397
@install -D -m 755 $(srcdir)/.libs/ec_montedwds_sample $(DESTDIR)$(bindir)/ec_montedwds_sample
398+
@install -D -m 755 $(srcdir)/.libs/zuc_sample $(DESTDIR)$(bindir)/zuc_sample
387399
@install -D -m 644 $(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary $(DESTDIR)$(datadir)/qat/calgary
388400
@install -D -m 644 $(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary32 $(DESTDIR)$(datadir)/qat/calgary32
389401
@install -D -m 644 $(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/compression/canterbury $(DESTDIR)$(datadir)/qat/canterbury
@@ -413,6 +425,7 @@ samples-uninstall:
413425
@rm -rf $(DESTDIR)$(bindir)/prime_sample
414426
@rm -rf $(DESTDIR)$(bindir)/hkdf_sample
415427
@rm -rf $(DESTDIR)$(bindir)/ec_montedwds_sample
428+
@rm -rf $(DESTDIR)$(bindir)/zuc_sample
416429
@rm -rf $(DESTDIR)$(datadir)/qat/calgary
417430
@rm -rf $(DESTDIR)$(datadir)/qat/calgary32
418431
@rm -rf $(DESTDIR)$(datadir)/qat/canterbury

configure.ac

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ([2.69])
5-
AC_INIT([qatlib], [23.11.0], [[email protected]])
5+
AC_INIT([qatlib], [24.02.0], [[email protected]])
66
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign subdir-objects tar-pax])
77

88
AM_SILENT_RULES([yes])
@@ -11,7 +11,7 @@ AC_USE_SYSTEM_EXTENSIONS
1111
AC_CONFIG_MACRO_DIRS([m4])
1212
AC_CONFIG_HEADERS([config.h])
1313

14-
AC_SUBST([LIBQAT_VERSION], [5:0:1])
14+
AC_SUBST([LIBQAT_VERSION], [6:0:2])
1515
AC_SUBST([LIBUSDM_VERSION], [1:0:1])
1616

1717
# Checks for programs.
@@ -220,6 +220,13 @@ AC_ARG_ENABLE(dc-error-simulation,
220220
)
221221
AM_CONDITIONAL([ICP_DC_ERROR_SIMULATION_AC], [test x$dc_error_simulation = xtrue])
222222

223+
# ICP_HB_ERROR_SIMULATION
224+
AC_ARG_ENABLE(hb-error-simulation,
225+
AS_HELP_STRING([--enable-hb-error-simulation], [Enables Heartbeat Error Simulation.]),
226+
[hb_error_simulation=true], [hb_error_simulation=false]
227+
)
228+
AM_CONDITIONAL([ICP_HB_ERROR_SIMULATION_AC], [test x$hb_error_simulation = xtrue])
229+
223230
AC_ARG_ENABLE(legacy-lib-names,
224231
AS_HELP_STRING([--enable-legacy-lib-names], [Enables legacy names for libraries.]),
225232
[

0 commit comments

Comments
 (0)