firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

Use u32 to describe vsock related buffer sizes

Open brandonpike opened this issue 2 months ago • 1 comments

Move to u32 for vsock module. We can translate from u32 to usize as needed.

Changes

  • Change VsockConnection::peer_avail_credit to return u32
  • Change VsockPacket::{buf_size, read_at_offset_from, write_from_offset_to} parameters & return types to u32
  • Change IoVecBuffer[Mut]::{read,write}_volatile_at to u32

Closes https://github.com/firecracker-microvm/firecracker/issues/4627

Reason

Follow-up to https://github.com/firecracker-microvm/firecracker/pull/4556.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check CONTRIBUTING.md.

PR Checklist

  • [x] If a specific issue led to this PR, this PR closes the issue.
  • [x] The description of changes is clear and encompassing.
  • [x] Any required documentation changes (code and docs) are included in this PR.
  • [x] API changes follow the Runbook for Firecracker API changes.
  • [x] User-facing changes are mentioned in CHANGELOG.md.
  • [x] All added/changed functionality is tested.
  • [x] New TODOs link to an issue.
  • [x] Commits meet contribution quality standards.

  • [x] This functionality cannot be added in rust-vmm.

brandonpike avatar Jun 10 '24 21:06 brandonpike