]> git.baikalelectronics.ru Git - kernel.git/commit
nexthop: Use enum to encode notification type
authorIdo Schimmel <idosch@nvidia.com>
Thu, 28 Jan 2021 12:49:17 +0000 (13:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jan 2021 04:49:52 +0000 (20:49 -0800)
commit57a337b767f3dbc25e3043caac7ca6ccbe7d5cef
treeeeb9454ed1731d5dda578ee19cfffff84c62f195
parent5370a5095edf0c612db96b70009071f043ef03c0
nexthop: Use enum to encode notification type

Currently there are only two types of in-kernel nexthop notification.
The two are distinguished by the 'is_grp' boolean field in 'struct
nh_notifier_info'.

As more notification types are introduced for more next-hop group types, a
boolean is not an easily extensible interface. Instead, convert it to an
enum.

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