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: simplify ringReader #1379

Merged
merged 1 commit into from
Mar 14, 2024
Merged

ringbuf: simplify ringReader #1379

merged 1 commit into from
Mar 14, 2024

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Mar 14, 2024

The code to correctly access the ring is currently split across two files an multiple functions which makes it hard to grasp what is going on. Strip out the overly generic Reader interface and only expose ringReader.readRecord. Also move discarding of samples into readRecord.

This removes the amount of code and cuts down on the number of places where we call into sync/atomic.

The code to correctly access the ring is currently split across two
files an multiple functions which makes it hard to grasp what is going
on. Strip out the overly generic Reader interface and only expose
ringReader.readRecord. Also move discarding of samples into readRecord.

This removes the amount of code and cuts down on the number of places
where we call into sync/atomic.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb requested a review from a team as a code owner March 14, 2024 16:00
Copy link
Contributor

@paulcacheux paulcacheux left a comment

Choose a reason for hiding this comment

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

Looks much better, thanks for cleaning this up

@lmb lmb merged commit 06282fb into cilium:main Mar 14, 2024
15 checks passed
@mythi
Copy link
Contributor

mythi commented Mar 15, 2024

👍

@ti-mo
Copy link
Collaborator

ti-mo commented Mar 15, 2024

@lmb Thanks!

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.

4 participants