summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArkadi Sharshevsky <arkadis@mellanox.com>2017-07-18 10:10:18 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-18 11:57:33 -0700
commita6c9b5d1990577eed514110f4ba4d3bc032c57fd (patch)
treec82ad0c837e98970b0ba8da812373b61264958fb
parent60f040ca11b968371fc1cd910d4648e58e6b80d3 (diff)
downloadlinux-a6c9b5d1990577eed514110f4ba4d3bc032c57fd.tar.bz2
mlxsw: spectrum_router: Set activity interval according to both neighbour tables
The neighbours' activity is currently dumped according to the ARP table's DELAY_PROBE time, but with the introduction of IPv6 offload we should set the interval according to the minimum between the ARP and ndisc tables. Signed-off-by: Arkadi Sharshvesky <arkadis@mellanox.com> 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>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 312fb67277d7..cb797fb43b3d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -932,8 +932,11 @@ mlxsw_sp_neigh_entry_lookup(struct mlxsw_sp *mlxsw_sp, struct neighbour *n)
static void
mlxsw_sp_router_neighs_update_interval_init(struct mlxsw_sp *mlxsw_sp)
{
- unsigned long interval = NEIGH_VAR(&arp_tbl.parms, DELAY_PROBE_TIME);
+ unsigned long interval;
+ interval = min_t(unsigned long,
+ NEIGH_VAR(&arp_tbl.parms, DELAY_PROBE_TIME),
+ NEIGH_VAR(&nd_tbl.parms, DELAY_PROBE_TIME));
mlxsw_sp->router->neighs_update.interval = jiffies_to_msecs(interval);
}
@@ -1321,7 +1324,7 @@ int mlxsw_sp_router_netevent_event(struct notifier_block *unused,
p = ptr;
/* We don't care about changes in the default table. */
- if (!p->dev || p->tbl != &arp_tbl)
+ if (!p->dev || (p->tbl != &arp_tbl && p->tbl != &nd_tbl))
return NOTIFY_DONE;
/* We are in atomic context and can't take RTNL mutex,