Running Sample Applications
Getting Started Guide
73
A similar pattern is repeated for each of the tests.
Note:
The sample code will log the error messages shown below. They can be safely ignored, as the
SoC does not support data compression.
main():1041 Unable to Get Number of DC instances
Sample Code Complete
10.1.4
Unloading the Sample Code
Once the kernel space sample code test has completed, the message Sample Code Complete
is displayed. The module can then be unloaded using the following command:
# rmmod cpa_sample_code.ko
Once the user space sample code test has completed, the kernel memory driver
qaeMemDrv.ko can be unloaded using the following command:
# rmmod qaeMemDrv.ko
10.2
Acceleration Functional Sample Code
The software package contains a set of sample tests that exercises acceleration functionality.
This section describes the steps required to build and execute the sample tests.
The sample application is provided for both Kernel Space and User Space and the following
sections contain instructions for both.
Note:
The memory driver included with the sample application is a sample memory driver and is not
intended for actual deployment.
10.2.1
Compiling the Acceleration Functional Sample Code
The acceleration functional sample code can be compiled manually.
Note:
These instructions assume the software package has been untarred to the /QAT directory and
that the kernel source files were placed in the directory specified in this guide.
The following environment variable must be set to build the modules:
export ICP_ROOT=<QATdir>
Note:
Where
<QATdir>
is
/QAT/QAT1.6
or
/QAT/QAT1.5
, depending on what hardware support
is required. If building with mux support, always use the QAT1.6 sample code.
The sample code is compiled with the default assumption that the kernel source header
files are located in one of the following directories:
−
For 64-bit:
/usr/src/kernels/3.1.0-7.fc16.x86_64
−
For 32-bit:
/usr/src/kernels/3.1.0-7.fc16.i686
If the kernel source header files are located in a different directory, create the environment
variable with the directory of desired target kernel sources. For example:
# export KERNEL_SOURCE_ROOT=/usr/src/kernels/`uname -r`