mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio updates from Michael Tsirkin:
"Several new features here:
- Virtio find vqs API has been reworked (required to fix the
scalability issue we have with adminq, which I hope to merge later
in the cycle)
- vDPA driver for Marvell OCTEON
- virtio fs performance improvement
- mlx5 migration speedups
Fixes, cleanups all over the place"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (56 commits)
virtio: rename virtio_find_vqs_info() to virtio_find_vqs()
virtio: remove unused virtio_find_vqs() and virtio_find_vqs_ctx() helpers
virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info()
virtio_balloon: convert to use virtio_find_vqs_info()
virtiofs: convert to use virtio_find_vqs_info()
scsi: virtio_scsi: convert to use virtio_find_vqs_info()
virtio_net: convert to use virtio_find_vqs_info()
virtio_crypto: convert to use virtio_find_vqs_info()
virtio_console: convert to use virtio_find_vqs_info()
virtio_blk: convert to use virtio_find_vqs_info()
virtio: rename find_vqs_info() op to find_vqs()
virtio: remove the original find_vqs() op
virtio: call virtio_find_vqs_info() from virtio_find_single_vq() directly
virtio: convert find_vqs() op implementations to find_vqs_info()
virtio_pci: convert vp_*find_vqs() ops to find_vqs_info()
virtio: introduce virtio_queue_info struct and find_vqs_info() config op
virtio: make virtio_find_single_vq() call virtio_find_vqs()
virtio: make virtio_find_vqs() call virtio_find_vqs_ctx()
caif_virtio: use virtio_find_single_vq() for single virtqueue finding
vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready()
...
This commit is contained in:
@@ -964,8 +964,7 @@ static int init_vq(struct virtio_blk *vblk)
|
||||
{
|
||||
int err;
|
||||
unsigned short i;
|
||||
vq_callback_t **callbacks;
|
||||
const char **names;
|
||||
struct virtqueue_info *vqs_info;
|
||||
struct virtqueue **vqs;
|
||||
unsigned short num_vqs;
|
||||
unsigned short num_poll_vqs;
|
||||
@@ -1002,28 +1001,26 @@ static int init_vq(struct virtio_blk *vblk)
|
||||
if (!vblk->vqs)
|
||||
return -ENOMEM;
|
||||
|
||||
names = kmalloc_array(num_vqs, sizeof(*names), GFP_KERNEL);
|
||||
callbacks = kmalloc_array(num_vqs, sizeof(*callbacks), GFP_KERNEL);
|
||||
vqs_info = kcalloc(num_vqs, sizeof(*vqs_info), GFP_KERNEL);
|
||||
vqs = kmalloc_array(num_vqs, sizeof(*vqs), GFP_KERNEL);
|
||||
if (!names || !callbacks || !vqs) {
|
||||
if (!vqs_info || !vqs) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_vqs - num_poll_vqs; i++) {
|
||||
callbacks[i] = virtblk_done;
|
||||
vqs_info[i].callback = virtblk_done;
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%u", i);
|
||||
names[i] = vblk->vqs[i].name;
|
||||
vqs_info[i].name = vblk->vqs[i].name;
|
||||
}
|
||||
|
||||
for (; i < num_vqs; i++) {
|
||||
callbacks[i] = NULL;
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%u", i);
|
||||
names[i] = vblk->vqs[i].name;
|
||||
vqs_info[i].name = vblk->vqs[i].name;
|
||||
}
|
||||
|
||||
/* Discover virtqueues and write information to configuration. */
|
||||
err = virtio_find_vqs(vdev, num_vqs, vqs, callbacks, names, &desc);
|
||||
err = virtio_find_vqs(vdev, num_vqs, vqs, vqs_info, &desc);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
@@ -1035,8 +1032,7 @@ static int init_vq(struct virtio_blk *vblk)
|
||||
|
||||
out:
|
||||
kfree(vqs);
|
||||
kfree(callbacks);
|
||||
kfree(names);
|
||||
kfree(vqs_info);
|
||||
if (err)
|
||||
kfree(vblk->vqs);
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user