]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Re-increase scale of IPv6 nexthop groups
authorIdo Schimmel <idosch@mellanox.com>
Sun, 19 Apr 2020 07:01:05 +0000 (10:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2020 18:57:33 +0000 (11:57 -0700)
commit05dc3abff0e2a31c2df0a29144661078f1b16f60
treec4f4e3881e7409f3ea6450368f5d4e41522da01e
parentae38fa5c3beb6e9e3bb95f077916a44ef0a45351
mlxsw: spectrum_router: Re-increase scale of IPv6 nexthop groups

As explained in commit b928fdf1891e ("mlxsw: spectrum_router: Increase
scale of IPv6 nexthop groups"), each nexthop group is hashed by XOR-ing
the interface indexes of all the member nexthop devices.

To avoid many different nexthop groups ending up using the same key, the
above commit started hashing the interface indexes themselves before
they are XOR-ed.

However, in cases in which there are many nexthop groups that all use
the same nexthop device and only differ in the gateway IP, we can still
end up in a situation in which all the groups are using the same key.
This eventually leads to -EBUSY error from rhashtable during insertion.

Improve the situation by also making the gateway IP part of the key.

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