mirror of https://github.com/OISF/suricata
nfq: avoid extra copy when running in workers mode
currently, the packet payload recv()d from the nfqueue netlink socket is copied into a new packet buffer. This is required because the recv-buffer space used is tied to the current thread, but a packet may be handed off to other threads, and the recv-buffer can be re-used while the packet is handled by another thread. However, in worker runmode, the packet will always be handled by the current thread, and the recv-buffer will only be reused after the entire packet processing stack is done with the packet. Thus, in worker runmode, we can avoid the copy and assign the packet data area directly.pull/348/head
parent
b68d566c44
commit
6678c9feb9
Loading…
Reference in New Issue