session: improve session lookup speeds 80/13180/4
authorFlorin Coras <fcoras@cisco.com>
Thu, 21 Jun 2018 15:14:34 +0000 (08:14 -0700)
committerDamjan Marion <dmarion@me.com>
Fri, 22 Jun 2018 07:31:29 +0000 (07:31 +0000)
commit9679c81b64a5da48932ec0b6aebfb473d3e0410b
tree0db5d00e7142d1c8f4d5dfb1f0ac29bf883d1c26
parent02c88e41791b11e8ed5dd08c76fa7bf5991ba3d7
session: improve session lookup speeds

It would seem that this avoids using the stack for computing the
subsequent crc32 by storing the 2 x u64 ip4 5-tuple key into two
registers. Probably the cast to the "convenience" data structure "masks"
the fact that the key is 16B. Probably ... :-)

"sh run" on an ip4 tcp sender reports that the number of clocks spent in
tcp_input, where a session lookup is performed, drops ~25% (from ~100
clocks/packet to ~75 clocks/packet)

Change-Id: I50d647115ac72f8407bff7e3b73328ba42f0ddb5
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/session/session_lookup.c