]> git.ipfire.org Git - thirdparty/suricata.git/commit
app-layer-proto: speed up
authorVictor Julien <victor@inliniac.net>
Fri, 24 Jan 2014 10:40:06 +0000 (11:40 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 27 Jan 2014 11:46:26 +0000 (12:46 +0100)
commitad7eff555de898e7abcdbf89fdbe9a4806bb72b6
tree7b0bc3e257212c0aa9c13ccb597a0bcbd12a5168
parent347c0df9c4e821f33938628855e3ceed115fd9d0
app-layer-proto: speed up

AppLayer Proto detection code uses a mix of pattern search and
"probing parsers". The pattern search validates potential matches
using a single pattern search algo. The code was using SpmSearch
for this, but this made it inefficient as it builds a BoyerMoore
context for each search. This lead to significant memory pressure,
especially on high speed/bandwidth boxes.

This patch switches the search calls to BoyerMoore and BoyerMoore-
Nocase directly. This can be done as the ctx' were available already.
src/app-layer-detect-proto.c