diff options
author | Mike Christie <michael.christie@oracle.com> | 2023-06-27 02:22:52 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-07-03 19:15:13 +0300 |
commit | c011bb669ddc22b0374d747d90467d1b2f80bc05 (patch) | |
tree | efedbb9d1e47224be74ea877bfefda94aef1d4e8 /drivers/vhost/vhost.h | |
parent | 3e11c6eb6ab07de36cde49594e16fed044bf276e (diff) | |
download | linux-c011bb669ddc22b0374d747d90467d1b2f80bc05.tar.xz |
vhost: dynamically allocate vhost_worker
This patchset allows us to allocate multiple workers, so this has us
move from the vhost_worker that's embedded in the vhost_dev to
dynamically allocating it.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <20230626232307.97930-3-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index fc900be504b3..cb872cc4157a 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -44,7 +44,7 @@ struct vhost_poll { }; void vhost_work_init(struct vhost_work *work, vhost_work_fn_t fn); -void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work); +bool vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work); bool vhost_has_work(struct vhost_dev *dev); void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn, @@ -158,7 +158,7 @@ struct vhost_dev { struct vhost_virtqueue **vqs; int nvqs; struct eventfd_ctx *log_ctx; - struct vhost_worker worker; + struct vhost_worker *worker; struct vhost_iotlb *umem; struct vhost_iotlb *iotlb; spinlock_t iotlb_lock; |