]> git.ipfire.org Git - thirdparty/suricata.git/commit
tcp: reduce TCP options storage in packets
authorVictor Julien <victor@inliniac.net>
Wed, 16 Dec 2015 12:10:05 +0000 (13:10 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 7 Apr 2016 13:31:55 +0000 (15:31 +0200)
commit38f67d88ea996e6af00398deb8facb5e7c2b4a05
tree0cf1e3955fa813c24008e1744299be5a257e6f93
parent7ef8558e79d1a2b2c9155599676d16a2db7f632b
tcp: reduce TCP options storage in packets

Until now, the TCP options would all be stored in the Packet structure.
The commonly used ones (wscale, ts, sack, sackok and mss*) then had a
pointer to the position in the option array. Overall this option array
was large. About 360 bytes on 64bit systems. Since no part of the engine
would every access this array other than through the common short cuts,
this was actually just wasteful.

This patch changes the approach. It stores just the common ones in the
packet. The rest is gone. This shrinks the packet structure with almost
300 bytes.

* even though mss wasn't actually used
src/decode-tcp.c
src/decode-tcp.h
src/stream-tcp.c