diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-07-03 15:46:25 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-07-03 15:46:25 +0000 |
commit | ff0e27878987e440bcdb0df63d843fd926384784 (patch) | |
tree | cfd8e3f0351dc0a16bb196a2476d32a2f3f37a88 /sys/net/pfvar.h | |
parent | 5a0754bfe0405005d4644eea69c448e9c919787e (diff) |
link pf state keys to tcp pcbs and vice versa.
when we first do a pcb lookup and we have a pointer to a pf state key
in the mbuf header, store the state key pointer in the pcb and a pointer
to the pcb we just found in the state key. when either the state key
or the pcb is removed, clear the pointers.
on subsequent packets inbound we can skip the pcb lookup and just use the
pointer from the state key.
on subsequent packets outbound we can skip the state key lookup and use
the pointer from the pcb.
about 8% speedup with 100 concurrent tcp sessions, should help much more
with more tcp sessions.
ok markus ryan
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 627ee31e28f..f8103d88976 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.275 2008/06/29 08:42:15 mcbride Exp $ */ +/* $OpenBSD: pfvar.h,v 1.276 2008/07/03 15:46:23 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -724,6 +724,7 @@ struct pf_state_key { RB_ENTRY(pf_state_key) entry; struct pf_statelisthead states; struct pf_state_key *reverse; + struct inpcb *inp; }; /* keep synced with struct pf_state, used in RB_FIND */ |