Commit 5150b45f authored by Aaron Kramer's avatar Aaron Kramer Committed by David S. Miller

net: hsr: Fix node prune function for forget time expiry

HSR should forget nodes after configured node forget time expiry based
on HSR_NODE_FORGET_TIME. As part of hsr_prune_nodes(), code checks to
see if entries are to be flushed out if not heard for longer than forget
time. But currently hsr_prune_nodes() is called only once during device
creation. Restart the timer at the end of hsr_prune_nodes() so that
hsr_prune_nodes() gets called periodically and forgotten entries are
removed from node table.
Signed-off-by: default avatarAaron Kramer <a-kramer@ti.com>
Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc4ecaee
...@@ -405,6 +405,10 @@ void hsr_prune_nodes(struct timer_list *t) ...@@ -405,6 +405,10 @@ void hsr_prune_nodes(struct timer_list *t)
} }
} }
rcu_read_unlock(); rcu_read_unlock();
/* Restart timer */
mod_timer(&hsr->prune_timer,
jiffies + msecs_to_jiffies(PRUNE_PERIOD));
} }
void *hsr_get_next_node(struct hsr_priv *hsr, void *_pos, void *hsr_get_next_node(struct hsr_priv *hsr, void *_pos,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment