search for: virtio_transport_build_skb

Displaying 20 results from an estimated 29 matches for "virtio_transport_build_skb".

2023 Feb 16
0
[RFC PATCH v1 06/12] vsock/virtio: non-linear skb handling for TAP dev
...K_SKB_CB(skb)->frag_off += to_copy; >+ >+ if (VIRTIO_VSOCK_SKB_CB(skb)->frag_off == (curr_vec_end)) { >+ VIRTIO_VSOCK_SKB_CB(skb)->curr_frag++; >+ VIRTIO_VSOCK_SKB_CB(skb)->frag_off = 0; >+ } >+ } >+} >+ > /* Packet capture */ > static struct sk_buff *virtio_transport_build_skb(void *opaque) > { >@@ -109,7 +142,6 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) > struct af_vsockmon_hdr *hdr; > struct sk_buff *skb; > size_t payload_len; >- void *payload_buf; > > /* A packet could be split to fit the RX buffer, so we can retriev...
2020 Apr 24
0
[PATCH net v2 2/2] vsock/virtio: fix multiple packet delivery to monitoring devices
...ruct virtio_vsock_pkt_info { diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 709038a4783e..69efc891885f 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -157,7 +157,11 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) void virtio_transport_deliver_tap_pkt(struct virtio_vsock_pkt *pkt) { + if (pkt->tap_delivered) + return; + vsock_deliver_tap(virtio_transport_build_skb, pkt); + pkt->tap_delivered = true; } EXPORT_SYMBOL_GPL(virtio_transport_deliver_tap_pkt); -- 2.25.3
2019 Apr 05
1
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
...; > + continue; > > The virtio_transport_deliver_tap_pkt() call is skipped. Packet capture > should see the exact packets that are delivered. I think this patch > will present one large packet instead of several smaller packets that > were actually delivered. I'll modify virtio_transport_build_skb() to take care of pkt->off and reading the payload size from the virtio_vsock_hdr. Otherwise, should I introduce another field in virtio_vsock_pkt to store the payload size? Thanks, Stefano
2019 Apr 05
1
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
...; > + continue; > > The virtio_transport_deliver_tap_pkt() call is skipped. Packet capture > should see the exact packets that are delivered. I think this patch > will present one large packet instead of several smaller packets that > were actually delivered. I'll modify virtio_transport_build_skb() to take care of pkt->off and reading the payload size from the virtio_vsock_hdr. Otherwise, should I introduce another field in virtio_vsock_pkt to store the payload size? Thanks, Stefano
2019 Jul 17
0
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...ignal(&vsock->dev, vq); diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 34a2b42313b7..56fab3f03d0e 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -97,8 +97,17 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) struct virtio_vsock_pkt *pkt = opaque; struct af_vsockmon_hdr *hdr; struct sk_buff *skb; + size_t payload_len; + void *payload_buf; - skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, + /* A packet could be split to fit the RX buffer, so we can retrieve + * th...
2020 Apr 24
3
[PATCH net v2 0/2] vsock/virtio: fixes about packet delivery to monitoring devices
During the review of v1, Stefan pointed out an issue introduced by that patch, where replies can appear in the packet capture before the transmitted packet. While fixing my patch, reverting it and adding a new flag in 'struct virtio_vsock_pkt' (patch 2/2), I found that we already had that issue in vhost-vsock, so I fixed it (patch 1/2). v1 -> v2: - reverted the v1 patch, to avoid that
2020 Apr 21
2
[PATCH net] vsock/virtio: postpone packet delivery to monitoring devices
On Tue, Apr 21, 2020 at 04:42:46PM +0100, Stefan Hajnoczi wrote: > On Tue, Apr 21, 2020 at 11:25:27AM +0200, Stefano Garzarella wrote: > > We delivering packets to monitoring devices, before to check if > > the virtqueue has enough space. > > "We [are] delivering packets" and "before to check" -> "before > checking". Perhaps it can be
2020 Apr 21
2
[PATCH net] vsock/virtio: postpone packet delivery to monitoring devices
On Tue, Apr 21, 2020 at 04:42:46PM +0100, Stefan Hajnoczi wrote: > On Tue, Apr 21, 2020 at 11:25:27AM +0200, Stefano Garzarella wrote: > > We delivering packets to monitoring devices, before to check if > > the virtqueue has enough space. > > "We [are] delivering packets" and "before to check" -> "before > checking". Perhaps it can be
2019 Jul 17
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...vq); > diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c > index 34a2b42313b7..56fab3f03d0e 100644 > --- a/net/vmw_vsock/virtio_transport_common.c > +++ b/net/vmw_vsock/virtio_transport_common.c > @@ -97,8 +97,17 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) > struct virtio_vsock_pkt *pkt = opaque; > struct af_vsockmon_hdr *hdr; > struct sk_buff *skb; > + size_t payload_len; > + void *payload_buf; > > - skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, > + /* A packet could be split to fit t...
2019 Jul 17
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...vq); > diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c > index 34a2b42313b7..56fab3f03d0e 100644 > --- a/net/vmw_vsock/virtio_transport_common.c > +++ b/net/vmw_vsock/virtio_transport_common.c > @@ -97,8 +97,17 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) > struct virtio_vsock_pkt *pkt = opaque; > struct af_vsockmon_hdr *hdr; > struct sk_buff *skb; > + size_t payload_len; > + void *payload_buf; > > - skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, > + /* A packet could be split to fit t...
2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...>nr_vecs = 1; } trace_virtio_transport_alloc_pkt(src_cid, src_port, @@ -80,7 +85,7 @@ static const struct virtio_transport *virtio_transport_get_ops(void) return pkt; out: - kfree(pkt->buf); + kfree(buf); out_pkt: kfree(pkt); return NULL; @@ -92,6 +97,7 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) struct virtio_vsock_pkt *pkt = opaque; struct af_vsockmon_hdr *hdr; struct sk_buff *skb; + int i; skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, GFP_ATOMIC); @@ -134,7 +140,8 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) skb_put_d...
2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...>nr_vecs = 1; } trace_virtio_transport_alloc_pkt(src_cid, src_port, @@ -80,7 +85,7 @@ static const struct virtio_transport *virtio_transport_get_ops(void) return pkt; out: - kfree(pkt->buf); + kfree(buf); out_pkt: kfree(pkt); return NULL; @@ -92,6 +97,7 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) struct virtio_vsock_pkt *pkt = opaque; struct af_vsockmon_hdr *hdr; struct sk_buff *skb; + int i; skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, GFP_ATOMIC); @@ -134,7 +140,8 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) skb_put_d...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...80,7 +85,7 @@ static const struct virtio_transport *virtio_transport_get_ops(void) >> return pkt; >> >> out: >> - kfree(pkt->buf); >> + kfree(buf); >> out_pkt: >> kfree(pkt); >> return NULL; >> @@ -92,6 +97,7 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) >> struct virtio_vsock_pkt *pkt = opaque; >> struct af_vsockmon_hdr *hdr; >> struct sk_buff *skb; >> + int i; >> >> skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, >> GFP_ATOMIC); >> @@ -134,7 +140,8 @@ stat...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...80,7 +85,7 @@ static const struct virtio_transport *virtio_transport_get_ops(void) >> return pkt; >> >> out: >> - kfree(pkt->buf); >> + kfree(buf); >> out_pkt: >> kfree(pkt); >> return NULL; >> @@ -92,6 +97,7 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) >> struct virtio_vsock_pkt *pkt = opaque; >> struct af_vsockmon_hdr *hdr; >> struct sk_buff *skb; >> + int i; >> >> skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, >> GFP_ATOMIC); >> @@ -134,7 +140,8 @@ stat...
2018 Dec 12
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...oc_pkt(src_cid, src_port, > @@ -80,7 +85,7 @@ static const struct virtio_transport *virtio_transport_get_ops(void) > return pkt; > > out: > - kfree(pkt->buf); > + kfree(buf); > out_pkt: > kfree(pkt); > return NULL; > @@ -92,6 +97,7 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) > struct virtio_vsock_pkt *pkt = opaque; > struct af_vsockmon_hdr *hdr; > struct sk_buff *skb; > + int i; > > skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, > GFP_ATOMIC); > @@ -134,7 +140,8 @@ static struct sk_buff *virtio_trans...
2019 Apr 08
0
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
...; > The virtio_transport_deliver_tap_pkt() call is skipped. Packet capture > > should see the exact packets that are delivered. I think this patch > > will present one large packet instead of several smaller packets that > > were actually delivered. > > I'll modify virtio_transport_build_skb() to take care of pkt->off > and reading the payload size from the virtio_vsock_hdr. > Otherwise, should I introduce another field in virtio_vsock_pkt to store > the payload size? I don't remember the details but I trust you'll pick a good way of doing it. Stefan -------------...
2018 Dec 13
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...sport *virtio_transport_get_ops(void) > >> return pkt; > >> > >> out: > >> - kfree(pkt->buf); > >> + kfree(buf); > >> out_pkt: > >> kfree(pkt); > >> return NULL; > >> @@ -92,6 +97,7 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) > >> struct virtio_vsock_pkt *pkt = opaque; > >> struct af_vsockmon_hdr *hdr; > >> struct sk_buff *skb; > >> + int i; > >> > >> skb = alloc_skb(sizeof(*hdr) + sizeof(pkt->hdr) + pkt->len, > >> GFP_ATOMIC)...
2019 May 12
1
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...gt;len); > + } > + > + buf->len = pkt->len; > + > + return buf; > +} > + > +static void virtio_transport_free_buf(struct virtio_vsock_buf *buf) > +{ > + kfree(buf->addr); > + kfree(buf); > +} > + > /* Packet capture */ > static struct sk_buff *virtio_transport_build_skb(void *opaque) > { > @@ -190,17 +233,15 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk, > return virtio_transport_get_ops()->send_pkt(pkt); > } > > -static void virtio_transport_inc_rx_pkt(struct virtio_vsock_sock *vvs, > - struct virtio_vsock_p...
2019 Apr 04
1
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
If the packets to sent to the guest are bigger than the buffer available, we can split them, using multiple buffers and fixing the length in the packet header. This is safe since virtio-vsock supports only stream sockets. Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> --- drivers/vhost/vsock.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6
2019 May 31
7
[PATCH v3 0/5] vsock/virtio: optimizations to increase the throughput
This series tries to increase the throughput of virtio-vsock with slight changes. While I was testing the v2 of this series I discovered an huge use of memory, so I added patch 1 to mitigate this issue. I put it in this series in order to better track the performance trends. v3: - Patch 1: added a threshold to copy only small packets [Jason] - Patch 1: replaced the allocation of a new buffer