-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
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.
+1
int64_t jitter = diff - last_rtt_ns_; | ||
jitter = jitter * ((jitter>0) - (jitter<0)); |
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.
Why not just use the abs
?
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
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.
suggested change in line 138 wont work/compile as abs dnt work on atomics. latest patch has that change.
int64_t jitter = diff - last_rtt_ns_; | ||
jitter = jitter * ((jitter>0) - (jitter<0)); |
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.
You need to apply clang-format
to address the GHA issue
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.
covered in latest pr
int64_t jitter = diff - last_rtt_ns_; | ||
jitter = jitter * ((jitter>0) - (jitter<0)); |
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.
Moreover, why do you have to change jitter
to int64_t
given that the argument for jitter_hist_.AtomicInsert()
is uint64_t
?
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.
In this context, suggested change wont work as uint64_t wont be able to save negative values .
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.
Please address the previous comments. Thanks!
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
@amarsri28, any update about this PR? |
This is preliminary patch .