]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv4: Simplify fib_multipath_hash with optional flow keys
authorDavid Ahern <dsahern@gmail.com>
Fri, 2 Mar 2018 16:32:14 +0000 (08:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Mar 2018 18:04:21 +0000 (13:04 -0500)
commit75da40ba7d11918c83065d34a631eb2d5129f137
tree204ea63717d6ca9e0435fa86caf57ca068094df0
parentacca2101fd9eee7aa1c3b55dd8bc05c179bf0824
net/ipv4: Simplify fib_multipath_hash with optional flow keys

As of commit c6b38beab3dd9 ("ipv6: route: dissect flow in input path if
fib rules need it") fib_multipath_hash takes an optional flow keys. If
non-NULL it means the skb has already been dissected. If not set, then
fib_multipath_hash needs to call skb_flow_dissect_flow_keys.

Simplify the logic by setting flkeys to the local stack variable keys.
Simplifies fib_multipath_hash by only have 1 set of instructions
setting hash_keys.

Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c