From: David S. Miller Date: Tue, 8 Mar 2011 04:54:48 +0000 (-0800) Subject: ipv4: Cache source address in nexthop entries. X-Git-Tag: v2.6.39-rc1~468^2~131 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fc050a13473348f5c439de2bb41c8e92dba5588;p=pandora-kernel.git ipv4: Cache source address in nexthop entries. When doing output route lookups, we have to select the source address if the user has not specified an explicit one. First, if the route has an explicit preferred source address specified, then we use that. Otherwise we search the route's outgoing interface for a suitable address. This search can be precomputed and cached at route insertion time. The only missing part is that we have to refresh this precomputed value any time addresses are added or removed from the interface, and this is accomplished by fib_update_nh_saddrs(). Signed-off-by: David S. Miller --- Reading git-diff-tree failed