search for: nr_queue

Displaying 20 results from an estimated 31 matches for "nr_queue".

Did you mean: nr_queues
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...r(struct virtqueue *vq); > +static void out_intr(struct virtqueue *vq); > + > +static int setup_port_vq(struct ports_device *portdev, u32 id) > +{ > + int err, vq_num; > + vq_callback_t **io_callbacks; > + char **io_names; > + struct virtqueue **vqs; > + u32 i,j,nr_ports,nr_queues; > + > + err = 0; > + vq_num = (id + 1) * 2; > + nr_ports = portdev->config.max_nr_ports; > + nr_queues = use_multiport(portdev) ? (nr_ports + 1) * 2 : 2; > + > + vqs = kmalloc(nr_queues * sizeof(struct virtqueue *), GFP_KERNEL); > + io_callbacks = kmalloc(nr_queues * si...
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...r(struct virtqueue *vq); > +static void out_intr(struct virtqueue *vq); > + > +static int setup_port_vq(struct ports_device *portdev, u32 id) > +{ > + int err, vq_num; > + vq_callback_t **io_callbacks; > + char **io_names; > + struct virtqueue **vqs; > + u32 i,j,nr_ports,nr_queues; > + > + err = 0; > + vq_num = (id + 1) * 2; > + nr_ports = portdev->config.max_nr_ports; > + nr_queues = use_multiport(portdev) ? (nr_ports + 1) * 2 : 2; > + > + vqs = kmalloc(nr_queues * sizeof(struct virtqueue *), GFP_KERNEL); > + io_callbacks = kmalloc(nr_queues * si...
2010 May 18
1
[PATCH] fix a code style in drivers/char/virtio_console.c
...sole.c b/drivers/char/virtio_console.c index 196428c..61dad7e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1299,36 +1299,31 @@ static int init_vqs(struct ports_device *portdev) char **io_names; struct virtqueue **vqs; u32 i, j, nr_ports, nr_queues; - int err; + int err = -ENOMEM; nr_ports = portdev->config.max_nr_ports; nr_queues = use_multiport(portdev) ? (nr_ports + 1) * 2 : 2; vqs = kmalloc(nr_queues * sizeof(struct virtqueue *), GFP_KERNEL); if (!vqs) { - err = -ENOMEM;...
2010 May 18
1
[PATCH] fix a code style in drivers/char/virtio_console.c
...sole.c b/drivers/char/virtio_console.c index 196428c..61dad7e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1299,36 +1299,31 @@ static int init_vqs(struct ports_device *portdev) char **io_names; struct virtqueue **vqs; u32 i, j, nr_ports, nr_queues; - int err; + int err = -ENOMEM; nr_ports = portdev->config.max_nr_ports; nr_queues = use_multiport(portdev) ? (nr_ports + 1) * 2 : 2; vqs = kmalloc(nr_queues * sizeof(struct virtqueue *), GFP_KERNEL); if (!vqs) { - err = -ENOMEM;...
2016 Dec 06
0
[PATCH 01/10] virtio_console: drop unused config fields
...supported id: %u\n", - cpkt->id, portdev->config.max_nr_ports - 1); + cpkt->id, portdev->max_nr_ports - 1); break; } add_port(portdev, virtio32_to_cpu(vdev, cpkt->id)); @@ -1894,7 +1894,7 @@ static int init_vqs(struct ports_device *portdev) u32 i, j, nr_ports, nr_queues; int err; - nr_ports = portdev->config.max_nr_ports; + nr_ports = portdev->max_nr_ports; nr_queues = use_multiport(portdev) ? (nr_ports + 1) * 2 : 2; vqs = kmalloc(nr_queues * sizeof(struct virtqueue *), GFP_KERNEL); @@ -2047,13 +2047,13 @@ static int virtcons_probe(struct virtio_d...
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty, These updated patches in the series return -EFAULT on copy_xx_user errors and also move the copy_from_user into fops_write() instead of it being in send_buf. This enables send_buf to just read from kernel buffers, making it simpler. This also allows write()s to write more to the host in one go, removingthe 4k limitation. I do limit the writes to 32k at once to not put too much
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
Hey Rusty, These updated patches in the series return -EFAULT on copy_xx_user errors and also move the copy_from_user into fops_write() instead of it being in send_buf. This enables send_buf to just read from kernel buffers, making it simpler. This also allows write()s to write more to the host in one go, removingthe 4k limitation. I do limit the writes to 32k at once to not put too much
2017 Mar 29
5
[PATCH 1/6] virtio: wrap find_vqs
...rs/char/virtio_console.c index e9b7e0b..5da4c8e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1945,9 +1945,9 @@ static int init_vqs(struct ports_device *portdev) } } /* Find the queues. */ - err = portdev->vdev->config->find_vqs(portdev->vdev, nr_queues, vqs, - io_callbacks, - (const char **)io_names, NULL); + err = virtio_find_vqs(portdev->vdev, nr_queues, vqs, + io_callbacks, + (const char **)io_names, NULL); if (err) goto free; diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypt...
2017 Mar 29
5
[PATCH 1/6] virtio: wrap find_vqs
...rs/char/virtio_console.c index e9b7e0b..5da4c8e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1945,9 +1945,9 @@ static int init_vqs(struct ports_device *portdev) } } /* Find the queues. */ - err = portdev->vdev->config->find_vqs(portdev->vdev, nr_queues, vqs, - io_callbacks, - (const char **)io_names, NULL); + err = virtio_find_vqs(portdev->vdev, nr_queues, vqs, + io_callbacks, + (const char **)io_names, NULL); if (err) goto free; diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypt...
2016 Dec 06
26
[PATCH 00/10] virtio: sparse fixes
I run latest sparse from git on virtio drivers (turns out the version I had was rather outdated). This patchset fixes a couple of bugs this uncovered, and adds some annotations to make it sparse-clean. In particular, endian-ness is often tricky, so this patchset enabled endian-ness checks for sparse builds. Michael S. Tsirkin (10): virtio_console: drop unused config fields drm/virtio: fix
2016 Dec 06
26
[PATCH 00/10] virtio: sparse fixes
I run latest sparse from git on virtio drivers (turns out the version I had was rather outdated). This patchset fixes a couple of bugs this uncovered, and adds some annotations to make it sparse-clean. In particular, endian-ness is often tricky, so this patchset enabled endian-ness checks for sparse builds. Michael S. Tsirkin (10): virtio_console: drop unused config fields drm/virtio: fix
2018 Jan 26
0
[PATCH v3 1/2] drm/virtio: Add window server support
...quot;, "cursor" }; + static const char * const names[] = { "control", "cursor", + "winsrv-rx", "winsrv-tx" }; struct virtio_gpu_device *vgdev; /* this will expand later */ - struct virtqueue *vqs[2]; + struct virtqueue *vqs[4]; + int nr_queues = 2; u32 num_scanouts, num_capsets; int ret; @@ -158,6 +161,10 @@ int virtio_gpu_driver_load(struct drm_device *dev, unsigned long flags) init_waitqueue_head(&vgdev->resp_wq); virtio_gpu_init_vq(&vgdev->ctrlq, virtio_gpu_dequeue_ctrl_func); virtio_gpu_init_vq(&vgdev-&...
2018 Jan 26
3
[PATCH v3 0/2] drm/virtio: Add window server support
Hi, this work is based on the virtio_wl driver in the ChromeOS kernel by Zach Reizner, currently at: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.4/drivers/virtio/virtio_wl.c There's one feature missing currently, which is letting clients write directly to the host part of a resource, so the extra copy in TRANSFER_TO_HOST isn't needed. Have pushed the
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...backing_dev_info.laptop_mode_wb_timer); blk_sync_queue(q); /* @q is and will stay empty, shutdown and put */ blk_put_queue(q); } EXPORT_SYMBOL(blk_cleanup_queue); -static int blk_init_free_list(struct request_queue *q) +static int blk_init_queue_ctx(struct request_queue *q, unsigned int nr_queues) { - struct request_list *rl = &q->rq; + struct blk_queue_ctx *ctx; + unsigned int i; - if (unlikely(rl->rq_pool)) - return 0; + q->nr_queues = nr_queues; + queue_for_each_ctx(q, ctx, i) { + struct request_list *rl = &ctx->rl; - rl->count[BLK_RW_SYNC] = rl->count[B...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...backing_dev_info.laptop_mode_wb_timer); blk_sync_queue(q); /* @q is and will stay empty, shutdown and put */ blk_put_queue(q); } EXPORT_SYMBOL(blk_cleanup_queue); -static int blk_init_free_list(struct request_queue *q) +static int blk_init_queue_ctx(struct request_queue *q, unsigned int nr_queues) { - struct request_list *rl = &q->rq; + struct blk_queue_ctx *ctx; + unsigned int i; - if (unlikely(rl->rq_pool)) - return 0; + q->nr_queues = nr_queues; + queue_for_each_ctx(q, ctx, i) { + struct request_list *rl = &ctx->rl; - rl->count[BLK_RW_SYNC] = rl->count[B...
2017 Jan 27
0
[PATCH 5/9] virtio: allow drivers to request IRQ affinity when creating VQs
...c b/drivers/char/virtio_console.c index 17857be..6266c05 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1939,7 +1939,7 @@ static int init_vqs(struct ports_device *portdev) /* Find the queues. */ err = portdev->vdev->config->find_vqs(portdev->vdev, nr_queues, vqs, io_callbacks, - (const char **)io_names); + (const char **)io_names, NULL); if (err) goto free; diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c index fe70ec8..0aa2f04 100644 --- a/drivers/crypto/virti...
2014 Dec 26
8
[RFC PATCH 0/3] Sharing MSIX irq for tx/rx queue pairs
Hi all: This series try to share MSIX irq for each tx/rx queue pair. This is done through: - introducing virtio pci channel which are group of virtqueues that sharing a single MSIX irq (Patch 1) - expose channel setting to virtio core api (Patch 2) - try to use channel setting in virtio-net (Patch 3) For the transport that does not support channel, channel paramters were simply ignored. For
2014 Dec 26
8
[RFC PATCH 0/3] Sharing MSIX irq for tx/rx queue pairs
Hi all: This series try to share MSIX irq for each tx/rx queue pair. This is done through: - introducing virtio pci channel which are group of virtqueues that sharing a single MSIX irq (Patch 1) - expose channel setting to virtio core api (Patch 2) - try to use channel setting in virtio-net (Patch 3) For the transport that does not support channel, channel paramters were simply ignored. For
2020 Jun 16
0
[PATCH v5 2/2] mm, treewide: Rename kzfree() to kfree_sensitive()
...avium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c index 0f72e9abdefe..a15245992cf9 100644 --- a/drivers/crypto/cavium/cpt/cptvf_main.c +++ b/drivers/crypto/cavium/cpt/cptvf_main.c @@ -74,7 +74,7 @@ static void cleanup_worker_threads(struct cpt_vf *cptvf) for (i = 0; i < cptvf->nr_queues; i++) tasklet_kill(&cwqe_info->vq_wqe[i].twork); - kzfree(cwqe_info); + kfree_sensitive(cwqe_info); cptvf->wqe_info = NULL; } @@ -88,7 +88,7 @@ static void free_pending_queues(struct pending_qinfo *pqinfo) continue; /* free single queue */ - kzfree((queue->head));...
2020 Apr 13
0
[PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()
...avium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c index 0f72e9abdefe..a15245992cf9 100644 --- a/drivers/crypto/cavium/cpt/cptvf_main.c +++ b/drivers/crypto/cavium/cpt/cptvf_main.c @@ -74,7 +74,7 @@ static void cleanup_worker_threads(struct cpt_vf *cptvf) for (i = 0; i < cptvf->nr_queues; i++) tasklet_kill(&cwqe_info->vq_wqe[i].twork); - kzfree(cwqe_info); + kfree_sensitive(cwqe_info); cptvf->wqe_info = NULL; } @@ -88,7 +88,7 @@ static void free_pending_queues(struct pending_qinfo *pqinfo) continue; /* free single queue */ - kzfree((queue->head));...