我要评分
获取效率
正确性
完整性
易理解

Installing the KAE Software

After the KAE license is installed, install the KAE software to use the KAEzlib compression module.

The KAE driver mentioned in this document is of the KAE 2.0 version. The source package contains the KAE kernel driver, UADK framework, KAEOpensslEngine, and KAEzlib modules. You can use a script to install all of the software or only install the KAE kernel driver, UADK framework, and KAEzlib. After the installation, check whether the installation is successful.

  • The system environment must meet the environment requirements before installation.
  • The root account is used for KAE installation.
  • Both root and non-root accounts can run KAE. A non-root account needs to obtain permissions for related devices (/dev/hisi_*) and files (/var/log/kae.*).
  • The KAE driver must be installed on both the source and target physical hosts.
  • For details, see https://www.hikunpeng.com/document/detail/en/kunpengaccel/compress/devg-kaezip.
  1. Download the KAE 2.0 source package.
    Download the compressed package from https://gitee.com/kunpengcompute/KAE/tree/kae2/ or use the git clone command to download it.
    1
    git clone https://gitee.com/kunpengcompute/KAE.git -b kae2
    
  2. Check whether the OpenSSL version meets the requirements.
    Check whether the OpenSSL version is 1.1.1x or 3.0.x.
    1
    openssl version
    
  3. Install the dependencies.
    1
    yum install -y meson gnutls-devel yajl-devel libtirpc-devel libxslt glib2-devel libxml2-devel kernel-devel automake libtool autoconf numactl-devel
    
  4. Set the OpenSSL environment variables.
    • OpenSSL 1.1.1x:
      1
      export OPENSSL_ENGINES=/usr/local/lib/engines-1.1
      
    • OpenSSL 3.0.x:
      1
      export OPENSSL_ENGINES=/usr/local/lib/engines-3.0
      
  5. Install the kernel driver.
    1. Go to the directory of the KAE source package. It is advised to run the clearup command first.
      1
      sh build.sh cleanup
      
    2. Install the KAE driver and KAEzlib library.
      1
      2
      3
      sh build.sh driver
      sh build.sh uadk
      sh build.sh zlib
      
      Alternatively, install all KAE modules (KAE driver, UADK, KAEzlib, and OpenSSLEngine):
      1
      sh build.sh all
      

    If the installation fails and a message is displayed indicating that header files are missing, install the related dependencies and run the installation command again.

  6. Check whether the installation is successful.
    1. Check whether the KAE driver is installed.

      Check whether the accelerator engine file system exists in the corresponding directory.

      1
      ll /sys/class/uacce/
      

      If the following information is displayed, the driver is installed:

    2. Use lsmod to check whether the driver is installed.
      1
      lsmod | grep uacce
      

      If the following information is displayed, the driver is installed:

    3. Check whether UADK is installed.
      1
      ll /usr/local/lib/libwd*
      

    4. Check whether the KAEzlib library is installed.
      1
      ll /usr/local/kaezip/lib/
      

      1
      ldd /usr/local/kaezip/lib/libz.so.1.2.11
      

    • If no device file is queried after the device is restarted and a driver is installed, a possible cause is that the OS has a built-in accelerator driver. You can uninstall the driver and then reload it. Alternatively, add the command for reloading the driver to the startup script re.local. The following uses hisi_sec2 as an example.
      rmmod hisi_sec2 
      modprobe hisi_sec
    • If the device file still cannot be queried after the sh build.sh cleanup command is executed, check whether the license is successfully installed. If no license is available, the driver cannot be installed.
    • If the installation fails, delete the installed files and reinstall the software:
      sh build.sh cleanup