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

Move Guest stuff into a module #1125

Merged
merged 4 commits into from
Feb 7, 2024
Merged

Conversation

mkeeter
Copy link
Contributor

@mkeeter mkeeter commented Jan 30, 2024

This prevents us from directly messing with internals, improving system modularity.

(it's secretly a building block for later improvements to backpressure, but stands alone as a reorganization PR)

Things moved include

  • struct Guest (still republished at the crate root to avoid breaking dependencies)
  • struct GuestWork
  • struct GuestIoHandle
  • struct GuestWorkId
  • struct GtoS (now private, since it's an implementation detail of GuestWork)
  • struct BackpressureConfig

There should be no logical changes, just a bunch of reorganization + adding small functions to replace direct poking of GuestIoHandle / GuestWork internals. One notable addition is GuestWork::submit_job, which consolidates a common sequence of "get next GuestWorkId, use it to get a JobId, use that to build a GtoS, insert it into the GuestWork map".

@@ -0,0 +1,1417 @@
// Copyright 2023 Oxide Computer Company
Copy link
Contributor

Choose a reason for hiding this comment

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

This can go to 2024 now!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@mkeeter mkeeter merged commit 2ee617c into oxidecomputer:main Feb 7, 2024
18 checks passed
@mkeeter mkeeter deleted the mod-guest branch February 7, 2024 18:04
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.

2 participants