Skip to content
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

Merged

Conversation

jmuthiilabn
Copy link
Contributor

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.

@frrbot frrbot bot added the nhrp label Sep 10, 2024
@jmuthiilabn jmuthiilabn force-pushed the jmuthii/nhrpd-retry-resolution branch 3 times, most recently from 26cf094 to 32b1af6 Compare September 10, 2024 21:34
Copy link
Collaborator

@aceelindem aceelindem left a 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 Show resolved Hide resolved
* received for a "request" and a retry is sent after an
* appropriate interval
*/
if (!retry) {
Copy link
Collaborator

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) <
Copy link
Member

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?

Copy link
Contributor Author

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.

@Jafaral
Copy link
Member

Jafaral commented Sep 17, 2024

@jmuthiilabn , can you address the comments please ?

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]>
Copy link
Collaborator

@aceelindem aceelindem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM...

@aceelindem
Copy link
Collaborator

@ton31337 - Donatas, are you good with the updates?

@Jafaral Jafaral merged commit cee061d into FRRouting:master Sep 24, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants