Displaying 20 results from an estimated 64 matches for "resp_size".
2012 Dec 18
13
[PATCH v2 0/5] Multiqueue virtio-scsi, and API for piecewise buffer submission
Hi all,
this series adds multiqueue support to the virtio-scsi driver, based
on Jason Wang's work on virtio-net. It uses a simple queue steering
algorithm that expects one queue per CPU. LUNs in the same target always
use the same queue (so that commands are not reordered); queue switching
occurs when the request being queued is the only one for the target.
Also based on Jason's
2012 Dec 18
13
[PATCH v2 0/5] Multiqueue virtio-scsi, and API for piecewise buffer submission
Hi all,
this series adds multiqueue support to the virtio-scsi driver, based
on Jason Wang's work on virtio-net. It uses a simple queue steering
algorithm that expects one queue per CPU. LUNs in the same target always
use the same queue (so that commands are not reordered); queue switching
occurs when the request being queued is the only one for the target.
Also based on Jason's
2013 Feb 19
24
[PATCH 00/16] virtio ring rework.
OK, this is (ab)uses some of Paolo's patches. The first 7 are
candidates for this merge window (maybe), the rest I'm not so sure
about.
Thanks,
Rusty.
Paolo Bonzini (3):
scatterlist: introduce sg_unmark_end
virtio-blk: reorganize virtblk_add_req
virtio-blk: use virtqueue_add_sgs on req path
Rusty Russell (13):
virtio_ring: virtqueue_add_sgs, to add multiple sgs.
virtio-blk:
2013 Feb 19
24
[PATCH 00/16] virtio ring rework.
OK, this is (ab)uses some of Paolo's patches. The first 7 are
candidates for this merge window (maybe), the rest I'm not so sure
about.
Thanks,
Rusty.
Paolo Bonzini (3):
scatterlist: introduce sg_unmark_end
virtio-blk: reorganize virtblk_add_req
virtio-blk: use virtqueue_add_sgs on req path
Rusty Russell (13):
virtio_ring: virtqueue_add_sgs, to add multiple sgs.
virtio-blk:
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
...amp;vgdev->free_vbufs_lock);
+ vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
+ if (IS_ERR(vbuf))
+ return ERR_CAST(vbuf);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
@@ -208,9 +173,7 @@ static void free_vbuf(struct virtio_gpu_device *vgdev,
if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
kfree(vbuf->resp_buf);
kfree(vbuf->data_buf);
- spin_lock(&vgdev->free_vbufs_lock);
- list_add(&vbuf->list, &vgdev->free_vbufs);
- spin_unlock(&vgdev->free_vbufs_lock);
+ kmem_cache_free(vgdev->vbufs, vbuf);
}
static void recl...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
...amp;vgdev->free_vbufs_lock);
+ vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
+ if (IS_ERR(vbuf))
+ return ERR_CAST(vbuf);
memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
@@ -208,9 +173,7 @@ static void free_vbuf(struct virtio_gpu_device *vgdev,
if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
kfree(vbuf->resp_buf);
kfree(vbuf->data_buf);
- spin_lock(&vgdev->free_vbufs_lock);
- list_add(&vbuf->list, &vgdev->free_vbufs);
- spin_unlock(&vgdev->free_vbufs_lock);
+ kmem_cache_free(vgdev->vbufs, vbuf);
}
static void recl...
2020 May 28
0
Potential Memory Leak Bugs in drivers/gpu/drm/virtio/virtgpu_vq.c (Linux 5.6).
...o/virtgpu_vq.c (Linux 5.6).
> I hope you can help me to confirm them. Thank you.
Sorry. Not confirmed. You should do a better job verifying your
claims before bugging people.
> The first one is resp_buf will not be release in
> virtio_gpu_cmd_get_display_info() with the condition
> (resp_size <= MAX_INLINE_RESP_SIZE) in virtio_gpu_alloc_cmd_resp().
In that code path resp_size equals sizeof(struct
virtio_gpu_resp_display_info) which is larger than MAX_INLINE_RESP_SIZE
so the condition is never true and no leak happens.
take care,
Gerd
2019 Jun 28
1
[PATCH v4 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
Hi,
> > --- a/drivers/gpu/drm/virtio/virtgpu_drv.h
> > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
> > @@ -120,9 +120,9 @@ struct virtio_gpu_vbuffer {
> >
> > char *resp_buf;
> > int resp_size;
> > -
> > virtio_gpu_resp_cb resp_cb;
> >
> > + struct virtio_gpu_object_array *objs;
> This can use a comment (e.g., objects referenced by the vbuffer)
IMHO this is obvious ...
> > void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev,
> &...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...atic void virtscsi_map_sgl(struct scatterlist *sg, unsigned int *p_idx,
*/
static void virtscsi_map_cmd(struct virtio_scsi_target_state *tgt,
struct virtio_scsi_cmd *cmd,
- unsigned *out_num, unsigned *in_num,
+ unsigned *out, unsigned *in,
size_t req_size, size_t resp_size)
{
struct scsi_cmnd *sc = cmd->sc;
@@ -392,7 +392,7 @@ static void virtscsi_map_cmd(struct virtio_scsi_target_state *tgt,
if (sc && sc->sc_data_direction != DMA_FROM_DEVICE)
virtscsi_map_sgl(sg, &idx, scsi_out(sc));
- *out_num = idx;
+ *out = idx;
/* Response header....
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...atic void virtscsi_map_sgl(struct scatterlist *sg, unsigned int *p_idx,
*/
static void virtscsi_map_cmd(struct virtio_scsi_target_state *tgt,
struct virtio_scsi_cmd *cmd,
- unsigned *out_num, unsigned *in_num,
+ unsigned *out, unsigned *in,
size_t req_size, size_t resp_size)
{
struct scsi_cmnd *sc = cmd->sc;
@@ -392,7 +392,7 @@ static void virtscsi_map_cmd(struct virtio_scsi_target_state *tgt,
if (sc && sc->sc_data_direction != DMA_FROM_DEVICE)
virtscsi_map_sgl(sg, &idx, scsi_out(sc));
- *out_num = idx;
+ *out = idx;
/* Response header....
2013 Feb 07
11
[RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes
The virtqueue_add_buf function has two limitations:
1) it requires the caller to provide all the buffers in a single call;
2) it does not support chained scatterlists: the buffers must be
provided as an array of struct scatterlist.
Because of these limitations, virtio-scsi has to copy each request into
a scatterlist internal to the driver. It cannot just use the one that
was prepared by the
2013 Feb 07
11
[RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes
The virtqueue_add_buf function has two limitations:
1) it requires the caller to provide all the buffers in a single call;
2) it does not support chained scatterlists: the buffers must be
provided as an array of struct scatterlist.
Because of these limitations, virtio-scsi has to copy each request into
a scatterlist internal to the driver. It cannot just use the one that
was prepared by the
2019 Jun 20
2
[PATCH v4 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...etions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 98d646789d23..65f5ce41c341 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -120,9 +120,9 @@ struct virtio_gpu_vbuffer {
char *resp_buf;
int resp_size;
-
virtio_gpu_resp_cb resp_cb;
+ struct virtio_gpu_object_array *objs;
struct list_head list;
};
@@ -311,7 +311,8 @@ void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev,
uint32_t resource_id);
void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev,...
2019 Jun 20
2
[PATCH v4 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...etions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 98d646789d23..65f5ce41c341 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -120,9 +120,9 @@ struct virtio_gpu_vbuffer {
char *resp_buf;
int resp_size;
-
virtio_gpu_resp_cb resp_cb;
+ struct virtio_gpu_object_array *objs;
struct list_head list;
};
@@ -311,7 +311,8 @@ void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev,
uint32_t resource_id);
void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev,...
2014 Dec 11
3
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...instead of "VIRTIO_F_ANY_LAYOUT" in the original code instead?
So in case this patch queue takes a little bit longer 'til it gets
upstream, do we might want to submit a separate patch for fixing this
issue first?
> req_size = req->elem.out_sg[0].iov_len;
> resp_size = req->elem.in_sg[0].iov_len;
> }
> @@ -748,7 +748,7 @@ static void virtio_scsi_change(SCSIBus *bus, SCSIDevice *dev, SCSISense sense)
> VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
> VirtIODevice *vdev = VIRTIO_DEVICE(s);
>
> - if (((vdev->guest_fe...
2014 Dec 11
3
[PATCH RFC v6 04/20] virtio: add feature checking helpers
...instead of "VIRTIO_F_ANY_LAYOUT" in the original code instead?
So in case this patch queue takes a little bit longer 'til it gets
upstream, do we might want to submit a separate patch for fixing this
issue first?
> req_size = req->elem.out_sg[0].iov_len;
> resp_size = req->elem.in_sg[0].iov_len;
> }
> @@ -748,7 +748,7 @@ static void virtio_scsi_change(SCSIBus *bus, SCSIDevice *dev, SCSISense sense)
> VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
> VirtIODevice *vdev = VIRTIO_DEVICE(s);
>
> - if (((vdev->guest_fe...
2019 Jun 28
2
[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...etions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 98d646789d23..356d27132388 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -120,9 +120,9 @@ struct virtio_gpu_vbuffer {
char *resp_buf;
int resp_size;
-
virtio_gpu_resp_cb resp_cb;
+ struct virtio_gpu_object_array *objs;
struct list_head list;
};
@@ -311,7 +311,9 @@ void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev,
uint32_t resource_id);
void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev,...
2019 Jun 28
2
[PATCH v5 08/12] drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
...etions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 98d646789d23..356d27132388 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -120,9 +120,9 @@ struct virtio_gpu_vbuffer {
char *resp_buf;
int resp_size;
-
virtio_gpu_resp_cb resp_cb;
+ struct virtio_gpu_object_array *objs;
struct list_head list;
};
@@ -311,7 +311,9 @@ void virtio_gpu_cmd_context_detach_resource(struct virtio_gpu_device *vgdev,
uint32_t resource_id);
void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev,...
2013 Feb 12
12
[PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes
Most device drivers do not need to perform any postprocessing on the
scatterlists they receive from higher-level drivers (e.g. the block
or SCSI layer), because they translate the request metadata directly
from the various C structs into the data that is required by the device.
virtio devices however do this translation in two steps: a device-specific
step in the device driver, and generic
2013 Feb 12
12
[PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes
Most device drivers do not need to perform any postprocessing on the
scatterlists they receive from higher-level drivers (e.g. the block
or SCSI layer), because they translate the request metadata directly
from the various C structs into the data that is required by the device.
virtio devices however do this translation in two steps: a device-specific
step in the device driver, and generic