Displaying 20 results from an estimated 30000 matches similar to: "drivers/vhost: sizing of ubuf_info and heads"
2013 Mar 17
1
[PATCH net] vhost/net: fix heads usage of ubuf_info
ubuf info allocator uses guest controlled head as an index,
so a malicious guest could put the same head entry in the ring twice,
and we will get two callbacks on the same value.
To fix use upend_idx which is guaranteed to be unique.
Reported-by: Rusty Russell <rusty at rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
Cc: stable at kernel.org
---
Rusty's
2013 Mar 17
1
[PATCH net] vhost/net: fix heads usage of ubuf_info
ubuf info allocator uses guest controlled head as an index,
so a malicious guest could put the same head entry in the ring twice,
and we will get two callbacks on the same value.
To fix use upend_idx which is guaranteed to be unique.
Reported-by: Rusty Russell <rusty at rustcorp.com.au>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
Cc: stable at kernel.org
---
Rusty's
2020 Jun 02
0
[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs
Convert vhost net to use the new format-agnostic API.
In particular, don't poke at vq internals such as the
heads array.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/vhost/net.c | 153 +++++++++++++++++++++++---------------------
1 file changed, 81 insertions(+), 72 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index
2013 Apr 27
0
[PATCH] vhost: Move vhost-net zerocopy support fields to net.c
On top of 'vhost: Allow device specific fields per vq', we can move device
specific fields to device virt queue from vhost virt queue.
Signed-off-by: Asias He <asias at redhat.com>
---
drivers/vhost/net.c | 164 +++++++++++++++++++++++++++++++++++++++++++-------
drivers/vhost/vhost.c | 57 +-----------------
drivers/vhost/vhost.h | 22 -------
3 files changed, 142
2013 Apr 27
0
[PATCH] vhost: Move vhost-net zerocopy support fields to net.c
On top of 'vhost: Allow device specific fields per vq', we can move device
specific fields to device virt queue from vhost virt queue.
Signed-off-by: Asias He <asias at redhat.com>
---
drivers/vhost/net.c | 164 +++++++++++++++++++++++++++++++++++++++++++-------
drivers/vhost/vhost.c | 57 +-----------------
drivers/vhost/vhost.h | 22 -------
3 files changed, 142
2020 Jun 03
1
[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs
On 2020/6/2 ??9:06, Michael S. Tsirkin wrote:
> Convert vhost net to use the new format-agnostic API.
> In particular, don't poke at vq internals such as the
> heads array.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> drivers/vhost/net.c | 153 +++++++++++++++++++++++---------------------
> 1 file changed, 81 insertions(+), 72 deletions(-)
2011 Jul 18
1
[PATCHv10] vhost: vhost TX zero-copy support
This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set the zerocopytx
module option to 1.
This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is monitored through last reference of kfree_skb callback. Two
2011 Jul 18
1
[PATCHv10] vhost: vhost TX zero-copy support
This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set the zerocopytx
module option to 1.
This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is monitored through last reference of kfree_skb callback. Two
2011 Jul 18
1
[PATCHv11] vhost: vhost TX zero-copy support
>From: Shirley Ma <mashirle at us.ibm.com>
This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set
experimental_zcopytx module option to 1.
This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is
2011 Jul 18
1
[PATCHv11] vhost: vhost TX zero-copy support
>From: Shirley Ma <mashirle at us.ibm.com>
This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set
experimental_zcopytx module option to 1.
This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is
2011 Jul 17
3
[PATCHv9] vhost: experimental tx zero-copy support
From: Shirley Ma <mashirle at us.ibm.com>
This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set the zerocopytx
module option to 1.
This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is monitored
2011 Jul 17
3
[PATCHv9] vhost: experimental tx zero-copy support
From: Shirley Ma <mashirle at us.ibm.com>
This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set the zerocopytx
module option to 1.
This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is monitored
2013 Sep 05
0
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
On 09/04/2013 07:59 PM, Michael S. Tsirkin wrote:
> On Mon, Sep 02, 2013 at 04:40:59PM +0800, Jason Wang wrote:
>> Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
>> upend_idx != done_idx we still set zcopy_used to true and rollback this choice
>> later. This could be avoided by determining zerocopy once by checking all
>> conditions at one
2013 Sep 04
2
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
On Mon, Sep 02, 2013 at 04:40:59PM +0800, Jason Wang wrote:
> Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
> upend_idx != done_idx we still set zcopy_used to true and rollback this choice
> later. This could be avoided by determining zerocopy once by checking all
> conditions at one time before.
>
> Signed-off-by: Jason Wang <jasowang at
2013 Sep 04
2
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
On Mon, Sep 02, 2013 at 04:40:59PM +0800, Jason Wang wrote:
> Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
> upend_idx != done_idx we still set zcopy_used to true and rollback this choice
> later. This could be avoided by determining zerocopy once by checking all
> conditions at one time before.
>
> Signed-off-by: Jason Wang <jasowang at
2013 Aug 30
0
[PATCH V2 4/6] vhost_net: determine whether or not to use zerocopy at one time
Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
upend_idx != done_idx we still set zcopy_used to true and rollback this choice
later. This could be avoided by determine zerocopy once by checking all
conditions at one time before.
Signed-off-by: Jason Wang <jasowang at redhat.com>
---
drivers/vhost/net.c | 46 +++++++++++++++++++---------------------------
1
2013 Sep 02
0
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
upend_idx != done_idx we still set zcopy_used to true and rollback this choice
later. This could be avoided by determining zerocopy once by checking all
conditions at one time before.
Signed-off-by: Jason Wang <jasowang at redhat.com>
---
drivers/vhost/net.c | 47 ++++++++++++++++++++---------------------------
1
2013 Jun 06
0
[PATCH net 2/2] vhost: fix ubuf_info cleanup
vhost_net_clear_ubuf_info didn't clear ubuf_info
after kfree, this could trigger double free.
Fix this and simplify this code to make it more robust: make sure
ubuf info is always freed through vhost_net_clear_ubuf_info.
Reported-by: Tommi Rantala <tt.rantala at gmail.com>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/vhost/net.c | 22 +++++++---------------
1
2017 Sep 22
0
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
This patch implements basic batched processing of tx virtqueue by
prefetching desc indices and updating used ring in a batch. For
non-zerocopy case, vq->heads were used for storing the prefetched
indices and updating used ring. It is also a requirement for doing
more batching on top. For zerocopy case and for simplicity, batched
processing were simply disabled by only fetching and processing
2013 Sep 23
2
[PATCH V3 4/6] vhost_net: determine whether or not to use zerocopy at one time
On Thu, Sep 05, 2013 at 10:54:44AM +0800, Jason Wang wrote:
> On 09/04/2013 07:59 PM, Michael S. Tsirkin wrote:
> > On Mon, Sep 02, 2013 at 04:40:59PM +0800, Jason Wang wrote:
> >> Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if
> >> upend_idx != done_idx we still set zcopy_used to true and rollback this choice
> >> later. This could