mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
hsr: fix don't prune the master node from the node_db
Don't prune the master node in the hsr_prune_nodes function. Neither time_in[HSR_PT_SLAVE_A] nor time_in[HSR_PT_SLAVE_B] will ever be updated by hsr_register_frame_in for the master port. Thus, the master node will be repeatedly pruned leading to repeated packet loss. This bug never appeared because the hsr_prune_nodes function was only called once. Since commit5150b45fd3
("net: hsr: Fix node prune function for forget time expiry") this issue is fixed unveiling the issue described above. Fixes:5150b45fd3
("net: hsr: Fix node prune function for forget time expiry") Signed-off-by: Andreas Oetken <andreas.oetken@siemens.com> Tested-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3f6f7a175a
commit
d2daa127ed
@ -365,6 +365,14 @@ void hsr_prune_nodes(struct timer_list *t)
|
||||
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(node, &hsr->node_db, mac_list) {
|
||||
/* Don't prune own node. Neither time_in[HSR_PT_SLAVE_A]
|
||||
* nor time_in[HSR_PT_SLAVE_B], will ever be updated for
|
||||
* the master port. Thus the master node will be repeatedly
|
||||
* pruned leading to packet loss.
|
||||
*/
|
||||
if (hsr_addr_is_self(hsr, node->macaddress_A))
|
||||
continue;
|
||||
|
||||
/* Shorthand */
|
||||
time_a = node->time_in[HSR_PT_SLAVE_A];
|
||||
time_b = node->time_in[HSR_PT_SLAVE_B];
|
||||
|
Loading…
Reference in New Issue
Block a user