Running Sample Applications
74
Getting Started Guide
For Yocto*:
#export KERNEL_SOURCE_ROOT=/usr/src/kernel
You can compile for both Kernel space and User space at the same time using the following
commands:
# cd
$ICP_ROOT/quickassist/lookaside/access_layer/src/sample_code/function
al
# make all
The generated Linux* kernel objects and sample applications are located at:
$ICP_ROOT/quickassist/lookaside/access_layer/src/sample_code/function
al/build
10.2.2
Executing the Acceleration Functional Sample Code in Kernel Space
To execute the acceleration functional sample code in Kernel space, enter the commands:
# export ICP_ROOT=/QAT/QAT1.5
# cd
$ICP_ROOT/quickassist/lookaside/access_layer/src/sample_code/function
al/
build
# insmod ./nrbg_sample.ko
Note:
nrbg_sample.ko is one of the functional kernel modules. You can launch the other .ko modules
in a similar fashion.
You may observe an error message similar to the following when submitting the insmod
command:
insmod: error inserting './algchaining_sample.ko': -1 Resource
temporarily
unavailable
This error can be safely ignored. When the test application is completed, the kernel object is
removed which causes this error. Test results for the application are available in
/var/log/messages.
10.2.3
Executing the Acceleration Functional Sample Code in User Space
To execute the acceleration functional sample code in User Space, the kernel memory driver
qaeMemDrv.ko must be installed. See
Acceleration Sample Application”
for information on compiling the performance sample code.
The qaeMemDrv.ko kernel object is built as part of that sample code.
Install the kernel memory driver
qaeMemDrv.ko
as follows:
# insmod
$ICP_ROOT/quickassist/lookaside/access_layer/src/sample_code/build/
qaeMemDrv.ko
To execute the acceleration functional sample code in user space, use the following
commands:
#cd
$ICP_ROOT/quickassist/lookaside/access_layer/src/sample_code/function
al/
build
#./nrbg_sample