summaryrefslogtreecommitdiff
path: root/sys/kern/kern_tc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-02-29 12:21:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-02-29 12:21:13 +0000
commitd58f53ca64cff5b3636359292e554da731dc6fa5 (patch)
treebb30607fe392d7f945f1ab6c7ba5210889de18fd /sys/kern/kern_tc.c
parent6827f1138212e02ae934a71fb96e4cab3ee266e2 (diff)
replacement algorithm. initialize a 64K-short buffer using Durstenfeld
shuffle. Upon allocation, swap-permute the new value to a random slot in the 0..32K-1 th entry of the buffer as we move forward, ensuring randomness but also satisfying the non-repeating property we need. Inspired by Dillon's implementation for ip id. We believe this is easier to read though, initializes with less bias and wins speed tests. Thanks a lot to mcbride and djm for doing a bunch of statistical and speed analysis, and comments from nordin ok jakob djm mcbride
Diffstat (limited to 'sys/kern/kern_tc.c')
0 files changed, 0 insertions, 0 deletions