search for: virtio_transport_alloc_skb

Displaying 8 results from an estimated 8 matches for "virtio_transport_alloc_skb".

2023 Feb 16
0
[RFC PATCH v1 07/12] vsock/virtio: MGS_ZEROCOPY flag support
...ort_init_zcopy_skb(vsk, skb, >+ &info->msg->msg_iter, >+ false); >+ >+ return 0; >+} >+ > /* Returns a new packet on success, otherwise returns NULL. > * > * If NULL is returned, errp is set to a negative errno. >@@ -47,15 +210,31 @@ virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *info, > u32 src_cid, > u32 src_port, > u32 dst_cid, >- u32 dst_port) >+ u32 dst_port, >+ struct vsock_sock *vsk) > { >- const size_t skb_len = VIRTIO_VSOCK_SKB_HEADROOM + len; >+ const size_t skb_len = VIRTIO_...
2023 Mar 21
0
[RFC PATCH v3] virtio/vsock: allocate multiple skbuffs on tx
...return less than pkt_len credit */ > pkt_len = virtio_transport_get_credit(vvs, pkt_len); > >@@ -227,17 +224,51 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, > if (pkt_len == 0 && info->op == VIRTIO_VSOCK_OP_RW) > return pkt_len; > >- skb = virtio_transport_alloc_skb(info, pkt_len, >- src_cid, src_port, >- dst_cid, dst_port); >- if (!skb) { >- virtio_transport_put_credit(vvs, pkt_len); >- return -ENOMEM; >- } >+ ret = 0; >+ rest_len = pkt_len; >+ >+ do { >+ struct sk_buff *skb; >+ size_t skb_len; >+ >+ sk...
2023 Mar 22
0
[RFC PATCH v4] virtio/vsock: allocate multiple skbuffs on tx
...return less than pkt_len credit */ > pkt_len = virtio_transport_get_credit(vvs, pkt_len); > >@@ -227,17 +224,51 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, > if (pkt_len == 0 && info->op == VIRTIO_VSOCK_OP_RW) > return pkt_len; > >- skb = virtio_transport_alloc_skb(info, pkt_len, >- src_cid, src_port, >- dst_cid, dst_port); >- if (!skb) { >- virtio_transport_put_credit(vvs, pkt_len); >- return -ENOMEM; >- } >+ ret = 0; nit: this initialization seems superfluous since `ret` is overwritten later ... >+ rest_len = pkt_len; &...
2023 Mar 21
0
[RFC PATCH v2] virtio/vsock: allocate multiple skbuffs on tx
...sport_get_credit(vvs, pkt_len); >>> >>> @@ -227,17 +224,45 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, >>> ????if (pkt_len == 0 && info->op == VIRTIO_VSOCK_OP_RW) >>> ??????? return pkt_len; >>> >>> -??? skb = virtio_transport_alloc_skb(info, pkt_len, >>> -???????????????????? src_cid, src_port, >>> -???????????????????? dst_cid, dst_port); >>> -??? if (!skb) { >>> -??????? virtio_transport_put_credit(vvs, pkt_len); >>> -??????? return -ENOMEM; >>> -??? } >>> +??? ret...
2023 Aug 01
0
[PATCH net-next v5 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...turn 0; > + This path does not update truesize, evem if it increases the skb len... > + return 0; > + } > +} [...] > @@ -214,6 +251,70 @@ static u16 virtio_transport_get_type(struct sock *sk) > return VIRTIO_VSOCK_TYPE_SEQPACKET; > } > > +static struct sk_buff *virtio_transport_alloc_skb(struct vsock_sock *vsk, > + struct virtio_vsock_pkt_info *info, > + size_t payload_len, > + bool zcopy, > + u32 src_cid, > + u32 src_port, > + u32 dst_cid, > + u32 dst_port) > +{ > + struct sk_buff *skb; > + size_t skb_l...
2023 Aug 01
0
[PATCH net-next v5 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...urn 0; > > > + } > > > +} > > > > [...] > > > > > @@ -214,6 +251,70 @@ static u16 virtio_transport_get_type(struct sock *sk) > > > return VIRTIO_VSOCK_TYPE_SEQPACKET; > > > } > > > > > > +static struct sk_buff *virtio_transport_alloc_skb(struct vsock_sock *vsk, > > > + struct virtio_vsock_pkt_info *info, > > > + size_t payload_len, > > > + bool zcopy, > > > + u32 src_cid, > > > + u32 src_port, > > > + u32 dst_cid, > > > +...
2023 Feb 16
0
[RFC PATCH v1 06/12] vsock/virtio: non-linear skb handling for TAP dev
...ertions(+), 3 deletions(-) > >diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c >index a1581c77cf84..05ce97b967ad 100644 >--- a/net/vmw_vsock/virtio_transport_common.c >+++ 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)) { &gt...
2023 Sep 04
0
[PATCH net-next v7 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...Krasnov <avkrasnov at salutedevices.com> [...] >>> >>> -/* Returns a new packet on success, otherwise returns NULL. >>> - * >>> - * If NULL is returned, errp is set to a negative errno. >>> - */ >>> -static struct sk_buff * >>> -virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *info, >>> -?????????????? size_t len, >>> -?????????????? u32 src_cid, >>> -?????????????? u32 src_port, >>> -?????????????? u32 dst_cid, >>> -?????????????? u32 dst_port) >>> -{ >>> -??? const size_t skb_l...