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

packet drop issue resolution #30

Closed
wants to merge 1 commit into from
Closed

packet drop issue resolution #30

wants to merge 1 commit into from

Conversation

amarsri28
Copy link
Contributor

This is preliminary patch .

gab-arrobo
gab-arrobo previously approved these changes Nov 9, 2023
Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

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

+1

Comment on lines +138 to +139
int64_t jitter = diff - last_rtt_ns_;
jitter = jitter * ((jitter>0) - (jitter<0));
Copy link
Contributor

@gab-arrobo gab-arrobo Nov 9, 2023

Choose a reason for hiding this comment

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

Why not just use the abs?

Suggested change
int64_t jitter = diff - last_rtt_ns_;
jitter = jitter * ((jitter>0) - (jitter<0));
int64_t jitter = abs(diff - last_rtt_ns_);

Of course, the above would need to include <cstdlib> if needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

suggested change in line 138 wont work/compile as abs dnt work on atomics. latest patch has that change.

Comment on lines +138 to +139
int64_t jitter = diff - last_rtt_ns_;
jitter = jitter * ((jitter>0) - (jitter<0));
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to apply clang-format to address the GHA issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

covered in latest pr

@gab-arrobo gab-arrobo self-requested a review November 10, 2023 03:57
Comment on lines +138 to +139
int64_t jitter = diff - last_rtt_ns_;
jitter = jitter * ((jitter>0) - (jitter<0));
Copy link
Contributor

@gab-arrobo gab-arrobo Nov 10, 2023

Choose a reason for hiding this comment

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

Moreover, why do you have to change jitter to int64_t given that the argument for jitter_hist_.AtomicInsert() is uint64_t?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this context, suggested change wont work as uint64_t wont be able to save negative values .

@gab-arrobo gab-arrobo self-requested a review November 13, 2023 02:55
Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

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

Please address the previous comments. Thanks!

@gab-arrobo gab-arrobo dismissed their stale review November 15, 2023 21:12

Answers are required

Copy link
Contributor

@sureshmarikkannu sureshmarikkannu 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

@gab-arrobo
Copy link
Contributor

@amarsri28, any update about this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants