]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Change fib_nexthop_info and fib_add_nexthop to take fib_nh_common
authorDavid Ahern <dsahern@gmail.com>
Tue, 2 Apr 2019 21:11:57 +0000 (14:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Apr 2019 04:50:20 +0000 (21:50 -0700)
commit4be4fa5aec9d12ac244ab882b6dd4901834139a5
treea6d42c3229296dd4ae8096892d174b7416f55d01
parent5858bfd1a0c3f6a4d8d9bc88aadc6b43812ec134
ipv4: Change fib_nexthop_info and fib_add_nexthop to take fib_nh_common

With the exception of the nexthop weight, the nexthop attributes used by
fib_nexthop_info and fib_add_nexthop come from the fib_nh_common struct.
Update both to use it and change fib_nexthop_info to check the family
as needed.

nexthop weight comes from the common struct for existing use cases, but
for nexthop groups the weight is outside of the fib_nh_common to allow
the same nexthop definition to be used in multiple groups with different
weights.

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c