]> git.ipfire.org Git - thirdparty/suricata.git/commit
stream/reassembly: optimize GetBlock 12041/head
authorNoah Liu <antsknows@gmail.com>
Mon, 23 Sep 2024 03:07:47 +0000 (11:07 +0800)
committerVictor Julien <victor@inliniac.net>
Sat, 26 Oct 2024 08:32:25 +0000 (10:32 +0200)
commitede115fbc1b9f3969a681eff37b40fa44bdb3657
tree219419c064d160feb7de47e64b7b3f85027dae29
parent4015b3ec5daab7ca266b5f2282450931d56e4170
stream/reassembly: optimize GetBlock

Current GetBlock degrees the sbb search from rb tree to
line, which costs much cpu time, and could be replaced by
SBB_RB_FIND_INCLUSIVE. It reduces time complexity from
O(nlogn) to O(logn).

Ticket: 7208.
(cherry picked from commit 951bcff9702f1f39c00293d68d286fd77008b037)
src/stream-tcp-reassemble.c