-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ospfd: avoid the redundant timers #17803
base: master
Are you sure you want to change the base?
Conversation
ospfd/ospf_asbr.c
Outdated
@@ -1159,7 +1159,8 @@ static void ospf_external_aggr_timer(struct ospf *ospf, | |||
"%s, Restarting Aggregator delay timer.", | |||
__func__); | |||
EVENT_OFF(ospf->t_external_aggr); | |||
} | |||
} else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is too general. why not add a clause for repeated AGGR_DEL like the one that's already present for AGGR_ADD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. IMO "DEL" is not same to "ADD".
The continuous "DEL"s come, the first "DEL" should do the real thing: start timer and delete the item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm - that's exactly what I wrote, but you said "no".
So: there's a clause for ADD that says "don't re-start the timer if it's already running for ADD". I suggest doing the same for DEL : if the timer is already running for DEL, emit a debug and don't reset the timer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misunderstood your meaning just now.
I got your point, and re-pushed one. Thanks for your review.
Since the timer thread for ```OSPF_ROUTE_AGGR_DEL``` has been created, the subsequent "no summary-address" commands shouldn't trigger redundant timers. Signed-off-by: anlan_cs <[email protected]>
2489188
to
a5ec72a
Compare
Since the timer thread for
OSPF_ROUTE_AGGR_DEL
has been created, the subsequent "no summary-address" commands shouldn't trigger redundant timers.