]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Correctly reallocate adjacency entries
authorIdo Schimmel <idosch@mellanox.com>
Mon, 23 Jan 2017 10:11:42 +0000 (11:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Jan 2017 18:42:45 +0000 (13:42 -0500)
commitb58607e2d6d68e465c4d2c54e18a491c96fdc236
tree0eaac529d6966bbd84b69b51085439af35ae08aa
parentf496cb0843583116e760384881d4a8ec6381bb85
mlxsw: spectrum_router: Correctly reallocate adjacency entries

mlxsw_sp_nexthop_group_mac_update() is called in one of two cases:

1) When the MAC of a nexthop needs to be updated
2) When the size of a nexthop group has changed

In the second case the adjacency entries for the nexthop group need to
be reallocated from the adjacency table. In this case we must write to
the entries the MAC addresses of all the nexthops that should be
offloaded and not only those whose MAC changed. Otherwise, these entries
would be filled with garbage data, resulting in packet loss.

Fixes: 965ddd4c7f05 ("mlxsw: spectrum_router: Implement next-hop routing")
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