From ba87d50e065243164b7796faf429176c9b1b5188 Mon Sep 17 00:00:00 2001 From: Ido Schimmel Date: Sun, 14 Apr 2019 18:57:49 +0000 Subject: [PATCH] mlxsw: spectrum_router: Add neighbour offload indication In a similar fashion to routes and FDB entries, the neighbour table is reflected to the device. Set an offload indication on the neighbour in case it was programmed to the device. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index e159b246ba559..31656a2a62520 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -2444,7 +2444,13 @@ mlxsw_sp_neigh_entry_update(struct mlxsw_sp *mlxsw_sp, return; } else { WARN_ON_ONCE(1); + return; } + + if (adding) + neigh_entry->key.n->flags |= NTF_OFFLOADED; + else + neigh_entry->key.n->flags &= ~NTF_OFFLOADED; } void -- 2.39.5