diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-11 02:46:36 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-11 02:46:36 +0000 |
commit | b109f49576cfdace334edadcae3f91a9a636033d (patch) | |
tree | 8b1af87137c737bbcc4f6c4ae77762da8599f3fd /sys/net/pfvar.h | |
parent | 5739b8928a4f63a5b2481383b7afc7076973606d (diff) |
store a pointer to the stack side state key in the mbuf packet
header inbound. on the outbound side, we take that and look for the key
that is the exact opposite, and store that mapping in the state key. on
subsequent packets we don't have to do the lookup on outbound any more.
almost unable to get real benchmarks going here, we know for sure this
gives a more than 5% increase in forwarding performance.
many thanks to ckuethe for stress- and performance-testing.
ok ryan theo
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r-- | sys/net/pfvar.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index c9a7015bef6..a2259d43119 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.273 2008/06/10 20:55:02 mcbride Exp $ */ +/* $OpenBSD: pfvar.h,v 1.274 2008/06/11 02:46:35 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -723,6 +723,7 @@ struct pf_state_key { RB_ENTRY(pf_state_key) entry; struct pf_statelisthead states; + struct pf_state_key *reverse; }; /* keep synced with struct pf_state, used in RB_FIND */ |