summaryrefslogtreecommitdiff
path: root/net/core/utils.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2004-02-05 22:24:10 -0800
committerStephen Hemminger <shemminger@osdl.org>2004-02-05 22:24:10 -0800
commitf8c11435c19d5cee964370d8fd62d397f2b4c212 (patch)
treedd6c5b2d5ef8dc67fc3cf06eedea9416a51121e5 /net/core/utils.c
parent6434c04175e058429430e2064d3a0ce112ce45ad (diff)
[NET]: Support for lots of netdevs -- faster dev_alloc_name
Convert dev_alloc_name from O(n^2) lookup to O(n) by using a page as bitmap to figure out how many devices of that pattern have been allocated. This works for up to 32k devices (PAGE_SIZE*8) on i386, more on other platforms. Correctly handles the boundary cases where number of devices won't fit because name length is limited. Adds strnchr to the string libraries since we need to find the % format character, but only care if it is in the first 15 bytes.
Diffstat (limited to 'net/core/utils.c')
0 files changed, 0 insertions, 0 deletions