Skip to content

Commit

Permalink
QATlib: 21.05.0 release
Browse files Browse the repository at this point in the history
Add QATlib release 21.05.0.

Signed-off-by: Giovanni Cabiddu <[email protected]>
  • Loading branch information
gcabiddu committed Apr 28, 2021
1 parent 0257eb1 commit 080fdf5
Show file tree
Hide file tree
Showing 176 changed files with 8,518 additions and 4,790 deletions.
19 changes: 12 additions & 7 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This package also links against files with the following licenses:
- ZLIB License

For BSD-3-Clause license, please see the file LICENSE contained in the top
level folder.
level folder.
For Dual BSD/GPLv2 please see the file headers of the relevant files.

===============================================================================
Expand Down Expand Up @@ -162,7 +162,8 @@ Features flags:
Enables legacy names for libraries.

--enable-service
Automatically enables systemd service during installation.
Automatically creates "qat" group and enables systemd service
during installation.

MAX_MR
Number of Miller Rabin rounds for prime operations. Setting this
Expand All @@ -176,10 +177,15 @@ Features flags:

5) System configuration

To be able to use libqat functionalities as non root user, the maximum amount
of locked memory should be set correctly by defining memlock limit in the file
/etc/security/limits.conf.
At least 200000 kB are required.
qat.service requires "qat" group to be created (by calling groupadd qat).
If --enable-service configure option was used, such group will be created
automatically during installation and this step can be skipped.

To be able to use libqat functionalities as non root user:
* the maximum amount of locked memory should be set correctly by defining
memlock limit in the file /etc/security/limits.conf. At least 200000 kB
are required.
* user has to be part of qat group


Legal/Disclaimers
Expand All @@ -204,4 +210,3 @@ without notice.
* Other names and brands may be claimed as the property of others.

===============================================================================

13 changes: 11 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ lib@LIBQATNAME@_la_SOURCES = \
quickassist/lookaside/access_layer/src/common/utils/sal_string_parse.c \
quickassist/lookaside/access_layer/src/common/utils/sal_user_process.c \
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_dyn_instance.c
lib@LIBQATNAME@_la_CFLAGS = -I$(srcdir)/quickassist/utilities/libusdm_drv \
Expand All @@ -213,7 +214,7 @@ lib@LIBQATNAME@_la_LDFLAGS = -version-info $(LIBQAT_VERSION) \
$(COMMON_LDFLAGS) \
-export-symbols-regex '^(cpa|icp_sal)'

pkgincludedir = "$(includedir)/qat"
pkgincludedir = $(includedir)/qat
pkginclude_HEADERS = \
quickassist/include/cpa.h \
quickassist/include/cpa_types.h \
Expand Down Expand Up @@ -248,6 +249,10 @@ endif
systemd_scriptsdir = $(prefix)/sbin
dist_systemd_scripts_SCRIPTS = quickassist/utilities/service/qat_init.sh

install-exec-hook:
cp -P $(DESTDIR)$(libdir)/lib@[email protected] $(DESTDIR)$(libdir)/lib@LIBQATNAME@-$(VERSION).so
cp -P $(DESTDIR)$(libdir)/lib@[email protected] $(DESTDIR)$(libdir)/lib@LIBUSDMNAME@-$(VERSION).so

install-data-hook:
if SERVICE_AC
if [ "$(shell id -u)" == 0 ]; then \
Expand All @@ -259,6 +264,8 @@ if SERVICE_AC
endif

uninstall-hook:
rm $(DESTDIR)$(libdir)/lib@LIBQATNAME@-$(VERSION).so
rm $(DESTDIR)$(libdir)/lib@LIBUSDMNAME@-$(VERSION).so
if SERVICE_AC
if [ "$(shell id -u)" == 0 ]; then \
systemctl daemon-reload; \
Expand Down Expand Up @@ -304,7 +311,9 @@ COMMON_FLAGS = -Wformat \
-fno-strict-overflow \
-fno-delete-null-pointer-checks \
-fwrapv \
-D MAX_MR_ROUND=$(MAX_MR)
-D MAX_MR_ROUND=$(MAX_MR) \
-D _FILE_OFFSET_BITS=64 \
$(MCX16_CFLAGS)

if ICP_DEBUG_AC
ICP_DEBUG = 1
Expand Down
8 changes: 4 additions & 4 deletions Samples.am
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ noinst_PROGRAMS += dc_dp_sample
dc_dp_sample_SOURCES = \
quickassist/lookaside/access_layer/src/sample_code/functional/common/cpa_sample_utils.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/dc_dp_sample/cpa_dc_dp_sample.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/dc_dp_sample/cpa_dc_dp_sample_user.c
quickassist/lookaside/access_layer/src/sample_code/functional/dc/dc_dp_sample/cpa_dc_dp_sample_user.c
dc_dp_sample_CFLAGS = -I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/functional/include \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/common \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/framework \
Expand All @@ -148,7 +148,7 @@ noinst_PROGRAMS += stateless_sample
stateless_sample_SOURCES = \
quickassist/lookaside/access_layer/src/sample_code/functional/common/cpa_sample_utils.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_sample/cpa_dc_stateless_sample.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_sample/cpa_dc_sample_user.c
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_sample/cpa_dc_sample_user.c
stateless_sample_CFLAGS = -I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/functional/include \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/common \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/framework \
Expand All @@ -173,7 +173,7 @@ noinst_PROGRAMS += stateful_sample
stateful_sample_SOURCES = \
quickassist/lookaside/access_layer/src/sample_code/functional/common/cpa_sample_utils.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateful_sample/cpa_dc_stateful_sample.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateful_sample/cpa_dc_sample_user.c
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateful_sample/cpa_dc_sample_user.c
stateful_sample_CFLAGS = -I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/functional/include \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/common \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/framework \
Expand All @@ -198,7 +198,7 @@ noinst_PROGRAMS += stateless_multi_op_checksum_sample
stateless_multi_op_checksum_sample_SOURCES = \
quickassist/lookaside/access_layer/src/sample_code/functional/common/cpa_sample_utils.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/cpa_dc_stateless_multi_op_checksum_sample.c \
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_sample/cpa_dc_sample_user.c
quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_sample/cpa_dc_sample_user.c
stateless_multi_op_checksum_sample_CFLAGS = -I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/functional/include \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/common \
-I$(srcdir)/quickassist/lookaside/access_layer/src/sample_code/performance/framework \
Expand Down
18 changes: 16 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([qatlib], [20.10.0], [[email protected]])
AC_INIT([qatlib], [21.05.0], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign subdir-objects tar-pax])

AM_SILENT_RULES([yes])
Expand All @@ -11,7 +11,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_HEADERS([config.h])

AC_SUBST([LIBQAT_VERSION], [0:0:0])
AC_SUBST([LIBQAT_VERSION], [1:0:1])
AC_SUBST([LIBUSDM_VERSION], [0:0:0])

# Checks for programs.
Expand Down Expand Up @@ -56,6 +56,20 @@ AC_FUNC_MMAP
AC_FUNC_STRNLEN
AC_CHECK_FUNCS([alarm clock_gettime getpagesize gettimeofday memmove memset munmap select socket strerror strstr strtoul strtoull])

# Check if using gcc and if it supports mcx16
AS_IF([test "x$CC" = "xgcc"],
[saved_cflags="$CFLAGS"
CFLAGS=-mcx16
AC_MSG_CHECKING([whether $CC supports -mcx16])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[MCX16_CFLAGS="-mcx16"],
[AC_MSG_RESULT([no])])
CFLAGS="$saved_cflags"
AC_SUBST(MCX16_CFLAGS)],
[]
)

# Check for systemd.
AS_IF([test "x$PKGCONFIG" = "x"],
[AC_MSG_ERROR(pkg-config not found.)],
Expand Down
5 changes: 4 additions & 1 deletion filelist
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ qat_init.sh.8
qatlib.spec.in
qatmgr.8
quickassist/include/cpa.h
quickassist/include/cpa_dev.h
quickassist/include/cpa_types.h
quickassist/include/dc/cpa_dc.h
quickassist/include/dc/cpa_dc_bp.h
Expand Down Expand Up @@ -58,6 +59,7 @@ quickassist/lookaside/access_layer/include/icp_adf_transport_dp.h
quickassist/lookaside/access_layer/include/icp_adf_user_proxy.h
quickassist/lookaside/access_layer/include/icp_buffer_desc.h
quickassist/lookaside/access_layer/include/icp_sal.h
quickassist/lookaside/access_layer/include/icp_sal_congestion_mgmt.h
quickassist/lookaside/access_layer/include/icp_sal_iommu.h
quickassist/lookaside/access_layer/include/icp_sal_poll.h
quickassist/lookaside/access_layer/include/icp_sal_user.h
Expand Down Expand Up @@ -163,6 +165,7 @@ quickassist/lookaside/access_layer/src/common/ctrl/sal_crypto.c
quickassist/lookaside/access_layer/src/common/ctrl/sal_ctrl_services.c
quickassist/lookaside/access_layer/src/common/ctrl/sal_dc_chain.c
quickassist/lookaside/access_layer/src/common/ctrl/sal_list.c
quickassist/lookaside/access_layer/src/common/device/sal_dev_info.c
quickassist/lookaside/access_layer/src/common/include/lac_buffer_desc.h
quickassist/lookaside/access_layer/src/common/include/lac_common.h
quickassist/lookaside/access_layer/src/common/include/lac_hooks.h
Expand Down Expand Up @@ -221,7 +224,6 @@ quickassist/lookaside/access_layer/src/qat_direct/common/include/adf_user_ring.h
quickassist/lookaside/access_layer/src/qat_direct/common/include/adf_user_transport.h
quickassist/lookaside/access_layer/src/qat_direct/common/include/icp_platform.h
quickassist/lookaside/access_layer/src/qat_direct/common/include/icp_platform_user.h
quickassist/lookaside/access_layer/src/qat_direct/include/adf.h
quickassist/lookaside/access_layer/src/qat_direct/include/adf_io_bundles.h
quickassist/lookaside/access_layer/src/qat_direct/include/adf_io_cfg.h
quickassist/lookaside/access_layer/src/qat_direct/include/adf_io_ring.h
Expand Down Expand Up @@ -360,6 +362,7 @@ quickassist/lookaside/access_layer/src/sample_code/performance/qae/linux/user_sp
quickassist/lookaside/access_layer/src/sample_code/performance/qae/qae_mem.h
quickassist/lookaside/access_layer/src/sample_code/performance/qae/qae_mem_utils.h
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
quickassist/lookaside/firmware/include/icp_qat_fw.h
quickassist/lookaside/firmware/include/icp_qat_fw_comp.h
Expand Down
4 changes: 2 additions & 2 deletions qat_init.sh.8
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ qat_init.sh \- QAT resource initializer
initializes the Intel\(co Quick Assist Technology (Intel\(co QAT) devices in preparation for use
by the user space library (qatlib).
.PP
When run on a host system with physical function (PF) QAT devices visible and bound to the QAT device driver,
When run on a host system with physical function (PF) QAT devices visible and bound to the QAT device driver,
the qat_init.sh script will enable sriov on each of the PF devices. This enables the virtual function (VF) devices.
.PP
For each of the QAT VF devices, the qat_init.sh binds the device to the vfio-pci device driver, making it available
for applications using the qatlib user space library.
for applications using the qatlib user space library.
.SH ENVIRONMENT VARIABLES
\fBLKCF_LIST\fR
if set, gives a list of VF devices that should be used for accelerating operations from the Linux crypto framework instead of being available for user space applications.
Expand Down
18 changes: 17 additions & 1 deletion qatlib.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Source0: https://github.com/intel/%{name}/archive/%{version}/%{name}-%{
BuildRequires: systemd gcc make autoconf automake libtool systemd-devel openssl-devel zlib-devel
Requires(pre): shadow-utils
# https://bugzilla.redhat.com/show_bug.cgi?id=1897661
ExcludeArch: %{arm} aarch64 %{power64} s390x
ExcludeArch: %{arm} aarch64 %{power64} s390x i686

%{?systemd_requires}

Expand Down Expand Up @@ -70,6 +70,8 @@ exit 0
%license LICENSE*
%{_libdir}/libqat.so.%{libqat_soversion}*
%{_libdir}/libusdm.so.%{libusdm_soversion}*
%{_libdir}/libqat-%{version}.so
%{_libdir}/libusdm-%{version}.so
%{_sbindir}/qatmgr
%{_sbindir}/qat_init.sh
%{_unitdir}/qat.service
Expand All @@ -84,8 +86,22 @@ exit 0
%exclude %{_libdir}/libusdm.la

%changelog
* Wed Apr 14 2021 Giovanni Cabiddu <[email protected]> - 21.05.0-1
- Update to qatlib 21.05

* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <[email protected]> - 20.10.0-4
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.

* Wed Jan 27 2021 Fedora Release Engineering <[email protected]> - 20.10.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Mon Dec 14 2020 Giovanni Cabiddu <[email protected]> - 20.10.0-2
- Add ExcludeArch i686

* Mon Nov 16 2020 Giovanni Cabiddu <[email protected]> - 20.10.0-1
- Update to qatlib 20.10
- Fixes to spec to address comments from Fedora review

* Mon Aug 10 2020 Mateusz Polrola <[email protected]> - 20.08.0-1
- Initial version of the package
Loading

0 comments on commit 080fdf5

Please sign in to comment.