- Notifications
You must be signed in to change notification settings - Fork5
Installation
Supported Linux kernel version: 5.17
Supported Linux distribution: Ubuntu 20.04 LTS
To process regular expressions at the highest speeds possible, the REGEX runtime musthave access to vector instructions such as AVX2 or AVX512. As we propose to useREXEX runtime as an XDP helper function, and execute it inside the softIRQ context,where vector instructions are not available, a few patches are required for theLinux kernel.
As Ubuntu 20.04 LTS provides neither Linux 5.17 nor the required patches, a custombuild of the kernel is required. We also provide the patched kernel in binarypackages.
The first and themost crucial patchis related to safe interaction with vector instruction set from the softIRQ context.Multiple subsystems in the Linux kernel take advantage of the vector instruction set,but the latter wasn't used in the softIRQ context before. To ensure the safe usagebetween the softIRQ and the process context, we have to disable preemption andinterrupts while FPU is in use.
The next series of patches (second,third)are required to make registering the XDP helper possible. Although the work on providing eBPF helpers inside loadable modules was started in Linux 5.16, it wasn't completed until Linux 5.18. We intend to update the module to use the latest stable kernel, and these patch series are going to be obsoleted and not required.
All the packages are availableon the latest release pageWe provide bundles:
rex-dkms.debwith the regex modulelinux_package.zipwith the patched Linux kernel
To build a DEB package, run the command below:
fakeroot debian/rules binaryAfter installation, the DKMS subsystem will build the module.
apt-get install -y ./rex-dkms_*_all.debFor the configuration part, a usual build of the Hyper scan may be used. But build from sourcesis also possible:
cmake -B build -DFAT_RUNTIME=OFFcmake --build build -j$(nproc)