---
# System prepended metadata

title: Intel QuickAssist Technology (QAT) building SOP
tags: [' NFVI', QAT]

---

---
tags: QAT, NFVI
---
# Intel QuickAssist Technology (QAT) building SOP
###### tags: `QuickAssist Technology (QAT)` 

## Brief introduction of QAT
Point of QAT: Accelerate encrypting/decrypting and zip/unzip by HW.
Program can call API of QAT, let QAT help accelerate encrypting/decrypting and zip/unzip.

## Platform
Mother Board: CB-1920
CPU: Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz*** 2 (must support QAT)
OS: Ubuntu 18.04 LTS kernel 4.15.0

## SOP

### 1.Login root
```javascript=
$ sudo su
```

### 2.Create directory (put QAT source code later)
```javascript=
$ mkdir qat/
$ cd qat/
```

### 3.apt-get update

### 4.Install basic packages
```javascript=
$  apt-get install build-essential g++ pkg-config libssl-dev zlib1g-dev libudev-dev
```

### 5.Download and unzip QAT source package
```javascript=
$ wget https://01.org/sites/default/files/downloads/qat1.7.l.4.9.0-00008.tar.gz
$ tar –zxof qat1.7.l.4.9.0-00008.tar.gz //in this example, I download qat1.7.l.4.9.0-00008.tar.gz
$ chmod -R 777 *
```

### 6.Install QAT module
```javascript=
$ ./configure
$ make
$ make install
```

### 7.Check the installation was successful
```javascript=
$ lsmod | grep qat
```
![](https://lh3.googleusercontent.com/d/1L8FhMu6Lee6jUHU6meVO_h9wwdInluYO)

### 8.Start QAT service
```javascript=
$ service qat_service start
$ service qat_service status
```
![](https://lh3.googleusercontent.com/d/1ab4db4EJUcxtVtHoPY-LMJWbl4JtlVcb)
State: up (QAT start successful)
If the state: down (QAT off)
Start QAT command
```javascript=
$ service qat_service start
```
or
Restart QAT command:
```javascript=
$ service qat_service restart
```

### 9.Install QAT cpa sample code
```javascript=
$ make samples-install
```

### 10.Execute QAT sample code
```javascript=
$ cd build
$ ./cpa_sample_code
```
![](https://lh3.googleusercontent.com/d/1YGiTC8ky57CIRJJDVpcB-7WBxrGU_J8x)

You can get the test results of all the preset algorithms, but there are two results, API show Traditional, It’s not the QAT test result.
![](https://lh3.googleusercontent.com/d/1ckrp9-NQCbI9f0stxnvenA4X0ktd-jFJ)

API show Data_Plane, that is the QAT test result.
![](https://lh3.googleusercontent.com/d/1kNm5LR1J0tzU8SlbsPNoJS-GJcbvf0Vb)

Default QAT sample code can be get result as following below item.
* AES128-CBC HMAC-SHA1	
* AES256-CBC HMAC-SHA2-512
* AES256-CBC AES-XCBC
* AES128-CBC
* AES256-CBC
* KASUMI_F8

The following algorithm sample code results is QAT data (only one result ). 
* RSA CRT DECRYPT
* DIFFIE-HELLMAN PHASE 2
* DSA VERIFY
* ECDSA VERIFY

## Special thanks
Bruce Li