Displaying 11 results from an estimated 11 matches for "vhost_net_buf_init".
2018 Mar 09
7
[PATCH net 0/3] Several fixes for vhost_net ptr_ring usage
Hi:
This small series try to fix several bugs of ptr_ring usage in
vhost_net. Please review.
Thanks
Alexander Potapenko (1):
vhost_net: initialize rx_ring in vhost_net_open()
Jason Wang (2):
vhost_net: keep private_data and rx_ring synced
vhost_net: examine pointer types during un-producing
drivers/net/tun.c | 3 ++-
drivers/vhost/net.c | 8 +++++---
include/linux/if_tun.h | 4
2018 Mar 09
0
[PATCH net 1/3] vhost_net: initialize rx_ring in vhost_net_open()
.../net.c
index 610cba2..60f1080 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -948,6 +948,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
n->vqs[i].done_idx = 0;
n->vqs[i].vhost_hlen = 0;
n->vqs[i].sock_hlen = 0;
+ n->vqs[i].rx_ring = NULL;
vhost_net_buf_init(&n->vqs[i].rxq);
}
vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX);
--
2.7.4
2020 Jul 20
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...Number of batched descriptors. (offset from 64)");
+module_param(batch_num, int, 0644);
+static int batch_num = 0;
+
static int vhost_net_open(struct inode *inode, struct file *f)
{
struct vhost_net *n;
@@ -1333,7 +1337,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
vhost_net_buf_init(&n->vqs[i].rxq);
}
vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX,
- UIO_MAXIOV + VHOST_NET_BATCH,
+ UIO_MAXIOV + VHOST_NET_BATCH + batch_num,
VHOST_NET_PKT_WEIGHT, VHOST_NET_WEIGHT, true,
NULL);
then you can try tweaking batching and playing with mod pa...
2020 Jul 20
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...4);
> > +static int batch_num = 0;
> > +
> > static int vhost_net_open(struct inode *inode, struct file *f)
> > {
> > struct vhost_net *n;
> > @@ -1333,7 +1337,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
> > vhost_net_buf_init(&n->vqs[i].rxq);
> > }
> > vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX,
> > - UIO_MAXIOV + VHOST_NET_BATCH,
> > + UIO_MAXIOV + VHOST_NET_BATCH + batch_num,
> > VHOST_NET_PKT_WEIGHT, V...
2020 Jul 21
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...0644);
>> +static int batch_num = 0;
>> +
>> static int vhost_net_open(struct inode *inode, struct file *f)
>> {
>> struct vhost_net *n;
>> @@ -1333,7 +1337,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
>> vhost_net_buf_init(&n->vqs[i].rxq);
>> }
>> vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX,
>> - UIO_MAXIOV + VHOST_NET_BATCH,
>> + UIO_MAXIOV + VHOST_NET_BATCH + batch_num,
>> VHOST_NET_PKT_WEIGHT, VHO...
2019 May 17
0
[PATCH V2 1/4] vhost: introduce vhost_exceeds_weight()
...al_len))) {
- vhost_poll_queue(&vq->poll);
+ if (unlikely(vhost_exceeds_weight(vq, ++recv_pkts, total_len)))
goto out;
- }
}
if (unlikely(busyloop_intr))
vhost_poll_queue(&vq->poll);
@@ -1338,7 +1327,8 @@ static int vhost_net_open(struct inode *inode, struct file *f)
vhost_net_buf_init(&n->vqs[i].rxq);
}
vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX,
- UIO_MAXIOV + VHOST_NET_BATCH);
+ UIO_MAXIOV + VHOST_NET_BATCH,
+ VHOST_NET_WEIGHT, VHOST_NET_PKT_WEIGHT);
vhost_poll_init(n->poll + VHOST_NET_VQ_TX, handle_tx_net, EPOLLOUT, dev);
vhost_poll_...
2019 May 16
6
[PATCH net 0/4] Prevent vhost kthread from hogging CPU
Hi:
This series try to prvernt a guest triggerable CPU hogging through
vhost kthread. This is done by introducing and checking the weight
after each requrest. The patch has been tested with reproducer of
vsock and virtio-net. Only compile test is done for vhost-scsi.
Please review.
This addresses CVE-2019-3900.
Jason Wang (4):
vhost: introduce vhost_exceeds_weight()
vhost_net: fix possible
2019 May 17
9
[PATCH V2 0/4] Prevent vhost kthread from hogging CPU
Hi:
This series try to prevent a guest triggerable CPU hogging through
vhost kthread. This is done by introducing and checking the weight
after each requrest. The patch has been tested with reproducer of
vsock and virtio-net. Only compile test is done for vhost-scsi.
Please review.
This addresses CVE-2019-3900.
Changs from V1:
- fix user-ater-free in vosck patch
Jason Wang (4):
vhost:
2019 May 17
9
[PATCH V2 0/4] Prevent vhost kthread from hogging CPU
Hi:
This series try to prevent a guest triggerable CPU hogging through
vhost kthread. This is done by introducing and checking the weight
after each requrest. The patch has been tested with reproducer of
vsock and virtio-net. Only compile test is done for vhost-scsi.
Please review.
This addresses CVE-2019-3900.
Changs from V1:
- fix user-ater-free in vosck patch
Jason Wang (4):
vhost:
2020 Jun 11
27
[PATCH RFC v8 00/11] vhost: ring format independence
This still causes corruption issues for people so don't try
to use in production please. Posting to expedite debugging.
This adds infrastructure required for supporting
multiple ring formats.
The idea is as follows: we convert descriptors to an
independent format first, and process that converting to
iov later.
Used ring is similar: we fetch into an independent struct first,
convert that to
2020 Jun 11
27
[PATCH RFC v8 00/11] vhost: ring format independence
This still causes corruption issues for people so don't try
to use in production please. Posting to expedite debugging.
This adds infrastructure required for supporting
multiple ring formats.
The idea is as follows: we convert descriptors to an
independent format first, and process that converting to
iov later.
Used ring is similar: we fetch into an independent struct first,
convert that to