]> git.ipfire.org Git - thirdparty/suricata.git/commit
af-packet: use per CPU hash in bypass
authorEric Leblond <eric@regit.org>
Fri, 5 Jan 2018 21:33:48 +0000 (22:33 +0100)
committerEric Leblond <eric@regit.org>
Tue, 6 Feb 2018 15:58:17 +0000 (16:58 +0100)
commit31c947b4d8ecd97829ce5293ddbafb89c3aaaebc
tree74467af4f2f14fa87641362e8b65e608ceb09d83
parent8640cc5dcf6677e6c74c46fdb7b8007c5e119f37
af-packet: use per CPU hash in bypass

eBPF has a data type which is a per CPU array. By adding one element
to the array it is in fact added to all per CPU arrays in the kernel.
This allows to have a lockless structure in the kernel even when doing
counter update.

In userspace, we need to update the flow bypass code to fetch all
elements of the per CPU arrays.
ebpf/bypass_filter.c
src/flow-bypass.c
src/util-ebpf.c