mlxsw: spectrum_router: Separate nexthop offload indication from route
authorIdo Schimmel <idosch@mellanox.com>
Tue, 14 Jan 2020 11:23:13 +0000 (13:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jan 2020 02:53:35 +0000 (18:53 -0800)
commit8c5a5b9b9185e5f3f14c81b2d1cef7e6f837c280
treed635c9a0c70e00f4a473d2c478dcd30f2a493cf8
parentbb3c4ab93e44784c1e958bdbba7824bba40f23cd
mlxsw: spectrum_router: Separate nexthop offload indication from route

The driver currently uses the 'RTNH_F_OFFLOAD' flag for both routes and
nexthops, which is cumbersome and unnecessary now that we have separate
flag for the route itself.

Separate the offload indication for nexthops from routes and call it
whenever the offload state within the nexthop group changes.

Note that IPv6 (unlike IPv4) does not share the same nexthop group
between different routes, whereas mlxsw does. Therefore, whenever the
offload indication within an IPv6 nexthop group changes, all the linked
routes need to be updated.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c