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

instruct DCO about expected residual data over the socket #24

Open
ordex opened this issue Mar 2, 2023 · 2 comments
Open

instruct DCO about expected residual data over the socket #24

ordex opened this issue Mar 2, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ordex
Copy link
Member

ordex commented Mar 2, 2023

When passing the socket to kernelspace, userspace may had already started reading a new (but not complete!) packet.
This means that now DCO will receive data which is not the beginning of a new packet, but rather the end of a previous one, that is partly buffered in userspace.

This goes against the current assumption made bvy DCO, that is "I expect new packets from the beginning".

To fix this scenario, userspace could pass a "residual length" parameter along with the socket telling DCO how many bytes should directly be passed to userspace before assuming that a new packet will begin.

This change should happen in the new-peer command.

@ordex ordex self-assigned this Mar 2, 2023
@ordex ordex added the bug Something isn't working label Mar 2, 2023
@ordex
Copy link
Member Author

ordex commented Mar 2, 2023

Note: this is quite unlikely to reproduce and so far we never received any report. But it is something that can theoretically may happen.

@ordex ordex added enhancement New feature or request and removed bug Something isn't working labels Mar 24, 2023
@ordex
Copy link
Member Author

ordex commented Mar 24, 2023

As of now userspace won't make this happen, because it checks if there is any residual and if so, it just bails out.
However we will likely implement this feature to improve flexibility and avoid corner cases.

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

No branches or pull requests

1 participant