Open ArturB opened 4 years ago
Did you read the Interface Preparation
section in the AFPacket README from libdaq? The behavior that you are describing sounds like what happens when you don't properly disable the receive-side offloading on the interfaces and fail to pass the oversized aggregated packets through to the other side.
I've just set Snort 3 in inline mode using DAQ afpacket and default Talos rules. Snort is running on Protectli FW4B https://protectli.com/product/fw4b/, which definitely isn't low-end hardware (Intel Celeron J3160 Quad Core at 1.6 GHz). Despite this, download/upload speed on the protected machine is very slow. Without Snort:
Here's profiler output, which suggests it's afpacket fault:
My snort.lua:
Other settings are left as default.
I've noticed that, by default, Snort 3 is compiled with -pg compiler option and no optimization flags, so I edited cmake/configure_options.cmake file, to include release build type with -O3:
However, it makes no difference at all. I've also checked, that libdaq is by default compiled with -O2, so it shouldn't be an issue. Also, running Snort without Talos ruleset doesn't help.
Have you any idea, why is Snort 3 so slow?