Rate This Document
Findability
Accuracy
Completeness
Readability

Installation Using RPM Packages (KAE 1.0)

KAE 1.0 RPM software packages include hisi_hpre, hisi_sec2, hisi_zip, libkaezip, libkae, UACCE, and libwd. UACCE and libwd are required, and the others are optional.

Prerequisites

Procedure

The hisi_zip driver package depends on the UACCE package, and the libkaezip package depends on the libwd package.

If only the zlib library compression algorithm needs to be accelerated, install only the UACCE, hisi_zip, libwd, and libkaezip packages.

  1. Use an SSH tool to remotely log in to the Linux CLI as the root user.
  2. Copy the KAE RPM software packages to a custom directory.
  3. Install the accelerator driver software packages.
    • Method 1: Run the rpm -ivh *.rpm command to install all KAE RPM software packages.
      1
      rpm -ivh *.rpm
      
      Command output:
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      Preparing...                          ################################# [100%]
      checking installed modules
      Updating / installing...
         1:uacce-1.0.1-1.centos7.6         ################################# [ 14%]
      modules installed
         2:libwd-1.0.1-1.centos7.6         ################################# [ 29%]
         3:libkae-1.0.1-1.centos7.6        ################################# [ 43%]
      checking installed modules
         7:hisi_zip-1.0.1-1.centos7.6      ################################# [100%]
      modules installed
      
    • Method 2: Install the RPM packages in sequence. See the following example to install the uacce-1.0.1 software package.
      1
      rpm -ivh uacce-1.0.1-1.centos7.6.aarch64.rpm
      
      Command output:
      1
      2
      3
      4
      5
      Preparing...                          ################################# [100%]
      checking installed modules
      Updating / installing... 
      1:uacce-1.0.1-1.centos7.6             ################################# [100%]
      modules installed
      

      Similarly, install the hisi_zip driver package and libwd engine package in sequence.

  4. Check whether the RPM packages are installed in the system.
    1. Check whether UACCE is installed.
      1
      rpm -ql uacce
      

      Command output:

      1
      2
      /lib/modules/4.14.0-115.el7a.0.1.aarch64/extra/hisi_qm.ko
      /lib/modules/4.14.0-115.el7a.0.1.aarch64/extra/uacce.ko
      
    2. Check whether hisi_zip is installed.
      1
      rpm -ql hisi_zip
      

      Command output:

      1
      2
      /lib/modules/4.14.0-115.el7a.0.1.aarch64/extra/hisi_zip.ko
      /etc/modproe.d/hisi_zip.conf
      
    3. Check whether the corresponding modules are generated in the installation directory.
      1
      ls -al /lib/modules/`uname -r`/extra
      

      Command output:

      1
      2
      3
      4
      5
      total 3672
      drwxr-xr-x. 2 root root    118 Nov 17 21:56 .
      drwxr-xr-x. 7 root root   4096 Nov 17 21:56 ..
      -rw-r--r--. 1 root root 396784 Nov 12 17:32 hisi_zip.ko
      -rw-r--r--. 1 root root 467160 Nov 12 17:32 uacce.ko
      
    4. Check whether the corresponding configuration files are generated in /etc/modprobe.d/.
      1
      ls -al /etc/modprobe.d/
      

      Command output:

      1
      2
      3
      4
      5
      6
      total 36
      drwxr-xr-x.   2 root root  140 Nov 17 21:56 .
      drwxr-xr-x. 127 root root 8192 Nov 17 22:14 ..
      -rw-r--r--.   1 root root  166 Oct 30  2018 firewalld-sysctls.conf
      -rw-r--r--.   1 root root   43 Nov 17 21:56 hisi_zip.conf
      -rw-r--r--.   1 root root  674 Jul  4  2018 tuned.conf
      
  5. (Optional) If a SUSE OS is used, set allow_unsupported_modules in the /etc/modprobe.d/10-unsupported-modules.conf configuration file to 1 before loading external drivers.
  6. Load the accelerator drivers to the kernel.
    • Method 1: Restart the system.
    • Method 2: Manually load the drivers in sequence in the CLI and check whether the loading is successful.
      1. Query UACCE driver modules that have been loaded to the kernel.
        1
        lsmod | grep uacce
        

        If no command output is displayed, perform 6.b to 6.c to load the corresponding modules to the kernel.

      2. Load the UACCE driver.
        1
        modprobe uacce
        
      3. Load the hisi_zip driver to the kernel based on the configuration file in /etc/modprobe.d/hisi_zip.conf.
        1
        modprobe hisi_zip
        
      4. Query UACCE driver modules that have been loaded to the kernel again.
        1
        lsmod | grep uacce
        
        If the following information is displayed, the loading is successful.
        1
        uacce                36864  3 hisi_zip
        

Verifying the Installation

  1. View the KAE RPM software packages.
    1
    rpm -qa uacce hisi_zip
    
    If the following information is displayed, the installation is successful:
    1
    2
    uacce-1.0.1-1.centos7.6.aarch64
    hisi_zip-1.0.1-1.centos7.6.aarch64
    
  2. Check the accelerator devices in the virtual file system.
    1
    ls -al /sys/class/uacce/
    
    Command output:
    1
    2
    3
    total 0
    lrwxrwxrwx. 1 root root 0 Nov 17 22:09 hisi_zip-6 -> ../../devices/pci0000:74/0000:74:00.0/0000:75:00.0/uacce/hisi_zip-6
    lrwxrwxrwx. 1 root root 0 Nov 17 22:09 hisi_zip-7 -> ../../devices/pci0000:b4/0000:b4:00.0/0000:b5:00.0/uacce/hisi_zip-7
    
  3. Check whether the accelerator engines of the zlib library take effect.
    Run the ldd command to check whether the zlib library is linked to libwd and libkaezip.
    1
    ldd /usr/local/kaezip/lib/libz.so.1.2.11
    
    If the following information is displayed, the zlib library has been installed. You can also run the ldd command to check whether libwd and libkaezip are used.
    1
    2
    3
    4
    5
            linux-vdso.so.1 =>  (0x0000ffff80280000)
            libc.so.6 => /lib64/libc.so.6 (0x0000ffff80080000)
            libwd.so.1 => /lib64/libwd.so.1 (0x0000ffff80040000)
            /lib/ld-linux-aarch64.so.1 (0x0000ffff80290000)
            libkaezip.so => /usr/local/kaezip/lib/libkaezip.so (0x0000ffff80830000)