Displaying 20 results from an estimated 73 matches for "nextflag".
2003 Sep 29
1
Handling of X-Status flags
...flags |= MAIL_SEEN;
break;
- case 'T': /* trashed */
+ case 'D': /* trashed */
flags |= MAIL_DELETED;
break;
- case 'D': /* draft */
+ case 'T': /* draft */
flags |= MAIL_DRAFT;
break;
case 'F': /* flagged */
@@ -168,9 +168,9 @@
nextflag = *oldflags == '\0' || *oldflags == ',' ? 256 :
(unsigned char) *oldflags;
- if ((flags & MAIL_DRAFT) && nextflag > 'D') {
+ if ((flags & MAIL_DELETED) && nextflag > 'D') {
str_append_c(flags_str, 'D');
- flags &...
2016 Nov 22
6
[PATCH 0/2] virtio: fix complaint by sparse
I found some warnings reported by sparse in the virtio code
when I checked virtio-crypto's driver stuff. Let's fix them.
Gonglei (2):
virtio_pci_modern: fix complaint by sparse
virtio_ring: fix complaint by sparse
drivers/virtio/virtio_pci_modern.c | 8 ++++----
drivers/virtio/virtio_ring.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
--
1.8.3.1
2016 Nov 22
6
[PATCH 0/2] virtio: fix complaint by sparse
I found some warnings reported by sparse in the virtio code
when I checked virtio-crypto's driver stuff. Let's fix them.
Gonglei (2):
virtio_pci_modern: fix complaint by sparse
virtio_ring: fix complaint by sparse
drivers/virtio/virtio_pci_modern.c | 8 ++++----
drivers/virtio/virtio_ring.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
--
1.8.3.1
2016 Nov 22
2
[PATCH 2/2] virtio_ring: fix complaint by sparse
...ned] [assigned] i
> drivers/virtio/virtio_ring.c:423:19: got restricted __virtio16 [usertype] next
> drivers/virtio/virtio_ring.c:604:39: warning: incorrect type in initializer (different base types)
> drivers/virtio/virtio_ring.c:604:39: expected unsigned short [unsigned] [usertype] nextflag
> drivers/virtio/virtio_ring.c:604:39: got restricted __virtio16
> drivers/virtio/virtio_ring.c:612:33: warning: restricted __virtio16 degrades to integer
>
> Signed-off-by: Gonglei <arei.gonglei at huawei.com>
> ---
> drivers/virtio/virtio_ring.c | 4 ++--
> 1 file...
2016 Nov 22
2
[PATCH 2/2] virtio_ring: fix complaint by sparse
...ned] [assigned] i
> drivers/virtio/virtio_ring.c:423:19: got restricted __virtio16 [usertype] next
> drivers/virtio/virtio_ring.c:604:39: warning: incorrect type in initializer (different base types)
> drivers/virtio/virtio_ring.c:604:39: expected unsigned short [unsigned] [usertype] nextflag
> drivers/virtio/virtio_ring.c:604:39: got restricted __virtio16
> drivers/virtio/virtio_ring.c:612:33: warning: restricted __virtio16 degrades to integer
>
> Signed-off-by: Gonglei <arei.gonglei at huawei.com>
> ---
> drivers/virtio/virtio_ring.c | 4 ++--
> 1 file...
2016 Nov 22
0
[PATCH 2/2] virtio_ring: fix complaint by sparse
...gned int [unsigned] [assigned] i
drivers/virtio/virtio_ring.c:423:19: got restricted __virtio16 [usertype] next
drivers/virtio/virtio_ring.c:604:39: warning: incorrect type in initializer (different base types)
drivers/virtio/virtio_ring.c:604:39: expected unsigned short [unsigned] [usertype] nextflag
drivers/virtio/virtio_ring.c:604:39: got restricted __virtio16
drivers/virtio/virtio_ring.c:612:33: warning: restricted __virtio16 degrades to integer
Signed-off-by: Gonglei <arei.gonglei at huawei.com>
---
drivers/virtio/virtio_ring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletio...
2023 Jun 22
1
[PATCH vhost v10 05/10] virtio_ring: split-detach: support return dma info to driver
...ric split vq code? Why is it unconditionally
wasting time with cursors etc? Poking at split.desc_extra when not
necessary is also not really nice, will cause lots of cache misses.
And it looks like we duplicated a bunch of logic?
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
> + int rc = -EAGAIN;
> +
> + if (unlikely(cursor->done))
> + return -EINVAL;
> +
> + if (!cursor->indirect) {
> + struct vring_desc_extra *extra;
> + unsigned int i;
> +
> + i = cursor->pos;
> +
>...
2015 Oct 30
1
[PATCH v4 2/6] virtio_ring: Support DMA APIs
...++++
>> 3 files changed, 172 insertions(+), 37 deletions(-)
>> create mode 100644 tools/virtio/linux/dma-mapping.h
>
>> static void detach_buf(struct vring_virtqueue *vq, unsigned int head)
>> {
>> - unsigned int i;
>> + unsigned int i, j;
>> + u16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
>>
>> /* Clear data ptr. */
>> - vq->data[head] = NULL;
>> + vq->desc_state[head].data = NULL;
>>
>> - /* Put back on free list: find end */
>> + /* Put back on free list: unmap first-level descr...
2015 Oct 30
1
[PATCH v4 2/6] virtio_ring: Support DMA APIs
...++++
>> 3 files changed, 172 insertions(+), 37 deletions(-)
>> create mode 100644 tools/virtio/linux/dma-mapping.h
>
>> static void detach_buf(struct vring_virtqueue *vq, unsigned int head)
>> {
>> - unsigned int i;
>> + unsigned int i, j;
>> + u16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
>>
>> /* Clear data ptr. */
>> - vq->data[head] = NULL;
>> + vq->desc_state[head].data = NULL;
>>
>> - /* Put back on free list: find end */
>> + /* Put back on free list: unmap first-level descr...
2023 Mar 22
1
[PATCH vhost v4 04/11] virtio_ring: split: support premapped
...unmap_sgs(vq, sgs, total_sg, out_sgs, in_sgs);
+ if (dma_map_internal)
+ virtqueue_unmap_sgs(vq, sgs, total_sg, out_sgs, in_sgs);
if (indirect)
kfree(desc);
@@ -804,20 +811,22 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
{
unsigned int i, j;
__virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
+ bool dma_map_internal;
/* Clear data ptr. */
vq->split.desc_state[head].data = NULL;
+ dma_map_internal = vq->split.desc_state[head].dma_map_internal;
/* Put back on free list: unmap first-level descriptors and find end */
i...
2023 Mar 21
1
[PATCH vhost v3 04/11] virtio_ring: split: support premapped
...in_sgs);
> + if (map_inter)
> + virtqueue_unmap_sgs(vq, sgs, total_sg, out_sgs, in_sgs);
>
> if (indirect)
> kfree(desc);
> @@ -804,20 +811,22 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
> {
> unsigned int i, j;
> __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
> + bool map_inter;
>
> /* Clear data ptr. */
> vq->split.desc_state[head].data = NULL;
> + map_inter = vq->split.desc_state[head].map_inter;
>
> /* Put back on free list: unmap first-level descriptors and fi...
2023 Mar 07
2
[PATCH vhost v1 03/12] virtio_ring: split: introduce virtqueue_add_split_premapped()
...if (dma_map)
> + virtqueue_unmap_sgs(vq, sgs, total_sg, out_sgs, in_sgs);
>
> kfree(desc);
>
> @@ -828,20 +837,23 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
> {
> unsigned int i, j;
> __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
> + bool dma_map;
>
> /* Clear data ptr. */
> vq->split.desc_state[head].data = NULL;
>
> + dma_map = vq->split.desc_state[head].dma_map;
> +
> /* Put back on free list: unmap fir...
2015 Oct 30
0
[PATCH v4 2/6] virtio_ring: Support DMA APIs
.../virtio/linux/dma-mapping.h | 17 ++++
> 3 files changed, 172 insertions(+), 37 deletions(-)
> create mode 100644 tools/virtio/linux/dma-mapping.h
> static void detach_buf(struct vring_virtqueue *vq, unsigned int head)
> {
> - unsigned int i;
> + unsigned int i, j;
> + u16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
>
> /* Clear data ptr. */
> - vq->data[head] = NULL;
> + vq->desc_state[head].data = NULL;
>
> - /* Put back on free list: find end */
> + /* Put back on free list: unmap first-level descriptors and find end */
>...
2023 Mar 07
1
[PATCH vhost v1 03/12] virtio_ring: split: introduce virtqueue_add_split_premapped()
...virtqueue_unmap_sgs(vq, sgs, total_sg, out_sgs, in_sgs);
> >
> > kfree(desc);
> >
> > @@ -828,20 +837,23 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
> > {
> > unsigned int i, j;
> > __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
> > + bool dma_map;
> >
> > /* Clear data ptr. */
> > vq->split.desc_state[head].data = NULL;
> >
> > + dma_map = vq->split.desc_state[head].dma_map;
> > +
> >...
2023 Feb 20
1
[PATCH vhost 04/10] virtio_ring: split: introduce virtqueue_add_split_premapped()
...ck_prepare_split(struct virtqueue *_vq)
> > {
> > struct vring_virtqueue *vq = to_vvq(_vq);
> > @@ -824,20 +869,23 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
> > {
> > unsigned int i, j;
> > __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
> > + bool premapped;
> >
> > /* Clear data ptr. */
> > vq->split.desc_state[head].data = NULL;
> >
> > + premapped = vq->split.desc_state[head].premapped;
> > +
> &g...
2015 Oct 30
1
[PATCH v4 2/6] virtio_ring: Support DMA APIs
...;vring.desc[i].next;
+ }
+
+ vq->vq.num_free += total_sg;
+
+ if (indirect)
+ kfree(desc);
+
+ return -EIO;
}
/**
@@ -423,27 +526,43 @@ EXPORT_SYMBOL_GPL(virtqueue_kick);
static void detach_buf(struct vring_virtqueue *vq, unsigned int head)
{
- unsigned int i;
+ unsigned int i, j;
+ u16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
/* Clear data ptr. */
- vq->data[head] = NULL;
+ vq->desc_state[head].data = NULL;
- /* Put back on free list: find end */
+ /* Put back on free list: unmap first-level descriptors and find end */
i = head;
- /* Free the indirect...
2018 Dec 07
0
[RFC 3/3] virtio_ring: use new vring flags
...VRING_USED_F_NO_NOTIFY));
+ cpu_to_virtio16(_vq->vdev,
+ BIT(VRING_SPLIT_USED_F_NO_NOTIFY)));
}
END_USE(vq);
return needs_kick;
@@ -614,7 +618,8 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
void **ctx)
{
unsigned int i, j;
- __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
+ __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev,
+ BIT(VRING_SPLIT_DESC_F_NEXT));
/* Clear data ptr. */
vq->split.desc_state[head].data = NULL;
@@ -649,7 +654,8 @@ static void detach_buf_split(struct vring_virtqueue *vq, unsig...
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
...+ } else {
+ needs_kick = !(vq->vring.used->flags & cpu_to_virtio16(_vq->vdev, VRING_USED_F_NO_NOTIFY));
+ }
+ END_USE(vq);
+ return needs_kick;
+}
+
+static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
+ void **ctx)
+{
+ unsigned int i, j;
+ __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
+
+ /* Clear data ptr. */
+ vq->desc_state[head].data = NULL;
+
+ /* Put back on free list: unmap first-level descriptors and find end */
+ i = head;
+
+ while (vq->vring.desc[i].flags & nextflag) {
+ vring_unmap_one_split(vq, &vq...
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...+ } else {
+ needs_kick = !(vq->vring.used->flags & cpu_to_virtio16(_vq->vdev, VRING_USED_F_NO_NOTIFY));
+ }
+ END_USE(vq);
+ return needs_kick;
+}
+
+static void detach_buf_split(struct vring_virtqueue *vq, unsigned int head,
+ void **ctx)
+{
+ unsigned int i, j;
+ __virtio16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
+
+ /* Clear data ptr. */
+ vq->desc_state[head].data = NULL;
+
+ /* Put back on free list: unmap first-level descriptors and find end */
+ i = head;
+
+ while (vq->vring.desc[i].flags & nextflag) {
+ vring_unmap_one_split(vq, &vq...
2016 Feb 03
0
[PATCH v7 5/9] virtio_ring: Support DMA APIs
...;vring.desc[i].next;
+ }
+
+ vq->vq.num_free += total_sg;
+
+ if (indirect)
+ kfree(desc);
+
+ return -EIO;
}
/**
@@ -454,27 +569,43 @@ EXPORT_SYMBOL_GPL(virtqueue_kick);
static void detach_buf(struct vring_virtqueue *vq, unsigned int head)
{
- unsigned int i;
+ unsigned int i, j;
+ u16 nextflag = cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT);
/* Clear data ptr. */
- vq->data[head] = NULL;
+ vq->desc_state[head].data = NULL;
- /* Put back on free list: find end */
+ /* Put back on free list: unmap first-level descriptors and find end */
i = head;
- /* Free the indirect...