mlxsw: spectrum_router: Use the nodes list as indication for empty FIB
authorIdo Schimmel <idosch@mellanox.com>
Mon, 22 Jan 2018 08:17:40 +0000 (09:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2018 14:22:10 +0000 (09:22 -0500)
commit4fd003125f66a6c8ef6add934fac7cacdbbe509c
tree2c06e0b60581735a8c8a82b0734fd9ce32add258
parent9d6474e458b13a94a0d5b141f2b8f38adf1991ae
mlxsw: spectrum_router: Use the nodes list as indication for empty FIB

Currently, each FIB (IPv4 / IPv6) in a virtual router holds a prefix
usage that is used to choose a matching LPM tree, but also to check if
the FIB is empty, so that the LPM tree could be unbound.

Next patches will remove the reliance on the per-FIB prefix usage for
LPM tree matching. Keeping it only to check if the FIB is empty is a
waste, since we can use the nodes ({Prefix, Length}) list instead.

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