net: kill lltable_drain

It has been #if 0'd in freebsd too. It is dead code. Remove it.

Signed-off-by: Asias He <asias@cloudius-systems.com>
net: kill arp_ifinit2

It is used in sys/netinet/ip_carp.c by CARP[1][2] protocol which we do not
support it now and have very little chance to support it in the future.

[1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/carp.html
[2] http://www.freebsd.org/cgi/man.cgi?query=carp&sektion=4&n=1

Signed-off-by: Asias He <asias@cloudius-systems.com>
Route Cache patch #1

The first patch replaces the calls to the BSD functions in three places
by calls to a new function route_cache::lookup(). lookup() is a new
function which still does the slow lock-full lookup, but the point of
this patch is twofold: 1. To verify that indeed, these three places are
all the lookups done in the fast-path of the UDP memcached and tomcat
benchmarks (other benchmarks may involve more code paths, can be fixed
later).
2. Now lookup() takes care of the locking, and there is no need to
unlock a route after calling it - and the first patch verifies this
movement of the unlock code indeed works as a expected.

Note that this patch defines an invalidate() function but nothing
ever defines it, nor uses it. Once we're confident about the direction
of these two patches, I think it should be pretty straighforward to
implement and call invalidate() on route changes.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Route Cache patch #2

The second patch is starting to rewrite lookup() to have an RCU cache
so the route is first looked up in the cache, and only if it's not there,
look it up in the old slow way (as in the first patch) and add it to the
cache. Instead of using sophisticated radix tree (possibly even BSD's
super-convoluted implementation) for this cache, this patch uses a linear
search of netmasks. If we have a handful of routes (usually we'll just
have two or three), the linear search is fast enough.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
net: Add trace_in_lltable_lookup

Signed-off-by: Asias He <asias@cloudius-systems.com>
net: Add trace_arpresolve

Signed-off-by: Asias He <asias@cloudius-systems.com>
net: Introduce lla_lookup_fast

Signed-off-by: Asias He <asias@cloudius-systems.com>