mlxsw: spectrum_router: Avoid potential packets loss
authorIdo Schimmel <idosch@mellanox.com>
Tue, 28 Feb 2017 07:55:40 +0000 (08:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2017 11:43:32 +0000 (12:43 +0100)
commit8f4db60c7fb5120050309717123efcfd25a02034
tree2cd2277d43c1b6e3aa6097ef0fda10ea09b2dbec
parent02595f472548738cd1ab3abf424277d6f489048f
mlxsw: spectrum_router: Avoid potential packets loss

[ Upstream commit f7df4923fa986247e93ec2cdff5ca168fff14dcf ]

When the structure of the LPM tree changes (f.e., due to the addition of
a new prefix), we unbind the old tree and then bind the new one. This
may result in temporary packet loss.

Instead, overwrite the old binding with the new one.

Fixes: 6b75c4807db3 ("mlxsw: spectrum_router: Add virtual router management")
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c