nexthop: Introduce to struct nh_grp_entry a per-type union
authorPetr Machata <petrm@nvidia.com>
Thu, 28 Jan 2021 12:49:15 +0000 (13:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jan 2021 04:49:51 +0000 (20:49 -0800)
commitb9bae61be46645aa3b8b5d79d5cdfabe55ae1507
tree4c83cf3935a983c69efb253d820f3e7262362741
parent79bc55e3fee9f6169756d1a9d68c3ba9e774c3b1
nexthop: Introduce to struct nh_grp_entry a per-type union

The values that a next-hop group needs to keep track of depend on the group
type. Introduce a union to separate fields specific to the mpath groups
from fields specific to other group types.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/nexthop.h
net/ipv4/nexthop.c