Displaying 20 results from an estimated 53 matches for "vring_unmap_one_packed".
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...;
>>> +
>>> + /* Clear data ptr. */
>>> + vq->desc_state[id].data = NULL;
>>> +
>>> + i = head;
>>> +
>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>> + desc = &vq->vring_packed.desc[i];
>>> + vring_unmap_one_packed(vq, desc);
>> As mentioned in previous discussion, this probably won't work for the case
>> of out of order completion since it depends on the information in the
>> descriptor ring. We probably need to extend ctx to record such information.
> Above code doesn't depend o...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...;
>>> +
>>> + /* Clear data ptr. */
>>> + vq->desc_state[id].data = NULL;
>>> +
>>> + i = head;
>>> +
>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>> + desc = &vq->vring_packed.desc[i];
>>> + vring_unmap_one_packed(vq, desc);
>> As mentioned in previous discussion, this probably won't work for the case
>> of out of order completion since it depends on the information in the
>> descriptor ring. We probably need to extend ctx to record such information.
> Above code doesn't depend o...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...t;>>>> + vq->desc_state[id].data = NULL;
>>>>> +
>>>>> + i = head;
>>>>> +
>>>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>>>> + desc = &vq->vring_packed.desc[i];
>>>>> + vring_unmap_one_packed(vq, desc);
>>>> As mentioned in previous discussion, this probably won't work for the case
>>>> of out of order completion since it depends on the information in the
>>>> descriptor ring. We probably need to extend ctx to record such information.
>>>...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...t;>>>> + vq->desc_state[id].data = NULL;
>>>>> +
>>>>> + i = head;
>>>>> +
>>>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>>>> + desc = &vq->vring_packed.desc[i];
>>>>> + vring_unmap_one_packed(vq, desc);
>>>> As mentioned in previous discussion, this probably won't work for the case
>>>> of out of order completion since it depends on the information in the
>>>> descriptor ring. We probably need to extend ctx to record such information.
>>>...
2018 May 17
2
[RFC v4 3/5] virtio_ring: add packed ring support
...= NULL;
>>>>>>> +
>>>>>>> + i = head;
>>>>>>> +
>>>>>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>>>>>> + desc = &vq->vring_packed.desc[i];
>>>>>>> + vring_unmap_one_packed(vq, desc);
>>>>>> As mentioned in previous discussion, this probably won't work for the case
>>>>>> of out of order completion since it depends on the information in the
>>>>>> descriptor ring. We probably need to extend ctx to record such i...
2018 May 17
2
[RFC v4 3/5] virtio_ring: add packed ring support
...= NULL;
>>>>>>> +
>>>>>>> + i = head;
>>>>>>> +
>>>>>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>>>>>> + desc = &vq->vring_packed.desc[i];
>>>>>>> + vring_unmap_one_packed(vq, desc);
>>>>>> As mentioned in previous discussion, this probably won't work for the case
>>>>>> of out of order completion since it depends on the information in the
>>>>>> descriptor ring. We probably need to extend ctx to record such i...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...sc = alloc_indirect_split(_vq, total_sg, gfp);
> else {
> desc = NULL;
> @@ -741,6 +753,63 @@ static inline unsigned vring_size_packed(unsigned int num, unsigned long align)
> & ~(align - 1)) + sizeof(struct vring_packed_desc_event) * 2;
> }
>
> +static void vring_unmap_one_packed(const struct vring_virtqueue *vq,
> + struct vring_packed_desc *desc)
> +{
> + u16 flags;
> +
> + if (!vring_use_dma_api(vq->vq.vdev))
> + return;
> +
> + flags = virtio16_to_cpu(vq->vq.vdev, desc->flags);
> +
> + if (flags & VRING_DESC_F_INDIRECT)...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...sc = alloc_indirect_split(_vq, total_sg, gfp);
> else {
> desc = NULL;
> @@ -741,6 +753,63 @@ static inline unsigned vring_size_packed(unsigned int num, unsigned long align)
> & ~(align - 1)) + sizeof(struct vring_packed_desc_event) * 2;
> }
>
> +static void vring_unmap_one_packed(const struct vring_virtqueue *vq,
> + struct vring_packed_desc *desc)
> +{
> + u16 flags;
> +
> + if (!vring_use_dma_api(vq->vq.vdev))
> + return;
> +
> + flags = virtio16_to_cpu(vq->vq.vdev, desc->flags);
> +
> + if (flags & VRING_DESC_F_INDIRECT)...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...> > > > + vq->desc_state[head].data = NULL;
> > > > +
> > > > + i = head;
> > > > +
> > > > + for (j = 0; j < vq->desc_state[head].num; j++) {
> > > > + desc = &vq->vring_packed.desc[i];
> > > > + vring_unmap_one_packed(vq, desc);
> > > > + desc->flags = 0x0;
> > > Looks like this is unnecessary.
> > It's safer to zero it. If we don't zero it, after we
> > call virtqueue_detach_unused_buf_packed() which calls
> > this function, the desc is still available to the
&...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...> > > > + vq->desc_state[head].data = NULL;
> > > > +
> > > > + i = head;
> > > > +
> > > > + for (j = 0; j < vq->desc_state[head].num; j++) {
> > > > + desc = &vq->vring_packed.desc[i];
> > > > + vring_unmap_one_packed(vq, desc);
> > > > + desc->flags = 0x0;
> > > Looks like this is unnecessary.
> > It's safer to zero it. If we don't zero it, after we
> > call virtqueue_detach_unused_buf_packed() which calls
> > this function, the desc is still available to the
&...
2018 May 18
2
[RFC v4 3/5] virtio_ring: add packed ring support
...gt;>>>>>>>> + i = head;
>>>>>>>>> +
>>>>>>>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>>>>>>>> + desc = &vq->vring_packed.desc[i];
>>>>>>>>> + vring_unmap_one_packed(vq, desc);
>>>>>>>> As mentioned in previous discussion, this probably won't work for the case
>>>>>>>> of out of order completion since it depends on the information in the
>>>>>>>> descriptor ring. We probably need to ext...
2018 May 18
2
[RFC v4 3/5] virtio_ring: add packed ring support
...gt;>>>>>>>> + i = head;
>>>>>>>>> +
>>>>>>>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>>>>>>>> + desc = &vq->vring_packed.desc[i];
>>>>>>>>> + vring_unmap_one_packed(vq, desc);
>>>>>>>> As mentioned in previous discussion, this probably won't work for the case
>>>>>>>> of out of order completion since it depends on the information in the
>>>>>>>> descriptor ring. We probably need to ext...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...> > > > > > +
> > > > > > + i = head;
> > > > > > +
> > > > > > + for (j = 0; j < vq->desc_state[head].num; j++) {
> > > > > > + desc = &vq->vring_packed.desc[i];
> > > > > > + vring_unmap_one_packed(vq, desc);
> > > > > > + desc->flags = 0x0;
> > > > > Looks like this is unnecessary.
> > > > It's safer to zero it. If we don't zero it, after we
> > > > call virtqueue_detach_unused_buf_packed() which calls
> > > > t...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...> > > > > > +
> > > > > > + i = head;
> > > > > > +
> > > > > > + for (j = 0; j < vq->desc_state[head].num; j++) {
> > > > > > + desc = &vq->vring_packed.desc[i];
> > > > > > + vring_unmap_one_packed(vq, desc);
> > > > > > + desc->flags = 0x0;
> > > > > Looks like this is unnecessary.
> > > > It's safer to zero it. If we don't zero it, after we
> > > > call virtqueue_detach_unused_buf_packed() which calls
> > > > t...
2018 May 16
0
[RFC v4 3/5] virtio_ring: add packed ring support
.... */
> > > > + vq->desc_state[id].data = NULL;
> > > > +
> > > > + i = head;
> > > > +
> > > > + for (j = 0; j < vq->desc_state[id].num; j++) {
> > > > + desc = &vq->vring_packed.desc[i];
> > > > + vring_unmap_one_packed(vq, desc);
> > > As mentioned in previous discussion, this probably won't work for the case
> > > of out of order completion since it depends on the information in the
> > > descriptor ring. We probably need to extend ctx to record such information.
> > Above co...
2018 May 16
0
[RFC v4 3/5] virtio_ring: add packed ring support
...;
> > > > > > +
> > > > > > + i = head;
> > > > > > +
> > > > > > + for (j = 0; j < vq->desc_state[id].num; j++) {
> > > > > > + desc = &vq->vring_packed.desc[i];
> > > > > > + vring_unmap_one_packed(vq, desc);
> > > > > As mentioned in previous discussion, this probably won't work for the case
> > > > > of out of order completion since it depends on the information in the
> > > > > descriptor ring. We probably need to extend ctx to record such i...
2018 Apr 25
0
[RFC v3 3/5] virtio_ring: add packed ring support
...queue_use_indirect(_vq, total_sg))
desc = alloc_indirect_split(_vq, total_sg, gfp);
else {
desc = NULL;
@@ -741,6 +750,49 @@ static inline unsigned vring_size_packed(unsigned int num, unsigned long align)
& ~(align - 1)) + sizeof(struct vring_packed_desc_event) * 2;
}
+static void vring_unmap_one_packed(const struct vring_virtqueue *vq,
+ struct vring_packed_desc *desc)
+{
+ u16 flags;
+
+ if (!vring_use_dma_api(vq->vq.vdev))
+ return;
+
+ flags = virtio16_to_cpu(vq->vq.vdev, desc->flags);
+
+ if (flags & VRING_DESC_F_INDIRECT) {
+ dma_unmap_single(vring_dma_dev(vq),
+ vir...
2018 May 16
0
[RFC v4 3/5] virtio_ring: add packed ring support
...queue_use_indirect(_vq, total_sg))
desc = alloc_indirect_split(_vq, total_sg, gfp);
else {
desc = NULL;
@@ -741,6 +753,63 @@ static inline unsigned vring_size_packed(unsigned int num, unsigned long align)
& ~(align - 1)) + sizeof(struct vring_packed_desc_event) * 2;
}
+static void vring_unmap_one_packed(const struct vring_virtqueue *vq,
+ struct vring_packed_desc *desc)
+{
+ u16 flags;
+
+ if (!vring_use_dma_api(vq->vq.vdev))
+ return;
+
+ flags = virtio16_to_cpu(vq->vq.vdev, desc->flags);
+
+ if (flags & VRING_DESC_F_INDIRECT) {
+ dma_unmap_single(vring_dma_dev(vq),
+ vir...
2018 May 18
0
[RFC v4 3/5] virtio_ring: add packed ring support
...gt; > > > > + i = head;
> > > > > > > > +
> > > > > > > > + for (j = 0; j < vq->desc_state[id].num; j++) {
> > > > > > > > + desc = &vq->vring_packed.desc[i];
> > > > > > > > + vring_unmap_one_packed(vq, desc);
> > > > > > > As mentioned in previous discussion, this probably won't work for the case
> > > > > > > of out of order completion since it depends on the information in the
> > > > > > > descriptor ring. We probably need...
2018 May 19
2
[RFC v4 3/5] virtio_ring: add packed ring support
...gt; + i = head;
>>>>>>>>>>> +
>>>>>>>>>>> + for (j = 0; j < vq->desc_state[id].num; j++) {
>>>>>>>>>>> + desc = &vq->vring_packed.desc[i];
>>>>>>>>>>> + vring_unmap_one_packed(vq, desc);
>>>>>>>>>> As mentioned in previous discussion, this probably won't work for the case
>>>>>>>>>> of out of order completion since it depends on the information in the
>>>>>>>>>> descriptor ring....