search for: vring_packed_event_f_wrap_ctr

Displaying 20 results from an estimated 23 matches for "vring_packed_event_f_wrap_ctr".

2023 Apr 02
1
[PATCH v6] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...; +u32 vring_notification_data(struct virtqueue *_vq) > +{ > + struct vring_virtqueue *vq = to_vvq(_vq); > + u16 next; > + > + if (vq->packed_ring) > + next = (vq->packed.next_avail_idx & > + ~(-(1 << VRING_PACKED_EVENT_F_WRAP_CTR))) | > + vq->packed.avail_wrap_counter << > + VRING_PACKED_EVENT_F_WRAP_CTR; > + else > + next = vq->split.avail_idx_shadow; > + > + return next << 16 | _vq->index; > +} > +EXP...
2018 Dec 07
0
[RFC 3/3] virtio_ring: use new vring flags
...1 << VRING_PACKED_DESC_F_USED; + BIT(VRING_PACKED_DESC_F_AVAIL) | + BIT(VRING_PACKED_DESC_F_USED); } } } @@ -1258,7 +1275,7 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) off_wrap = le16_to_cpu(snapshot.off_wrap); wrap_counter = off_wrap >> VRING_PACKED_EVENT_F_WRAP_CTR; - event_idx = off_wrap & ~(1 << VRING_PACKED_EVENT_F_WRAP_CTR); + event_idx = off_wrap & ~BIT(VRING_PACKED_EVENT_F_WRAP_CTR); if (wrap_counter != vq->packed.avail_wrap_counter) event_idx -= vq->packed.vring.num; @@ -1321,8 +1338,8 @@ static inline bool is_used_desc_packe...
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 Nov 30
4
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...Only valid if VIRTIO_RING_F_EVENT_IDX has been negotiated. > + */ > +#define VRING_PACKED_EVENT_FLAG_DESC 0x2 Any reason for using _FLAG_ instead of _F_? Thanks > + > +/* > + * Wrap counter bit shift in event suppression structure > + * of packed ring. > + */ > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > + > /* We support indirect buffer descriptors */ > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old) > return (__u16)(new_idx - event_idx - 1) < (__u16)(new_idx - old); &g...
2018 Nov 30
4
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...Only valid if VIRTIO_RING_F_EVENT_IDX has been negotiated. > + */ > +#define VRING_PACKED_EVENT_FLAG_DESC 0x2 Any reason for using _FLAG_ instead of _F_? Thanks > + > +/* > + * Wrap counter bit shift in event suppression structure > + * of packed ring. > + */ > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > + > /* We support indirect buffer descriptors */ > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old) > return (__u16)(new_idx - event_idx - 1) < (__u16)(new_idx - old); &g...
2023 Apr 04
2
[PATCH v6] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
...ct virtqueue *_vq) > > +{ > > + struct vring_virtqueue *vq = to_vvq(_vq); > > + u16 next; > > + > > + if (vq->packed_ring) > > + next = (vq->packed.next_avail_idx & > > + ~(-(1 << VRING_PACKED_EVENT_F_WRAP_CTR))) | > > + vq->packed.avail_wrap_counter << > > + VRING_PACKED_EVENT_F_WRAP_CTR; > > + else > > + next = vq->split.avail_idx_shadow; > > + > > + return next << 16 | _v...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...> > > > > > > > > > + > > > > > > +/* > > > > > > + * Wrap counter bit shift in event suppression structure > > > > > > + * of packed ring. > > > > > > + */ > > > > > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > > > > > + > > > > > > /* We support indirect buffer descriptors */ > > > > > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > > > > > @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_i...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...> > > > > > > > > > + > > > > > > +/* > > > > > > + * Wrap counter bit shift in event suppression structure > > > > > > + * of packed ring. > > > > > > + */ > > > > > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > > > > > + > > > > > > /* We support indirect buffer descriptors */ > > > > > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > > > > > @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_i...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...; + > > > > > > > > +/* > > > > > > > > + * Wrap counter bit shift in event suppression structure > > > > > > > > + * of packed ring. > > > > > > > > + */ > > > > > > > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > > > > > > > + > > > > > > > > /* We support indirect buffer descriptors */ > > > > > > > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > > > > > > > @@ -171,4 +195,32 @@ static inline int vring...
2018 Nov 30
2
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...; + > > > > > > > > +/* > > > > > > > > + * Wrap counter bit shift in event suppression structure > > > > > > > > + * of packed ring. > > > > > > > > + */ > > > > > > > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > > > > > > > + > > > > > > > > /* We support indirect buffer descriptors */ > > > > > > > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > > > > > > > @@ -171,4 +195,32 @@ static inline int vring...
2023 Mar 07
3
[PATCH 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and virtio_pci, modifying it to conform with the Linux kernel coding style guidance [1]. The modifications ensure the code easy to read and understand. This small series does few short cleanups in the code. Patch-1 Remove unnecessary num zero check, which performs in power_of_2. Patch-2 Avoid using inline for small functions.
2018 Nov 21
0
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...tor in packed ring. + * (as specified by Descriptor Ring Change Event Offset/Wrap Counter). + * Only valid if VIRTIO_RING_F_EVENT_IDX has been negotiated. + */ +#define VRING_PACKED_EVENT_FLAG_DESC 0x2 + +/* + * Wrap counter bit shift in event suppression structure + * of packed ring. + */ +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 + /* We support indirect buffer descriptors */ #define VIRTIO_RING_F_INDIRECT_DESC 28 @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old) return (__u16)(new_idx - event_idx - 1) < (__u16)(new_idx - old); } +struct vring_packed_desc_event...
2023 Mar 15
4
[PATCH v2 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and virtio_pci, modifying it to conform with the Linux kernel coding style guidance [1]. The modifications ensure the code easy to read and understand. This small series does few short cleanups in the code. Patch-1 Allow non power of 2 sizes for packed virtqueues. Patch-2 Avoid using inline for small functions. Patch-3 Use const to
2023 Mar 10
4
[PATCH v2 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and virtio_pci, modifying it to conform with the Linux kernel coding style guidance [1]. The modifications ensure the code easy to read and understand. This small series does few short cleanups in the code. Patch-1 Allow non power of 2 sizes for virtqueues Patch-2 Avoid using inline for small functions. Patch-3 Use const to annotate
2018 Nov 30
0
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...as these are values, should not have _F_: https://patchwork.ozlabs.org/patch/942296/#1989390 Regards, Tiwei > > Thanks > > > > + > > +/* > > + * Wrap counter bit shift in event suppression structure > > + * of packed ring. > > + */ > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > + > > /* We support indirect buffer descriptors */ > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old) > > return (__u16)(new_idx - event_idx - 1) < (__u16)(n...
2018 Nov 30
0
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...t; Thanks > > > > > > > > > > > > > + > > > > > +/* > > > > > + * Wrap counter bit shift in event suppression structure > > > > > + * of packed ring. > > > > > + */ > > > > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > > > > + > > > > > /* We support indirect buffer descriptors */ > > > > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > > > > @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old) >...
2018 Nov 30
0
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...; > > > > > + > > > > > > > +/* > > > > > > > + * Wrap counter bit shift in event suppression structure > > > > > > > + * of packed ring. > > > > > > > + */ > > > > > > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > > > > > > + > > > > > > > /* We support indirect buffer descriptors */ > > > > > > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > > > > > > @@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 ev...
2018 Nov 30
0
[PATCH net-next v3 01/13] virtio: add packed ring types and macros
...gt; > > > > +/* > > > > > > > > > + * Wrap counter bit shift in event suppression structure > > > > > > > > > + * of packed ring. > > > > > > > > > + */ > > > > > > > > > +#define VRING_PACKED_EVENT_F_WRAP_CTR 15 > > > > > > > > > + > > > > > > > > > /* We support indirect buffer descriptors */ > > > > > > > > > #define VIRTIO_RING_F_INDIRECT_DESC 28 > > > > > > > > > @@ -171,4 +195,32 @@ sta...
2018 Nov 21
19
[PATCH net-next v3 00/13] virtio: support packed ring
Hi, This patch set implements packed ring support in virtio driver. A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) and DPDK vhost (testpmd/rxonly/vhost-PMD) has been done, I saw ~30% performance gain in packed ring in this case. To make this patch set work with below patch set for vhost, some hacks are needed to set the _F_NEXT flag in indirect descriptors (this should