search for: total_vqs

Displaying 20 results from an estimated 87 matches for "total_vqs".

2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
...ged, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6802169..340f737 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const bool *ctx; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -2062,6 +2063,13 @@ static int virtnet_find_vqs(struct virtnet_info *vi) names = kmalloc(total_vqs * sizeof...
2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
...ged, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6802169..340f737 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const bool *ctx; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -2062,6 +2063,13 @@ static int virtnet_find_vqs(struct virtnet_info *vi) names = kmalloc(total_vqs * sizeof...
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...et/virtio_net.c b/drivers/net/virtio_net.c > > index 6802169..340f737 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > int ret = -ENOMEM; > > int i, total_vqs; > > const char **names; > > + const bool *ctx; > > > > /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by > > * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by > > @@ -2062,6 +2063,13 @@ static int virtnet_find_vqs(s...
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...et/virtio_net.c b/drivers/net/virtio_net.c > > index 6802169..340f737 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > int ret = -ENOMEM; > > int i, total_vqs; > > const char **names; > > + const bool *ctx; > > > > /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by > > * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by > > @@ -2062,6 +2063,13 @@ static int virtnet_find_vqs(s...
2017 Mar 30
0
[PATCH 4/6] virtio_net: allow specifying context for rx
...; > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 6802169..340f737 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > int ret = -ENOMEM; > int i, total_vqs; > const char **names; > + const bool *ctx; > > /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by > * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by > @@ -2062,6 +2063,13 @@ static int virtnet_find_vqs(struct virtnet_info *vi) >...
2023 Apr 13
1
[PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command
...t; + virtqueue_get_buf(vi->cvq, &tmp); > > return vi->ctrl->status == VIRTIO_NET_OK; > } > @@ -3672,7 +3678,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > /* Parameters for control virtqueue, if any */ > if (vi->has_cvq) { > - callbacks[total_vqs - 1] = NULL; > + callbacks[total_vqs - 1] = virtnet_cvq_done; This depends the interrupt, right? I worry that there may be some devices that may not support interruption on cvq. Although this may not be in line with SPEC, it may cause problem on the devices that can work normally at present....
2014 Dec 26
0
[RFC PATCH 3/3] virtio-net: using single MSIX irq for each TX/RX queue pair
.../* Name of the send queue: output.$index */ char name[40]; + + /* Name of the channel, share with rxq */ + char channel_name[40]; }; /* Internal representation of a receive virtqueue */ @@ -1522,6 +1525,8 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const char **channel_names; + unsigned *channels; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -1540,6 +1545,14 @@ static int virtnet_find_vqs(struct virtnet_info *vi) n...
2014 Dec 26
0
[RFC PATCH 3/3] virtio-net: using single MSIX irq for each TX/RX queue pair
.../* Name of the send queue: output.$index */ char name[40]; + + /* Name of the channel, share with rxq */ + char channel_name[40]; }; /* Internal representation of a receive virtqueue */ @@ -1522,6 +1525,8 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const char **channel_names; + unsigned *channels; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -1540,6 +1545,14 @@ static int virtnet_find_vqs(struct virtnet_info *vi) n...
2023 Apr 14
1
[PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command
...t; return vi->ctrl->status == VIRTIO_NET_OK; > > } > > @@ -3672,7 +3678,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > > > /* Parameters for control virtqueue, if any */ > > if (vi->has_cvq) { > > - callbacks[total_vqs - 1] = NULL; > > + callbacks[total_vqs - 1] = virtnet_cvq_done; > > This depends the interrupt, right? Not necessarily, we have ISR for at last PCI: static irqreturn_t vp_interrupt(int irq, void *opaque) { struct virtio_pci_device *vp_dev = opaque; u8 isr;...
2017 Mar 29
5
[PATCH 1/6] virtio: wrap find_vqs
...1472e4..a111cd72 100644 --- a/drivers/crypto/virtio/virtio_crypto_core.c +++ b/drivers/crypto/virtio/virtio_crypto_core.c @@ -119,8 +119,7 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi) names[i] = vi->data_vq[i].name; } - ret = vi->vdev->config->find_vqs(vi->vdev, total_vqs, vqs, callbacks, - names, NULL); + ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); if (ret) goto err_find; diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 4918668..1e1c90b 100644 --- a/drivers/gpu/drm/virtio/virt...
2017 Mar 29
5
[PATCH 1/6] virtio: wrap find_vqs
...1472e4..a111cd72 100644 --- a/drivers/crypto/virtio/virtio_crypto_core.c +++ b/drivers/crypto/virtio/virtio_crypto_core.c @@ -119,8 +119,7 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi) names[i] = vi->data_vq[i].name; } - ret = vi->vdev->config->find_vqs(vi->vdev, total_vqs, vqs, callbacks, - names, NULL); + ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); if (ret) goto err_find; diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 4918668..1e1c90b 100644 --- a/drivers/gpu/drm/virtio/virt...
2017 Jul 18
1
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...(vi->stats); > > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > void *ctx; > > while (received < budget && > @@ -2198,7 +2200,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL); > if (!names) > goto err_names; > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL); > if (!ctx) > goto err_ctx; > -- > 2.7.4
2017 Jul 18
1
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...(vi->stats); > > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > void *ctx; > > while (received < budget && > @@ -2198,7 +2200,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL); > if (!names) > goto err_names; > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL); > if (!ctx) > goto err_ctx; > -- > 2.7.4
2017 Jul 17
0
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...ruct virtnet_stats *stats = this_cpu_ptr(vi->stats); - if (vi->mergeable_rx_bufs) { + if (!vi->big_packets || vi->mergeable_rx_bufs) { void *ctx; while (received < budget && @@ -2198,7 +2200,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL); if (!names) goto err_names; - if (vi->mergeable_rx_bufs) { + if (!vi->big_packets || vi->mergeable_rx_bufs) { ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL); if (!ctx) goto err_ctx; -- 2.7.4
2012 Dec 04
3
[PATCH net-next 0/3] Multiqueue support for virtio-net
Hi all: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please review and comments. A protype implementation of qemu-kvm support could by found in git://github.com/jasowang/qemu-kvm-mq.git. To start a guest with two queues, you could specify the queues
2012 Dec 04
3
[PATCH net-next 0/3] Multiqueue support for virtio-net
Hi all: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please review and comments. A protype implementation of qemu-kvm support could by found in git://github.com/jasowang/qemu-kvm-mq.git. To start a guest with two queues, you could specify the queues
2023 Jan 20
0
[PATCH 1/2] virtio-rng: implement entropy leak feature
...ed int copy_data(struct virtrng_info *vi, void *buf, > @@ -126,6 +268,40 @@ static void virtio_cleanup(struct hwrng *rng) > complete(&vi->have_data); > } > > +static int init_virtqueues(struct virtrng_info *vi, struct virtio_device *vdev) > +{ > + int ret = -ENOMEM, total_vqs = 1; > + struct virtqueue *vqs[3]; > + const char *names[3]; > + vq_callback_t *callbacks[3]; > + > + if (vi->has_leakqs) > + total_vqs = 3; > + > + callbacks[0] = random_recv_done; > + names[0] = "input"; > + if (vi->has_leakqs) { > + callbacks[1]...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...+ } > + } while (!virtqueue_enable_cb(vq)); > + spin_unlock_irqrestore(&vcrypto->lock, flags); > +} > + > +static int virtcrypto_find_vqs(struct virtio_crypto *vi) > +{ > + vq_callback_t **callbacks; > + struct virtqueue **vqs; > + int ret = -ENOMEM; > + int i, total_vqs; > + const char **names; > + > + /* We expect 1 data virtqueue, followed by > + * possible N-1 data queues used in multiqueue mode, followed by > + * control vq. > + */ > + total_vqs = vi->max_data_queues + 1; > + > + /* Allocate space for find_vqs parameters */ &gt...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...+ } > + } while (!virtqueue_enable_cb(vq)); > + spin_unlock_irqrestore(&vcrypto->lock, flags); > +} > + > +static int virtcrypto_find_vqs(struct virtio_crypto *vi) > +{ > + vq_callback_t **callbacks; > + struct virtqueue **vqs; > + int ret = -ENOMEM; > + int i, total_vqs; > + const char **names; > + > + /* We expect 1 data virtqueue, followed by > + * possible N-1 data queues used in multiqueue mode, followed by > + * control vq. > + */ > + total_vqs = vi->max_data_queues + 1; > + > + /* Allocate space for find_vqs parameters */ &gt...
2016 Nov 28
0
[virtio-dev] Re: [PATCH v2 2/2] crypto: add virtio-crypto driver
...); > > + spin_unlock_irqrestore(&vcrypto->lock, flags); > > +} > > + > > +static int virtcrypto_find_vqs(struct virtio_crypto *vi) > > +{ > > + vq_callback_t **callbacks; > > + struct virtqueue **vqs; > > + int ret = -ENOMEM; > > + int i, total_vqs; > > + const char **names; > > + > > + /* We expect 1 data virtqueue, followed by > > + * possible N-1 data queues used in multiqueue mode, followed by > > + * control vq. > > + */ > > + total_vqs = vi->max_data_queues + 1; > > + > > + /*...