search for: vring_split_desc_f_next

Displaying 16 results from an estimated 16 matches for "vring_split_desc_f_next".

2018 Dec 07
2
[RFC 3/3] virtio_ring: use new vring flags
...,7 +505,8 @@ static inline int virtqueue_add_split(struct virtqueue *_vq, > } > } > /* Last one doesn't continue. */ > - desc[prev].flags &= cpu_to_virtio16(_vq->vdev, ~VRING_DESC_F_NEXT); > + desc[prev].flags &= cpu_to_virtio16(_vq->vdev, > + (u16)~BIT(VRING_SPLIT_DESC_F_NEXT)); > > if (indirect) { > /* Now that the indirect table is filled in, map it. */ I kind of dislike it that this forces use of a cast here. Kind of makes it more fragile. Let's use a temporary instead? > -- > 2.17.1
2018 Dec 07
2
[RFC 3/3] virtio_ring: use new vring flags
...,7 +505,8 @@ static inline int virtqueue_add_split(struct virtqueue *_vq, > } > } > /* Last one doesn't continue. */ > - desc[prev].flags &= cpu_to_virtio16(_vq->vdev, ~VRING_DESC_F_NEXT); > + desc[prev].flags &= cpu_to_virtio16(_vq->vdev, > + (u16)~BIT(VRING_SPLIT_DESC_F_NEXT)); > > if (indirect) { > /* Now that the indirect table is filled in, map it. */ I kind of dislike it that this forces use of a cast here. Kind of makes it more fragile. Let's use a temporary instead? > -- > 2.17.1
2018 Dec 08
0
[RFC 3/3] virtio_ring: use new vring flags
...virtqueue_add_split(struct virtqueue *_vq, > > } > > } > > /* Last one doesn't continue. */ > > - desc[prev].flags &= cpu_to_virtio16(_vq->vdev, ~VRING_DESC_F_NEXT); > > + desc[prev].flags &= cpu_to_virtio16(_vq->vdev, > > + (u16)~BIT(VRING_SPLIT_DESC_F_NEXT)); > > > > if (indirect) { > > /* Now that the indirect table is filled in, map it. */ > > I kind of dislike it that this forces use of a cast here. > Kind of makes it more fragile. Let's use a temporary instead? I tried something like this: u16 mask = ~BIT(...
2018 Dec 07
7
[RFC 0/3] virtio_ring: define flags as shifts consistently
This is a follow up of the discussion in this thread: https://patchwork.ozlabs.org/patch/1001015/#2042353 Tiwei Bie (3): virtio_ring: define flags as shifts consistently virtio_ring: add VIRTIO_RING_NO_LEGACY virtio_ring: use new vring flags drivers/virtio/virtio_ring.c | 100 ++++++++++++++++++------------- include/uapi/linux/virtio_ring.h | 61 +++++++++++++------ 2 files changed,
2018 Dec 07
7
[RFC 0/3] virtio_ring: define flags as shifts consistently
This is a follow up of the discussion in this thread: https://patchwork.ozlabs.org/patch/1001015/#2042353 Tiwei Bie (3): virtio_ring: define flags as shifts consistently virtio_ring: add VIRTIO_RING_NO_LEGACY virtio_ring: use new vring flags drivers/virtio/virtio_ring.c | 100 ++++++++++++++++++------------- include/uapi/linux/virtio_ring.h | 61 +++++++++++++------ 2 files changed,
2018 Dec 07
0
[RFC 3/3] virtio_ring: use new vring flags
...MA_TO_DEVICE); } } @@ -481,7 +481,8 @@ static inline int virtqueue_add_split(struct virtqueue *_vq, if (vring_mapping_error(vq, addr)) goto unmap_release; - desc[i].flags = cpu_to_virtio16(_vq->vdev, VRING_DESC_F_NEXT); + desc[i].flags = cpu_to_virtio16(_vq->vdev, + BIT(VRING_SPLIT_DESC_F_NEXT)); desc[i].addr = cpu_to_virtio64(_vq->vdev, addr); desc[i].len = cpu_to_virtio32(_vq->vdev, sg->length); prev = i; @@ -494,7 +495,9 @@ static inline int virtqueue_add_split(struct virtqueue *_vq, if (vring_mapping_error(vq, addr)) goto unmap_release; - desc[i].fla...
2018 Dec 07
1
[RFC 2/3] virtio_ring: add VIRTIO_RING_NO_LEGACY
...ity. > @@ -51,6 +52,7 @@ > #define VRING_USED_F_NO_NOTIFY 1 > /* Same as VRING_SPLIT_AVAIL_F_NO_INTERRUPT. */ > #define VRING_AVAIL_F_NO_INTERRUPT 1 > +#endif /* VIRTIO_RING_NO_LEGACY */ > > /* Mark a buffer as continuing via the next field in split ring. */ > #define VRING_SPLIT_DESC_F_NEXT 0 > @@ -151,6 +153,7 @@ struct vring { > struct vring_used *used; > }; > > +#ifndef VIRTIO_RING_NO_LEGACY > /* Alignment requirements for vring elements. > * When using pre-virtio 1.0 layout, these fall out naturally. > */ > @@ -203,6 +206,7 @@ static inline un...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...have names which are with _F_ and > have the bit number. How about something like this: #define VRING_COMM_DESC_F_NEXT 0 #define VRING_COMM_DESC_F_WRITE 1 #define VRING_COMM_DESC_F_INDIRECT 2 #define VRING_SPLIT_USED_F_NO_NOTIFY 0 #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 or #define VRING_SPLIT_DESC_F_NEXT 0 #define VRING_SPLIT_DESC_F_WRITE 1 #define VRING_SPLIT_DESC_F_INDIRECT 2 #define VRING_SPLIT_USED_F_NO_NOTIFY 0 #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 #define VRING_PACKED_DESC_F_NEXT 0 #define VRING_PACKED_DESC_F_WRITE 1 #define VRING_PACKED_DESC_F_INDIRECT 2 > > > &gt...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...have names which are with _F_ and > have the bit number. How about something like this: #define VRING_COMM_DESC_F_NEXT 0 #define VRING_COMM_DESC_F_WRITE 1 #define VRING_COMM_DESC_F_INDIRECT 2 #define VRING_SPLIT_USED_F_NO_NOTIFY 0 #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 or #define VRING_SPLIT_DESC_F_NEXT 0 #define VRING_SPLIT_DESC_F_WRITE 1 #define VRING_SPLIT_DESC_F_INDIRECT 2 #define VRING_SPLIT_USED_F_NO_NOTIFY 0 #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 #define VRING_PACKED_DESC_F_NEXT 0 #define VRING_PACKED_DESC_F_WRITE 1 #define VRING_PACKED_DESC_F_INDIRECT 2 > > > &gt...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...gt; #define VRING_COMM_DESC_F_NEXT 0 > > #define VRING_COMM_DESC_F_WRITE 1 > > #define VRING_COMM_DESC_F_INDIRECT 2 > > > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > > > or > > > > #define VRING_SPLIT_DESC_F_NEXT 0 > > #define VRING_SPLIT_DESC_F_WRITE 1 > > #define VRING_SPLIT_DESC_F_INDIRECT 2 > > > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > > > #define VRING_PACKED_DESC_F_NEXT 0 > > #define VRING_PACKE...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...gt; #define VRING_COMM_DESC_F_NEXT 0 > > #define VRING_COMM_DESC_F_WRITE 1 > > #define VRING_COMM_DESC_F_INDIRECT 2 > > > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > > > or > > > > #define VRING_SPLIT_DESC_F_NEXT 0 > > #define VRING_SPLIT_DESC_F_WRITE 1 > > #define VRING_SPLIT_DESC_F_INDIRECT 2 > > > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > > > #define VRING_PACKED_DESC_F_NEXT 0 > > #define VRING_PACKE...
2018 Dec 07
0
[RFC 2/3] virtio_ring: add VIRTIO_RING_NO_LEGACY
...values instead of shifts for compatibility. @@ -51,6 +52,7 @@ #define VRING_USED_F_NO_NOTIFY 1 /* Same as VRING_SPLIT_AVAIL_F_NO_INTERRUPT. */ #define VRING_AVAIL_F_NO_INTERRUPT 1 +#endif /* VIRTIO_RING_NO_LEGACY */ /* Mark a buffer as continuing via the next field in split ring. */ #define VRING_SPLIT_DESC_F_NEXT 0 @@ -151,6 +153,7 @@ struct vring { struct vring_used *used; }; +#ifndef VIRTIO_RING_NO_LEGACY /* Alignment requirements for vring elements. * When using pre-virtio 1.0 layout, these fall out naturally. */ @@ -203,6 +206,7 @@ static inline unsigned vring_size(unsigned int num, unsigned...
2018 Nov 30
0
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...> How about something like this: > > #define VRING_COMM_DESC_F_NEXT 0 > #define VRING_COMM_DESC_F_WRITE 1 > #define VRING_COMM_DESC_F_INDIRECT 2 > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > or > > #define VRING_SPLIT_DESC_F_NEXT 0 > #define VRING_SPLIT_DESC_F_WRITE 1 > #define VRING_SPLIT_DESC_F_INDIRECT 2 > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > #define VRING_PACKED_DESC_F_NEXT 0 > #define VRING_PACKED_DESC_F_WRITE 1 > #define VRING_PAC...
2018 Nov 30
0
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...gt; > #define VRING_COMM_DESC_F_WRITE 1 > > > #define VRING_COMM_DESC_F_INDIRECT 2 > > > > > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > > > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > > > > > or > > > > > > #define VRING_SPLIT_DESC_F_NEXT 0 > > > #define VRING_SPLIT_DESC_F_WRITE 1 > > > #define VRING_SPLIT_DESC_F_INDIRECT 2 > > > > > > #define VRING_SPLIT_USED_F_NO_NOTIFY 0 > > > #define VRING_SPLIT_AVAIL_F_NO_INTERRUPT 0 > > > > > > #define VRING_PACKED_DESC_F_NE...
2018 Nov 30
4
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
On 2018/11/21 ??6:03, Tiwei Bie wrote: > Add types and macros for packed ring. > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> > --- > include/uapi/linux/virtio_config.h | 3 +++ > include/uapi/linux/virtio_ring.h | 52 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 55 insertions(+) > > diff --git a/include/uapi/linux/virtio_config.h
2018 Nov 30
4
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
On 2018/11/21 ??6:03, Tiwei Bie wrote: > Add types and macros for packed ring. > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> > --- > include/uapi/linux/virtio_config.h | 3 +++ > include/uapi/linux/virtio_ring.h | 52 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 55 insertions(+) > > diff --git a/include/uapi/linux/virtio_config.h