Displaying 5 results from an estimated 5 matches for "vring_s".
Did you mean:
vring's
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...s are kept
around to avoid breaking old userspace builds.
It's not actually part of the UAPI - it was kept in the UAPI
header by mistake, and using it in kernel isn't necessary
and prevents us from making changes safely.
In particular, the APIs actually assume the legacy layout.
Add struct vring_s (identical ATM) and supporting
legacy APIs and switch everyone to use that.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/misc/mic/vop/vop_main.c | 2 +-
drivers/platform/mellanox/mlxbf-tmfifo.c | 10 ++++-----
drivers/virtio/virtio_ring.c | 10 ++++...
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...s are kept
around to avoid breaking old userspace builds.
It's not actually part of the UAPI - it was kept in the UAPI
header by mistake, and using it in kernel isn't necessary
and prevents us from making changes safely.
In particular, the APIs actually assume the legacy layout.
Add struct vring_s (identical ATM) and supporting
legacy APIs and switch everyone to use that.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/misc/mic/vop/vop_main.c | 2 +-
drivers/platform/mellanox/mlxbf-tmfifo.c | 10 ++++-----
drivers/virtio/virtio_ring.c | 10 ++++...
2020 Apr 06
0
[PATCH v2 1/2] virtio: stop using legacy struct vring
...aking old userspace builds.
> It's not actually part of the UAPI - it was kept in the UAPI
> header by mistake, and using it in kernel isn't necessary
> and prevents us from making changes safely.
> In particular, the APIs actually assume the legacy layout.
>
> Add struct vring_s (identical ATM) and supporting
> legacy APIs and switch everyone to use that.
How are we going to know that "struct vring_s" is what we need/want to
use? What does "_s" mean?
"struct vring_kernel"?
naming is hard...
greg k-h
2020 Apr 06
0
[PATCH v2 2/2] vhost: force spec specified alignment on types
...nd specifying the packed
+ * attribute generates a warning.
+ */
+typedef struct vring_desc __aligned(VRING_DESC_ALIGN_SIZE) vring_desc_t;
+typedef struct vring_avail __aligned(VRING_AVAIL_ALIGN_SIZE) vring_avail_t;
+typedef struct vring_used __aligned(VRING_USED_ALIGN_SIZE) vring_used_t;
+
struct vring_s {
unsigned int num;
- struct vring_desc *desc;
+ vring_desc_t *desc;
- struct vring_avail *avail;
+ vring_avail_t *avail;
- struct vring_used *used;
+ vring_used_t *used;
};
static inline void vring_legacy_init(struct vring_s *vr, unsigned int num, void *p,
--
MST
2020 Apr 06
1
[PATCH v3 1/2] virtio: stop using legacy struct vring in kernel
...ce builds.
+ */
+struct vring {
+ unsigned int num;
+
+ struct vring_desc *desc;
+
+ struct vring_avail *avail;
+
+ struct vring_used *used;
+};
+
static inline void vring_init(struct vring *vr, unsigned int num, void *p,
unsigned long align)
{
@@ -180,6 +185,7 @@ static inline unsigned vring_size(unsigned int num, unsigned long align)
+ align - 1) & ~(align - 1))
+ sizeof(__virtio16) * 3 + sizeof(struct vring_used_elem) * num;
}
+#endif
/* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */
/* Assuming a given event_idx value from the other side, if
diff --gi...