Skip to content

Commit a8021cf

Browse files
fionatrahegcabiddu
authored andcommitted
Improve INSTALL doc instructions
1. Update cmdline to cater for yasm dependency qatlib build from sources depends on yasm since 22.07 release. (This is temporary, will be removed in a future release) So adding installation of yasm to command line instructions. 2. Refine steps to help detect missing firmware Include xz file format. Add instruction to run dracut on any firmware file update. Add extra prerequisites step. Add that missing fw issue would be seen on running systemctl start qat. Add missing "sudo" on running dracut. 3. Make clear that VFs are not a prerequisite. VFs will get created during the installation process if they're not already there from a previous installation. Prerequisites text is adjusted to reflect that. Also the PF text is adjusted so it will be easier to add new devices. 4. Differentiate between lib and sample_code steps Users may want to use the library with their own application, so make clearer which steps are necessary for installation of the lib for use with any application and which are specific to running the provided sample application. Signed-off-by: Fiona Trahe <[email protected]>
1 parent d30d3fc commit a8021cf

File tree

1 file changed

+44
-36
lines changed

1 file changed

+44
-36
lines changed

INSTALL

+44-36
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
===============================================================================
22

33

4-
July 2022
4+
October 2022
55
===============================================================================
66

77

@@ -63,17 +63,20 @@ Check System Prerequisites
6363
running from a distro many of these are taken care of, if not here they
6464
are:
6565

66-
* platform must have an Intel® Communications Chipset 4xxx Series device
67-
Use "lspci -d 8086:4940" to check PF devices exist.
68-
Use "lspci -d 8086:4941" to check VF devices exist.
69-
* OR platform must have an Intel® 401xx series device
70-
Use "lspci -d 8086:4942" to check PF devices exist.
71-
Use "lspci -d 8086:4943" to check VF devices exist.
72-
VFs are only visible if all prerequisites below are satisfied.
66+
* platform must have one of the following Intel® Communications devices:
67+
4xxx : Use "lspci -d 8086:4940" to check Physical Function (PF)
68+
devices are present.
69+
401xx : Use "lspci -d 8086:4942" to check PF devices are present.
70+
Note: Later, after "systemctl start qat" or "make install" steps, the
71+
corresponding Virtual Function devices will also be visible and bound
72+
to the vfio-pci driver.
73+
4xxx : Use "lspci -d 8086:4941" to check VF devices have been created.
74+
401xx : Use "lspci -d 8086:4943" to check VF devices have been created.
7375
* firmware must be available
7476
Check that these files exist, if not contact [email protected]
75-
/lib/firmware/qat_4xxx.bin
76-
/lib/firmware/qat_4xxx_mmp.bin
77+
/lib/firmware/qat_4xxx.bin or /lib/firmware/qat_4xxx.bin.xz
78+
/lib/firmware/qat_4xxx_mmp.bin or /lib/firmware/qat_4xxx_mmp.bin.xz
79+
On updating these files run "sudo dracut --force" to update initramfs.
7780
* kernel driver must be running
7881
Use "lsmod | grep qat" to check that these kernel modules are running:
7982
intel_qat
@@ -82,6 +85,8 @@ Check System Prerequisites
8285
* Linux kernel v5.11+ (This is for crypto, for compression use v5.17+)
8386
* Fedora 34+ (for compression use 36+)
8487
* RHEL 8.4+ (for compression use 9.0+)
88+
* each PF device must be bound to the 4xxx driver
89+
Use "ls /sys/bus/pci/drivers/4xxx/" to show the BDFs of each bound PF
8590
* BIOS settings
8691
Intel VT-d and SR-IOV must be enabled in the platform BIOS.
8792
Consult your platform guide on how to do this.
@@ -118,31 +123,29 @@ Compilation and installation - quickstart instructions
118123
# Install qatlib
119124
sudo dnf install -y qatlib
120125

121-
# Add your user to qat group
126+
# Add your user to qat group and re-login to make the change effective
122127
sudo usermod -a -G qat `whoami`
128+
sudo su -l $USER
123129

124130
# Enable qat service and make persistent after reboot
125131
sudo systemctl enable qat
126132
sudo systemctl start qat
127133

128-
# Increase amount of locked memory for your user
129-
# Note: cpa_sample_code requires a mimimum of 500MB to run compression tests.
130-
# To add 500MB:
131-
sudo cp /etc/security/limits.conf /etc/security/limits.conf.qatlib_bak
132-
echo `whoami` - memlock 500000 | sudo tee -a /etc/security/limits.conf > /dev/null
134+
# The library is now ready to use with your application
133135

134-
# Re-login in order to update the user's group
135-
sudo su -l $USER
136-
137-
# If you want to run sample code you need to build from sources, these
138-
# steps will download qatlib source rpm, extract it and build sample code.
139-
# Install dependencies
140-
sudo dnf install -y gcc systemd-devel automake autoconf libtool
141-
sudo dnf install -y openssl-devel zlib-devel
136+
# You can also follow these steps to try out a pre-built sample
137+
# application:
142138

143139
# Install qatlib-tests rpm
144140
sudo dnf install -y qatlib-tests
145141

142+
# cpa_sample_code requires a mimimum of 500MB to run its compression demo
143+
# To increase amount of locked memory for your user to 500MB:
144+
sudo cp /etc/security/limits.conf /etc/security/limits.conf.qatlib_bak
145+
echo `whoami` - memlock 500000 | sudo tee -a /etc/security/limits.conf > /dev/null
146+
# Re-login in order to make the change effective
147+
sudo su -l $USER
148+
146149
# Run it! (takes several minutes to complete)
147150
cpa_sample_code
148151

@@ -152,7 +155,7 @@ Compilation and installation - quickstart instructions
152155

153156
# Install dependencies
154157
sudo dnf install -y gcc systemd-devel automake autoconf libtool
155-
sudo dnf install -y openssl-devel zlib-devel
158+
sudo dnf install -y openssl-devel zlib-devel yasm
156159

157160
# Clone QATlib into ~/qatlib, i.e. in your home dir
158161
cd ~
@@ -166,27 +169,31 @@ Compilation and installation - quickstart instructions
166169
sudo make install
167170

168171
# Add your user to the "qat" group which was automatically
169-
# created by --enable-service
172+
# created by --enable-service. Then re-login to make the change
173+
# effective, this will also move you back into your home directory
170174
sudo usermod -a -G qat `whoami`
175+
sudo su -l $USER
176+
177+
# The library is now ready to use with your application
171178

172-
# Increase amount of locked memory for your user
173-
# Note: cpa_sample_code requires a mimimum of 500MB to run compression tests.
174-
# To add 500MB:
179+
# You can also follow these steps to try out a sample application:
180+
181+
# cpa_sample_code requires a mimimum of 500MB to run its compression demo
182+
# To increase the amount of locked memory for your user to 500MB:
175183
sudo cp /etc/security/limits.conf /etc/security/limits.conf.qatlib_bak
176184
echo `whoami` - memlock 500000 | sudo tee -a /etc/security/limits.conf > /dev/null
177-
178-
# Re-login in order to update the user group, this will move you back
179-
# into your home dir
185+
# Re-login in order to make the change effective
180186
sudo su -l $USER
181187

182188
# Compression sample code expects to find data files at a known location,
183189
# so call the samples-install target to put them there
190+
cd qatlib
184191
sudo make samples-install
185192

186-
# Run! (takes several minutes to complete)
193+
# Run it! (takes several minutes to complete)
187194
cpa_sample_code
188195

189-
# no need to leave the samples installed, so cleanup
196+
# No need to leave the samples installed, so cleanup
190197
sudo make samples-uninstall
191198

192199
===============================================================================
@@ -205,6 +212,7 @@ Compilation and installation - detailed instructions
205212
make
206213
autotools (automake, autoconf, libtool)
207214
systemd-devel
215+
yasm
208216

209217
libraries:
210218
openssl-devel
@@ -460,7 +468,7 @@ Common issues
460468
After updating re-login so the changes take effect:
461469
sudo su -l $USER
462470

463-
Issue: error on make install
471+
Issue: error on make install or on systemctl start qat
464472
"Job for qat.service failed because the control process exited with
465473
error code"
466474
System logs (dmesg) show QAT kernel module failed with error like:
@@ -476,7 +484,7 @@ Common issues
476484
see pre-requisites section above.
477485
In order to load the firmware, the driver must be reloaded, i.e. run:
478486
"sudo rmmod qat_4xxx; sudo modprobe qat_4xxx; sudo systemctl start qat".
479-
For a persistent change (fix for future reboots) run "dracut --force".
487+
For a persistent change (on future reboots) run "sudo dracut --force".
480488

481489
Issue: X kernel taint flag seen on SUSE from SLES15-SP4 onwards
482490
"intel_qat: externally supported module,setting X kernel taint flag."

0 commit comments

Comments
 (0)