]> git.karo-electronics.de Git - linux-beck.git/commit
ila: Cache a route to translated address
authorTom Herbert <tom@herbertland.com>
Fri, 14 Oct 2016 18:25:37 +0000 (11:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Oct 2016 21:33:41 +0000 (17:33 -0400)
commit79ff2fc31e0f6a52eeb67fb89fba87e822b9b7b5
treeb461524f81e54130754cafa8981fede13cb12499
parent1104d9ba443a3972052ea4eaa01e51f9ee084652
ila: Cache a route to translated address

Add a dst_cache to ila_lwt structure. This holds a cached route for the
translated address. In ila_output we now perform a route lookup after
translation and if possible (destination in original route is full 128
bits) we set the dst_cache. Subsequent calls to ila_output can then use
the cache to avoid the route lookup.

This eliminates the need to set the gateway on ILA routes as previously
was being done. Now we can do something like:

./ip route add 3333::2000:0:0:2/128 encap ila 2222:0:0:2 \
    csum-mode neutral-map dev eth0  ## No via needed!

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ila/ila_lwt.c