]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Optimization for fib_info lookup with nexthops
authorDavid Ahern <dsahern@gmail.com>
Sat, 8 Jun 2019 21:53:33 +0000 (14:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jun 2019 17:44:57 +0000 (10:44 -0700)
commit8f84f6a7402408215514d094d1daf5aed8a78e91
tree2eb94deff893ca111adf181d1b98c3ae51169733
parent003f1686de1a925987ae5ca0b90fdf7abc6afa84
ipv4: Optimization for fib_info lookup with nexthops

Be optimistic about re-using a fib_info when nexthop id is given and
the route does not use metrics. Avoids a memory allocation which in
most cases is expected to be freed anyways.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c