feat: add virtio-blk definitions - #33
Conversation
Co-authored-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de> Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
phip1611
left a comment
There was a problem hiding this comment.
LGTM but please consider adding context (why you performed certain changes) to the commit messages.
|
It looks good to me. It's just the CI errors that bother me. |
|
The CI status is expected. It's just cargo-semver-checks telling us that we need to do a major release. I'll merge this later. :) |
|
It looks good to me as well. |
Hm, I was confused by the error message:
For me, it doesn't sound that we have to increase the version number. :-) |
You are wrong. ^^ https://doc.rust-lang.org/cargo/reference/semver.html#generic-bounds-tighten In this case, they were only moved, but other changes are breaking anyway. |
I know. Yesterday I just read the message. Today, I clicked on the link :-) |
|
🚀 |
This PR adds the virtio-blk definitions. This is a combination of Kreb216@3f41c1e and stlankes@94d7608.
I have reworked the code to adhere to the style and naming conventions of this project. I have also added more definitions. I have tested this with the driver of @Kreb216 and the driver of @stlankes and both compile after adjusting a few names.
I have removed
RequestHeaderfrom @stlankes. Ideally, we would have avirtio::blk::Reqstruct corresponding to the definition in the spec:I did model this, and it works well from a Rust type perspective, but the first three fields and the last one are written by the driver, and the data is written by the device, though. This requires having three descriptors for one type, which does not work in the Hermit driver at the moment. Since it should be possible in principle, though, I would like to keep any implementation-specific helper types such as a header out of this project. It works fine to define the type in the Hermit driver, though.
@Kreb216, I cannot request a review from you through GitHub, but you are welcome to give this a try and leave comments if you have any. :)
This PR does not conflict with, but depends on, the following PRs:
Closes #28.