mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
bc50b0420a
The strategy of passing Vec<u8> types introduced in crrev.com/c/2470376 can cause panics when the receiving side doesn't have the capacity to receive the full buffers produced by crosvm. For example, a virtio-console implementation with only one-byte buffers (https://android-review.googlesource.com/c/1853082) almost always won't have the capacity to receive the full buffers. Using a VecDeque ring buffer allows continually appending data from the input in the read thread and pulling off as much as the guest can handle in the guest communication thread, without sacrificing performance when the guest can handle higher volumes. Bug: b/182849835 Bug: b/203138623 Test: Pass some input with an unbuffered single-character console driver Test: Run CtsKeystoreTestCases against cuttlefish (high volume transfers) Change-Id: I6b52a729d5af82f4626a9b1f29176116299b9297 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3227733 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Cody Schuffelen <schuffelen@google.com> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_serial | ||
Cargo.toml |