• Tom Herbert's avatar
    ila: Cache a route to translated address · 79ff2fc3
    Tom Herbert authored
    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: default avatarTom Herbert <tom@herbertland.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    79ff2fc3
ila_lwt.c 5.63 KB