From 5f5f6afacd32f8b569e4b7622f6863f8677105ab Mon Sep 17 00:00:00 2001 From: Keiichi Watanabe Date: Mon, 6 Dec 2021 23:14:35 +0900 Subject: [PATCH] vmm_vhost: Add TODO comments about IoSlice::advance_slice() BUG=b:194137301 TEST=cargo test Change-Id: I28466597209e4e81dc566d66d69875f59808eb0f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3317325 Reviewed-by: Chirantan Ekbote Tested-by: kokoro Commit-Queue: Keiichi Watanabe --- third_party/vmm_vhost/src/connection.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/third_party/vmm_vhost/src/connection.rs b/third_party/vmm_vhost/src/connection.rs index 3d298cc59c..59f831a07c 100644 --- a/third_party/vmm_vhost/src/connection.rs +++ b/third_party/vmm_vhost/src/connection.rs @@ -111,6 +111,12 @@ pub trait EndpointExt: Endpoint { /// /// # Return: /// * - number of bytes sent on success + /// + /// # TODO + /// This function takes a slice of `&[u8]` instead of `IoSlice` because the internal + /// cursor needs to be moved by `advance_slices()`. + /// Once `IoSlice::advance_slices()` becomes stable, this should be updated. + /// . fn send_iovec_all( &mut self, mut iovs: &mut [&[u8]], @@ -246,6 +252,12 @@ pub trait EndpointExt: Endpoint { /// * - (number of bytes received, [received fds]) on success /// * - SocketBroken: the underline socket is broken. /// * - SocketError: other socket related errors. + /// + /// # TODO + /// This function takes a slice of `&mut [u8]` instead of `IoSliceMut` because the internal + /// cursor needs to be moved by `advance_slices_mut()`. + /// Once `IoSliceMut::advance_slices()` becomes stable, this should be updated. + /// . fn recv_into_bufs_all( &mut self, mut bufs: &mut [&mut [u8]],