summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2007-06-21 11:55:55 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2007-06-21 11:55:55 +0000
commit2435de38b8ec2108b8a22b7b89a8a979226ab01c (patch)
treed425b16805f86fc1cc1dd46b9ea9318b127b27dc /sys/kern
parentdca3ccfa7416fb0c5e67138917a041efa12d9a54 (diff)
reimplement interface bound states in a non-retarded way.
previously, we had a set of state tables attached to each interface. so for every packet we had to do a lookup in the tables for the interface, and afterwards in the global tables. since we split state keys and states now, use only the global tables, and put the actual states in a tail queue attached to the state key. sort the list so that ifbound states come before global ones. on lookup, we only have to compare the interface pointer on the actual states and use the first one where either the interface matches or the state is not interface bound. thus, if you don't actually use ifbound states, and there is only one state per state key, the overhead is close to zero, where we had extra lookups before. in addition to a much cleaner design (that'll allow for more goodies later) this gives us ~12.5% more forwarding performance. mostly hacked at c2k7, lots of help, testing and ok mcbride & markus
Diffstat (limited to 'sys/kern')
0 files changed, 0 insertions, 0 deletions