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

Virtq refactor #1174

Merged
merged 3 commits into from May 15, 2024
Merged

Virtq refactor #1174

merged 3 commits into from May 15, 2024

Conversation

cagatay-y
Copy link
Contributor

No description provided.

@cagatay-y cagatay-y marked this pull request as ready for review May 13, 2024 14:39
@mkroening mkroening self-requested a review May 14, 2024 13:51
@mkroening mkroening self-assigned this May 14, 2024
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Thanks!

Transfer was a wrapper around TransferToken, which in turn is a wrapper around BufferToken with the state of the transfer and the queue which the transfer is to be returned. The receiving queues do not need a reference to themselves and the transfer state is no longer needed as a variable since we do not share the transfer with the caller while the transfer in process. As a result, we are able to replace the uses of Transfer with BufferToken. Most methods on Transfer are also wrappers around the underlying BufferToken and could be removed in entirely. Those that didn't have an exact analogue in the implementation of BufferToken were moved there.
The TransferState was needed to check the status of the Transfer when it was shared between the caller and the callee. However, this is no longer the case and the caller cannot access a in-progress transfer anymore. Thus, the related checks are no longer needed and the field is no longer necessary.
@mkroening mkroening enabled auto-merge May 15, 2024 15:06
@mkroening mkroening added this pull request to the merge queue May 15, 2024
Merged via the queue into hermit-os:main with commit c18cd5b May 15, 2024
13 checks passed
@cagatay-y cagatay-y deleted the virtq-piece-by-piece branch May 16, 2024 13:41
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.

None yet

2 participants