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

Ringbuf read on timeout #1111

Merged
merged 3 commits into from
Aug 14, 2023
Merged

Ringbuf read on timeout #1111

merged 3 commits into from
Aug 14, 2023

Conversation

RonFed
Copy link
Contributor

@RonFed RonFed commented Aug 9, 2023

The goal for this PR is describe in #1108

@RonFed RonFed force-pushed the ringbuf-read-on-timeout branch 4 times, most recently from 770b493 to 455f1cb Compare August 9, 2023 20:00
@RonFed RonFed marked this pull request as ready for review August 9, 2023 20:14
ringbuf/reader.go Outdated Show resolved Hide resolved
Signed-off-by: Ron Federman <ronfederman@mail.tau.ac.il>
Copy link
Collaborator

@lmb lmb left a comment

Choose a reason for hiding this comment

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

This looks really nice, thanks! sampleMessage is a good cleanup, we can use it to make discard behaviour more explicit. Left some comments around error handling and testing strategy.

Does it make sense to update Read to mention this behaviour? Or maybe this is better documented on SetDeadline?

ringbuf/reader.go Outdated Show resolved Hide resolved
ringbuf/reader.go Outdated Show resolved Hide resolved
ringbuf/reader_test.go Outdated Show resolved Hide resolved
ringbuf/reader_test.go Show resolved Hide resolved
ringbuf/reader_test.go Outdated Show resolved Hide resolved
Co-authored-by: Lorenz Bauer <lmb@users.noreply.github.com>
Signed-off-by: Ron Federman <73110295+RonFed@users.noreply.github.com>
@RonFed
Copy link
Contributor Author

RonFed commented Aug 11, 2023

This looks really nice, thanks! sampleMessage is a good cleanup, we can use it to make discard behaviour more explicit. Left some comments around error handling and testing strategy.

Does it make sense to update Read to mention this behaviour? Or maybe this is better documented on SetDeadline?

Thanks for you comments,
I added a mention for this behaviour in Read, and also updated the test to remove the timing checks

Signed-off-by: Ron Federman <ronfederman@mail.tau.ac.il>
Copy link
Collaborator

@lmb lmb left a comment

Choose a reason for hiding this comment

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

LGTM! I'll squash your changes and merge once CI has passed.

@lmb lmb merged commit 01ebd4c into cilium:main Aug 14, 2023
1 check passed
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