search for: virtio_transport_can_zcopy

Displaying 2 results from an estimated 2 matches for "virtio_transport_can_zcopy".

2023 Feb 16
0
[RFC PATCH v1 07/12] vsock/virtio: MGS_ZEROCOPY flag support
...vmw_vsock/virtio_transport_common.c >@@ -37,6 +37,169 @@ virtio_transport_get_ops(struct vsock_sock *vsk) > return container_of(t, struct virtio_transport, transport); > } > I'd use bool if we don't need to return an error value in the following new functions. >+static int virtio_transport_can_zcopy(struct iov_iter *iov_iter, >+ size_t free_space) >+{ >+ size_t pages; >+ int i; >+ >+ if (!iter_is_iovec(iov_iter)) >+ return -1; >+ >+ if (iov_iter->iov_offset) >+ return -1; >+ >+ /* We can't send whole iov. */ >+ if (free_space < iov_it...
2023 Sep 04
0
[PATCH net-next v7 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...2 src_port, >>> -?????????????? u32 dst_cid, >>> -?????????????? u32 dst_port) >>> -{ >>> -??? const size_t skb_len = VIRTIO_VSOCK_SKB_HEADROOM + len; >>> -??? struct virtio_vsock_hdr *hdr; >>> -??? struct sk_buff *skb; >>> +static bool virtio_transport_can_zcopy(struct virtio_vsock_pkt_info *info, >>> +?????????????????????? size_t max_to_send) >> ????????????????????????????????????????????? ^ >> I'd call it `pkt_len`, `max_to_send` is confusing IMHO. I didn't >> initially if it was the number of buffers or bytes. >&g...