From: Ido Schimmel Date: Sun, 14 Apr 2019 18:57:49 +0000 (+0000) Subject: mlxsw: spectrum_router: Add neighbour offload indication X-Git-Tag: v5.2-rc1~133^2~173^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=caf345a18b2fe14f9b3ad50b8d4853e76ae999e8;p=thirdparty%2Fkernel%2Flinux.git 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 --- 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