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:
- Install dependencies.
yum install -y elfutils-libelf-devel clang llvm dwarves libbpf-devel
- 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
- Check the installed kernels and find the index of the kernel that supports this feature. Assume that the index is 0.
1grubby --info=ALL | grep -E 'index|title'
- Replace the default kernel boot entry with index 0.
1grubby --set-default-index=0
- Check that the default kernel has been replaced with the kernel that supports this feature.
1grubby --default-kernel

- Reboot the server.
1reboot
- 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
- 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