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.15~6431^2~173^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=caf345a18b2fe14f9b3ad50b8d4853e76ae999e8;p=platform%2Fkernel%2Flinux-starfive.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 e159b24..31656a2a 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