Displaying 20 results from an estimated 56 matches for "vhost_transport_send_pkt_work".
2019 Apr 05
2
[PATCH RFC 3/4] vsock/virtio: change the maximum packet size allowed
...the guest.
2. When the host send packets, it help us to increase the parallelism
(especially if the guest has 64 KB RX buffers) because the user thread
will split packets, calling multiple times transport->stream_enqueue()
in net/vmw_vsock/af_vsock.c:vsock_stream_sendmsg() while the
vhost_transport_send_pkt_work() send them to the guest.
Do you think make sense?
Thanks,
Stefano
2019 Apr 05
2
[PATCH RFC 3/4] vsock/virtio: change the maximum packet size allowed
...the guest.
2. When the host send packets, it help us to increase the parallelism
(especially if the guest has 64 KB RX buffers) because the user thread
will split packets, calling multiple times transport->stream_enqueue()
in net/vmw_vsock/af_vsock.c:vsock_stream_sendmsg() while the
vhost_transport_send_pkt_work() send them to the guest.
Do you think make sense?
Thanks,
Stefano
2019 Apr 08
0
[PATCH RFC 3/4] vsock/virtio: change the maximum packet size allowed
...the host send packets, it help us to increase the parallelism
> (especially if the guest has 64 KB RX buffers) because the user thread
> will split packets, calling multiple times transport->stream_enqueue()
> in net/vmw_vsock/af_vsock.c:vsock_stream_sendmsg() while the
> vhost_transport_send_pkt_work() send them to the guest.
Sorry, I don't understand the reasoning. Overall this creates more
work. Are you saying the benefit is that
vhost_transport_send_pkt_work() can run "early" and notify the guest of
partial rx data before all of it has been enqueued?
Stefan
-------------- n...
2019 Apr 08
2
[PATCH RFC 3/4] vsock/virtio: change the maximum packet size allowed
...s, it help us to increase the parallelism
> > (especially if the guest has 64 KB RX buffers) because the user thread
> > will split packets, calling multiple times transport->stream_enqueue()
> > in net/vmw_vsock/af_vsock.c:vsock_stream_sendmsg() while the
> > vhost_transport_send_pkt_work() send them to the guest.
>
> Sorry, I don't understand the reasoning. Overall this creates more
> work. Are you saying the benefit is that
> vhost_transport_send_pkt_work() can run "early" and notify the guest of
> partial rx data before all of it has been enqueued?...
2019 Apr 08
2
[PATCH RFC 3/4] vsock/virtio: change the maximum packet size allowed
...s, it help us to increase the parallelism
> > (especially if the guest has 64 KB RX buffers) because the user thread
> > will split packets, calling multiple times transport->stream_enqueue()
> > in net/vmw_vsock/af_vsock.c:vsock_stream_sendmsg() while the
> > vhost_transport_send_pkt_work() send them to the guest.
>
> Sorry, I don't understand the reasoning. Overall this creates more
> work. Are you saying the benefit is that
> vhost_transport_send_pkt_work() can run "early" and notify the guest of
> partial rx data before all of it has been enqueued?...
2018 Nov 15
3
[RFC] Discuss about an new idea "Vsock over Virtio-net"
...lly it was a socket on host as well I believe?
For vsock, Host->Guest, it's code flow as follows:
Server call send()
-> sendmsg(); (vsock_stream_sendmsg)
-> virtio_trasnport_send_pkt_info
-> alloc pkt, add pkt to send_pkt_list, wake up vhost_worker
Vhost_worker
-> vhost_transport_send_pkt_work
-> get pkt from send_pkt_list
-> get vq input desc and then fill data to desc addr
-> update used ring and then signal guest
In the whole process, host don't call recvmsg() because it is a net device, and
it also receives any messages.
For vhost-net, I understand it is a...
2018 Nov 15
3
[RFC] Discuss about an new idea "Vsock over Virtio-net"
...lly it was a socket on host as well I believe?
For vsock, Host->Guest, it's code flow as follows:
Server call send()
-> sendmsg(); (vsock_stream_sendmsg)
-> virtio_trasnport_send_pkt_info
-> alloc pkt, add pkt to send_pkt_list, wake up vhost_worker
Vhost_worker
-> vhost_transport_send_pkt_work
-> get pkt from send_pkt_list
-> get vq input desc and then fill data to desc addr
-> update used ring and then signal guest
In the whole process, host don't call recvmsg() because it is a net device, and
it also receives any messages.
For vhost-net, I understand it is a...
2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...c[i].iov_base, tmp_len, &iov_iter);
+ if (nbytes != tmp_len) {
+ virtio_transport_free_pkt(pkt);
+ vq_err(vq, "Faulted on copying pkt buf\n");
+ break;
+ }
+
+ remain_len -= tmp_len;
}
vhost_add_used_n(vq, vq->heads, headcount);
@@ -341,6 +351,7 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
struct iov_iter iov_iter;
size_t nbytes;
size_t len;
+ void *buf;
if (in != 0) {
vq_err(vq, "Expected 0 input buffers, got %u\n", in);
@@ -375,13 +386,17 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
return NULL;
}
- pkt-&...
2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...c[i].iov_base, tmp_len, &iov_iter);
+ if (nbytes != tmp_len) {
+ virtio_transport_free_pkt(pkt);
+ vq_err(vq, "Faulted on copying pkt buf\n");
+ break;
+ }
+
+ remain_len -= tmp_len;
}
vhost_add_used_n(vq, vq->heads, headcount);
@@ -341,6 +351,7 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
struct iov_iter iov_iter;
size_t nbytes;
size_t len;
+ void *buf;
if (in != 0) {
vq_err(vq, "Expected 0 input buffers, got %u\n", in);
@@ -375,13 +386,17 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
return NULL;
}
- pkt-&...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
..._transport_free_pkt(pkt);
>> + vq_err(vq, "Faulted on copying pkt buf\n");
>> + break;
>> + }
>> +
>> + remain_len -= tmp_len;
>> }
>>
>> vhost_add_used_n(vq, vq->heads, headcount);
>> @@ -341,6 +351,7 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
>> struct iov_iter iov_iter;
>> size_t nbytes;
>> size_t len;
>> + void *buf;
>>
>> if (in != 0) {
>> vq_err(vq, "Expected 0 input buffers, got %u\n", in);
>> @@ -375,13 +386,17 @@ static void vhost_transp...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
..._transport_free_pkt(pkt);
>> + vq_err(vq, "Faulted on copying pkt buf\n");
>> + break;
>> + }
>> +
>> + remain_len -= tmp_len;
>> }
>>
>> vhost_add_used_n(vq, vq->heads, headcount);
>> @@ -341,6 +351,7 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
>> struct iov_iter iov_iter;
>> size_t nbytes;
>> size_t len;
>> + void *buf;
>>
>> if (in != 0) {
>> vq_err(vq, "Expected 0 input buffers, got %u\n", in);
>> @@ -375,13 +386,17 @@ static void vhost_transp...
2020 Apr 30
2
[PATCH] vhost: vsock: don't send pkt when vq is not started
...ng virtio vsock server.
> > >
> > > The abnormal flow looks like:
> > > host-userspace vhost vsock guest vsock
> > > ============== =========== ============
> > > connect() --------> vhost_transport_send_pkt_work() initializing
> > > | vq->private_data==NULL
> > > | will not be queued
> > > V
> > > schedule_timeout(2s)
> > > vhost_vsock_start() <--------- device ready
> > &...
2020 Apr 30
2
[PATCH] vhost: vsock: don't send pkt when vq is not started
...ng virtio vsock server.
> > >
> > > The abnormal flow looks like:
> > > host-userspace vhost vsock guest vsock
> > > ============== =========== ============
> > > connect() --------> vhost_transport_send_pkt_work() initializing
> > > | vq->private_data==NULL
> > > | will not be queued
> > > V
> > > schedule_timeout(2s)
> > > vhost_vsock_start() <--------- device ready
> > &...
2013 Jun 27
2
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...se refcnt taken in vhost_transport_send_pkt */
> + sock_put(sk);
> +
> + virtio_transport_free_pkt(pkt);
> + }
> + vhost_signal(&vsock->dev, vq);
I think you should not signal if used was not updated.
> + mutex_unlock(&vq->mutex);
> +}
> +
> +static void vhost_transport_send_pkt_work(struct vhost_work *work)
> +{
> + struct vhost_virtqueue *vq;
> + struct vhost_vsock *vsock;
> +
> + vsock = container_of(work, struct vhost_vsock, send_pkt_work);
> + vq = &vsock->vqs[VSOCK_VQ_RX].vq;
> +
> + vhost_transport_do_send_pkt(vsock, vq);
> +}
> +
>...
2013 Jun 27
2
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...se refcnt taken in vhost_transport_send_pkt */
> + sock_put(sk);
> +
> + virtio_transport_free_pkt(pkt);
> + }
> + vhost_signal(&vsock->dev, vq);
I think you should not signal if used was not updated.
> + mutex_unlock(&vq->mutex);
> +}
> +
> +static void vhost_transport_send_pkt_work(struct vhost_work *work)
> +{
> + struct vhost_virtqueue *vq;
> + struct vhost_vsock *vsock;
> +
> + vsock = container_of(work, struct vhost_vsock, send_pkt_work);
> + vq = &vsock->vqs[VSOCK_VQ_RX].vq;
> +
> + vhost_transport_do_send_pkt(vsock, vq);
> +}
> +
>...
2018 Dec 12
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...ytes != tmp_len) {
> + virtio_transport_free_pkt(pkt);
> + vq_err(vq, "Faulted on copying pkt buf\n");
> + break;
> + }
> +
> + remain_len -= tmp_len;
> }
>
> vhost_add_used_n(vq, vq->heads, headcount);
> @@ -341,6 +351,7 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
> struct iov_iter iov_iter;
> size_t nbytes;
> size_t len;
> + void *buf;
>
> if (in != 0) {
> vq_err(vq, "Expected 0 input buffers, got %u\n", in);
> @@ -375,13 +386,17 @@ static void vhost_transport_send_pkt_work(struct vhost_...
2013 Jun 27
0
[RFC 4/5] VSOCK: Introduce vhost-vsock.ko
...gt;len);
+
+ virtio_transport_dec_tx_pkt(pkt);
+
+ sk = sk_vsock(pkt->trans->vsk);
+ /* Release refcnt taken in vhost_transport_send_pkt */
+ sock_put(sk);
+
+ virtio_transport_free_pkt(pkt);
+ }
+ vhost_signal(&vsock->dev, vq);
+ mutex_unlock(&vq->mutex);
+}
+
+static void vhost_transport_send_pkt_work(struct vhost_work *work)
+{
+ struct vhost_virtqueue *vq;
+ struct vhost_vsock *vsock;
+
+ vsock = container_of(work, struct vhost_vsock, send_pkt_work);
+ vq = &vsock->vqs[VSOCK_VQ_RX].vq;
+
+ vhost_transport_do_send_pkt(vsock, vq);
+}
+
+static int
+vhost_transport_send_pkt(struct vsock_so...
2020 May 01
0
[PATCH v2] vhost: vsock: kick send_pkt worker once device is started
...vsock client tries to connect
> an initializing virtio vsock server.
>
> The abnormal flow looks like:
> host-userspace vhost vsock guest vsock
> ============== =========== ============
> connect() --------> vhost_transport_send_pkt_work() initializing
> | vq->private_data==NULL
> | will not be queued
> V
> schedule_timeout(2s)
> vhost_vsock_start() <--------- device ready
> set vq->private_data
>
&...
2018 Dec 13
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...vq_err(vq, "Faulted on copying pkt buf\n");
> >> + break;
> >> + }
> >> +
> >> + remain_len -= tmp_len;
> >> }
> >>
> >> vhost_add_used_n(vq, vq->heads, headcount);
> >> @@ -341,6 +351,7 @@ static void vhost_transport_send_pkt_work(struct vhost_work *work)
> >> struct iov_iter iov_iter;
> >> size_t nbytes;
> >> size_t len;
> >> + void *buf;
> >>
> >> if (in != 0) {
> >> vq_err(vq, "Expected 0 input buffers, got %u\n", in);
> >> @@ -37...
2018 Nov 15
2
[RFC] Discuss about an new idea "Vsock over Virtio-net"
...t;Guest, it's code flow as follows:
>> Server call send()
>> -> sendmsg(); (vsock_stream_sendmsg)
>> -> virtio_trasnport_send_pkt_info
>> -> alloc pkt, add pkt to send_pkt_list, wake up vhost_worker
>>
>> Vhost_worker
>> -> vhost_transport_send_pkt_work
>> -> get pkt from send_pkt_list
>> -> get vq input desc and then fill data to desc addr
>> -> update used ring and then signal guest
>>
>> In the whole process, host don't call recvmsg() because it is a net device, and
>> it also rece...