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

Installation Description

The following uses openEuler 24.03 LTS SP3 and 6.6.0-132.0.0.111.oe2403sp3.aarch64 as an example to describe how to install the HiSock feature. The procedure is as follows:

  1. Install dependencies.
    yum install -y elfutils-libelf-devel clang llvm dwarves libbpf-devel
  2. Install and compile the new kernel version that supports HiSock.
    yum install kernel-source kernel-devel kernel.aarch64
    cd /usr/src/linux-6.6.0-145.3.18.151.oe2403sp3.aarch64/
    make openeuler_defconfig
    make -j$(nproc)
    make headers
  3. Check the installed kernels and find the index of the kernel that supports this feature. Assume that the index is 0.
    1
    grubby --info=ALL | grep -E 'index|title'
    
  4. Replace the default kernel boot entry with index 0.
    1
    grubby --set-default-index=0
    
  5. Check that the default kernel has been replaced with the kernel that supports this feature.
    1
    grubby --default-kernel 
    

  6. Reboot the server.
    1
    reboot
    
  7. Go to the kernel source code directory and compile the HiSock sample programs.
    cd /usr/src/linux-6.6.0-145.3.18.151.oe2403sp3.aarch64/
    export VMLINUX_BTF=/sys/kernel/btf/vmlinux
    make -C tools/lib/bpf/ -j
    make -C samples/bpf/ -j
  8. View the compilation result.

    After the compilation is complete, the following files are generated, indicating that the compilation is successful:

    • samples/bpf/hisock/hisock_cmd: HiSock user-space loading and unloading tool
    • samples/bpf/hisock/bpf.o: HiSock BPF program object file