search for: rest_len

Displaying 5 results from an estimated 5 matches for "rest_len".

Did you mean: dest_len
2023 Mar 22
0
[RFC PATCH v4] virtio/vsock: allocate multiple skbuffs on tx
...ytes sent (even in > case of error). Return error only if failed to sent first > skbuff. > > v2 -> v3: > - Handle case when transport callback returns unexpected value which > is not equal to 'skb->len'. Break loop. > - Don't check for zero value of 'rest_len' before calling > 'virtio_transport_put_credit()'. Decided to add this check directly > to 'virtio_transport_put_credit()' in separate patch. > > v3 -> v4: > - Use WARN_ONCE() to handle case when transport callback returns > unexpected value. > - Re...
2023 Mar 21
0
[RFC PATCH v3] virtio/vsock: allocate multiple skbuffs on tx
...ytes sent (even in > case of error). Return error only if failed to sent first > skbuff. > > v2 -> v3: > - Handle case when transport callback returns unexpected value which > is not equal to 'skb->len'. Break loop. > - Don't check for zero value of 'rest_len' before calling > 'virtio_transport_put_credit()'. Decided to add this check directly > to 'virtio_transport_put_credit()' in separate patch. > > net/vmw_vsock/virtio_transport_common.c | 59 +++++++++++++++++++------ > 1 file changed, 45 insertions(+), 14 dele...
2023 Feb 16
0
[RFC PATCH v1 04/12] vhost/vsock: non-linear skb handling support
...b/drivers/vhost/vsock.c >@@ -86,6 +86,44 @@ static struct vhost_vsock *vhost_vsock_get(u32 guest_cid) > return NULL; > } > >+static int vhost_transport_copy_nonlinear_skb(struct sk_buff *skb, >+ struct iov_iter *iov_iter, >+ size_t len) >+{ >+ size_t rest_len = len; >+ >+ while (rest_len && virtio_vsock_skb_has_frags(skb)) { >+ struct bio_vec *curr_vec; >+ size_t curr_vec_end; >+ size_t to_copy; >+ int curr_frag; >+ int curr_offs; >+ >+ curr_frag = VIRTIO_VSOCK_SKB_CB(skb)->curr_frag; >+ curr_offs = VIRTIO...
2023 Mar 21
0
[RFC PATCH v2] virtio/vsock: allocate multiple skbuffs on tx
...@@ -196,7 +196,8 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, >>> ????const struct virtio_transport *t_ops; >>> ????struct virtio_vsock_sock *vvs; >>> ????u32 pkt_len = info->pkt_len; >>> -??? struct sk_buff *skb; >>> +??? u32 rest_len; >>> +??? int ret; >>> >>> ????info->type = virtio_transport_get_type(sk_vsock(vsk)); >>> >>> @@ -216,10 +217,6 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, >>> >>> ????vvs = vsk->trans; >>> >&g...
2023 Feb 16
0
[RFC PATCH v1 06/12] vsock/virtio: non-linear skb handling for TAP dev
...b/net/vmw_vsock/virtio_transport_common.c >@@ -101,6 +101,39 @@ virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *info, > return NULL; > } > >+static void virtio_transport_copy_nonlinear_skb(struct sk_buff *skb, >+ void *dst, >+ size_t len) >+{ >+ size_t rest_len = len; >+ >+ while (rest_len && virtio_vsock_skb_has_frags(skb)) { >+ struct bio_vec *curr_vec; >+ size_t curr_vec_end; >+ size_t to_copy; >+ int curr_frag; >+ int curr_offs; >+ >+ curr_frag = VIRTIO_VSOCK_SKB_CB(skb)->curr_frag; >+ curr_offs = VIRTIO...