mlxsw: spectrum_router: Use nexthop group type in hash table key
authorIdo Schimmel <idosch@nvidia.com>
Fri, 13 Nov 2020 16:05:47 +0000 (18:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 15 Nov 2020 00:55:03 +0000 (16:55 -0800)
commit1664dd3d5e545fb63a96f30ea71c9cbab066c892
tree04015492b9451774b9f8427ac319a0c884310984
parenta06191aabbb7f74de2feec346b2fb5cd39c3a51b
mlxsw: spectrum_router: Use nexthop group type in hash table key

Both IPv4 and IPv6 nexthop groups are hashed in the same table. The
protocol field is used to indicate how the hash should be computed for
each group.

When nexthop group objects are supported, the hash will be computed for
them based on the nexthop identifier.

To differentiate between all the nexthop group types, encode the type of
the group in the key instead of the protocol.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c