firecracker-microvm / firecracker

Secure and fast microVMs for serverless computing.
http://firecracker-microvm.io
Apache License 2.0
26.16k stars 1.81k forks source link

Use `u32` to describe vsock related buffer sizes #4627

Closed roypat closed 1 month ago

roypat commented 5 months ago

In #4556, we updated our generic virtio buffer handling code to describe buffer sizes using u32 instead of usize, since the virtio specification states that lengths of virtio-buffers fit into u32 (and header fields in the virtio protocol describing lengths are typed to be 32 bit integers).

From that work, a small follow up is possible in the vsock module, where we can now also describe lengths of vsock packages using u32 instead of usize. This will allow us to get rid of a few more explicit casts. Particularly, we can do the following changes to function signatures:

brandonpike commented 5 months ago

Can pick this one up as well as a followup to #4556.

RiverPhillips commented 2 months ago

Looks like #4637 has been abandoned, I'd be interested in picking it up