summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2007-06-21 11:55:54 +0000
committerhenning <henning@openbsd.org>2007-06-21 11:55:54 +0000
commit94fcca956bf426281510ca819ff08fc02fb68a3d (patch)
tree440fceac55f62522010387ab6efbc3b086c7b4e4 /lib/libc
parentsbc goes back in, as it's shared w/ ncrscsi(4); (diff)
downloadwireguard-openbsd-94fcca956bf426281510ca819ff08fc02fb68a3d.tar.xz
wireguard-openbsd-94fcca956bf426281510ca819ff08fc02fb68a3d.zip
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 'lib/libc')
0 files changed, 0 insertions, 0 deletions