search for: vhost_vq_is_setup

Displaying 6 results from an estimated 6 matches for "vhost_vq_is_setup".

2020 Sep 22
0
[PATCH 2/8] vhost: add helper to check if a vq has been setup
.../drivers/vhost/vhost.c > index b45519c..5dd9eb1 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -305,6 +305,15 @@ static void vhost_vring_call_reset(struct vhost_vring_call *call_ctx) > spin_lock_init(&call_ctx->ctx_lock); > } > > +bool vhost_vq_is_setup(struct vhost_virtqueue *vq) > +{ > + if (vq->avail && vq->desc && vq->used && vhost_vq_access_ok(vq)) > + return true; > + else > + return false; > +} > +EXPORT_SYMBOL_GPL(vhost_vq_is_setup); This is probably ok but I wonder maybe we should...
2020 Sep 24
0
[PATCH 2/8] vhost: add helper to check if a vq has been setup
...b1 100644 >>> --- a/drivers/vhost/vhost.c >>> +++ b/drivers/vhost/vhost.c >>> @@ -305,6 +305,15 @@ static void vhost_vring_call_reset(struct vhost_vring_call *call_ctx) >>> ????? spin_lock_init(&call_ctx->ctx_lock); >>> ? } >>> ? +bool vhost_vq_is_setup(struct vhost_virtqueue *vq) >>> +{ >>> +??? if (vq->avail && vq->desc && vq->used && vhost_vq_access_ok(vq)) >>> +??????? return true; >>> +??? else >>> +??????? return false; >>> +} >>> +EXPORT_SYMBOL_G...
2023 Mar 28
1
[PATCH v6 02/11] vhost, vhost-net: add helper to check if vq has work
...t fn, __poll_t mask, struct vhost_dev *dev); @@ -195,6 +194,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *, struct vhost_log *log, unsigned int *log_num); void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); +bool vhost_vq_has_work(struct vhost_virtqueue *vq); bool vhost_vq_is_setup(struct vhost_virtqueue *vq); int vhost_vq_init_access(struct vhost_virtqueue *); int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len); -- 2.25.1
2020 Sep 22
0
[PATCH 2/8] vhost: add helper to check if a vq has been setup
On 2020-09-21 11:23, Mike Christie wrote: > +bool vhost_vq_is_setup(struct vhost_virtqueue *vq) > +{ > + if (vq->avail && vq->desc && vq->used && vhost_vq_access_ok(vq)) > + return true; > + else > + return false; > +} Has it been considered changing the body of this function into "return vq->avail &...
2020 Sep 24
0
[PATCH 3/8] vhost scsi: alloc cmds per vq instead of session
...static void vhost_scsi_flush(struct vhost_scsi *vs) > if (match) { > memcpy(vs->vs_vhost_wwpn, t->vhost_wwpn, > sizeof(vs->vs_vhost_wwpn)); > + > + for (i = VHOST_SCSI_VQ_IO; i < VHOST_SCSI_MAX_VQ; i++) { > + vq = &vs->vqs[i].vq; > + if (!vhost_vq_is_setup(vq)) > + continue; > + > + if (vhost_scsi_setup_vq_cmds(vq, vq->num)) > + goto destroy_vq_cmds; > + } > + > for (i = 0; i < VHOST_SCSI_MAX_VQ; i++) { > vq = &vs->vqs[i].vq; > mutex_lock(&vq->mutex); > @@ -1476,7 +1565,22 @@ stati...
2023 Mar 28
12
[PATCH v6 00/11] vhost: multiple worker support
The following patches were built over linux-next which contains various vhost patches in mst's tree and the vhost_task patchset in Christian Brauner's tree: git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git kernel.user_worker branch: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=kernel.user_worker The latter patchset handles the review comment