-
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
nhrpd: Implement retrying resolution request #16788
nhrpd: Implement retrying resolution request #16788
Conversation
26cf094
to
32b1af6
Compare
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.
Looks good - see a couple nits regarding FRR style.
nhrpd/nhrp_shortcut.c
Outdated
* received for a "request" and a retry is sent after an | ||
* appropriate interval | ||
*/ | ||
if (!retry) { |
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.
Although not completely consistent, FRR style normally omits the braces when there is a single conditional statement.
event_add_timer(master, nhrp_shortcut_retry_resolution_req, s, | ||
s->retry_interval, &s->t_retry_resolution); | ||
if (s->retry_interval != (NHRPD_DEFAULT_PURGE_TIME / 4)) | ||
s->retry_interval = ((s->retry_interval * 2) < |
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.
Is this something we should add, or at least a comment on, about what's going on here and why it's calculated this way?
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.
Yes, I'll add a comment explaining the interval calculation.
@jmuthiilabn , can you address the comments please ? |
32b1af6
to
949feea
Compare
In the event that a resolution request is sent and and resolution reply is never received, resolution requests will continue to be sent until either the newly created shortcut has been purged or a resolution reply is finally received. NHRPD_DEFAULT_PURGE_TIME and NHRPD_PURGE_EXPIRE are values that were previously hardcoded and moved into macros for the sake of readability. Signed-off-by: Joshua Muthii <[email protected]>
949feea
to
97a0368
Compare
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.
LGTM...
@ton31337 - Donatas, are you good with the updates? |
In the event that a resolution request is sent and and resolution reply is never received, resolution requests will continue to be sent until either the newly created shortcut has been purged or a resolution reply is finally received.
NHRPD_DEFAULT_PURGE_TIME and NHRPD_PURGE_EXPIRE are values that were previously hardcoded and moved into macros for the sake of readability.