dev_get_by_index is not hashed: O(n)

From: Ben Greear (
Date: Wed Aug 28 2002 - 02:13:31 EST

I just noticed that dev_get_by_index is not hashed, it is just a linear
search through all interfaces. This call is made in many places in the
kernel, and particularly in route.c

For machines with large numbers of interfaces (VLANs for instance),
this could be a real performance drag.

Any reason we don't keep interfaces in a hash-table by index?


Ben Greear <>       <Ben_Greear AT>
President of Candela Technologies Inc

- To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to More majordomo info at

This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:01 EST