Refactor dladm crate#1134
Open
daniel-levin wants to merge 1 commit intomasterfrom
Open
Conversation
There was a problem hiding this comment.
license-eye has checked 385 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 293 | 1 | 91 | 0 |
Click to see the invalid file list
- crates/dladm/tests/dladm.rs
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
127d77a to
7d425b4
Compare
This is a large, but self-contained change that fixes up a few things in the dladm crate. In the future I have Big Plans for running Bayesian optimization loops on various link parameters, and will need to use this crate. While this change is merely preparatory, I decided to fix some things along the way. First, dladm_handle_t is changed to no longer use the empty enum as an FFI type, which is unsound. See: https://doc.rust-lang.org/nomicon/ffi.html The crate no longer shells out to dladm. It struck me as a bit gross to shell out to dladm when we're linking against libdladm in the first place. I renamed Handle to Dladm and called its most imporant method describe. In addition, some fields that dladm furnishes us with anyway (upon calling dladm_name2info) have been added to LinkInfo and exported for use in Propolis. Several disabled unit tests are added, which are useful for hacking on this crate. Finally, I made it clear that this crate does no allocations. It's just one less thing to think about when reasoning about code linked into our VMM. Update crates/dladm/tests/dladm.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
7d425b4 to
83eeaf0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a large, but self-contained change that
fixes up a few things in the dladm crate. In the
future I have Big Plans for running Bayesian
optimization loops on various link parameters,
and will need to use this crate. While this change is merely preparatory, I decided to fix some
things along the way.
First, dladm_handle_t is changed to no longer use the empty enum as an FFI type, which is unsound.
See: https://doc.rust-lang.org/nomicon/ffi.html
The crate no longer shells out to dladm.
It struck me as a bit gross to shell out to dladm
when we're linking against libdladm in the first place.
I renamed Handle to Dladm and called its most imporant method describe. In addition, some fields that
dladm furnishes us with anyway (upon calling
dladm_name2info) have been added to LinkInfo and
exported for use in Propolis.
Several disabled unit tests are added, which are useful for hacking on this crate.
Finally, I made it clear that this crate does no allocations. It's just one less thing to think about when reasoning about code linked into our VMM.