]> git.baikalelectronics.ru Git - kernel.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)
commitb911d1d80dc1f2bbef2c777a126babfdb156fba8
treeb461524f81e54130754cafa8981fede13cb12499
parent258fd80f213a8c021571e182f56b39e510778310
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