diff options
| author | Stephen Hemminger <shemminger@osdl.org> | 2004-02-05 22:24:10 -0800 |
|---|---|---|
| committer | Stephen Hemminger <shemminger@osdl.org> | 2004-02-05 22:24:10 -0800 |
| commit | f8c11435c19d5cee964370d8fd62d397f2b4c212 (patch) | |
| tree | dd6c5b2d5ef8dc67fc3cf06eedea9416a51121e5 /net/core/utils.c | |
| parent | 6434c04175e058429430e2064d3a0ce112ce45ad (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
