search for: ring_event_flags_desc

Displaying 20 results from an estimated 29 matches for "ring_event_flags_desc".

2018 Mar 30
1
[RFC PATCH V2 8/8] vhost: event suppression for packed ring
...*/ > + smp_mb(); > + > + if (vhost_get_avail(vq, event_flags, > + &vq->driver_event->desc_event_flags) < 0) { > + vq_err(vq, "Failed to get driver desc_event_flags"); > + return true; > + } > + > + if (!(event_flags & cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC))) > + return event_flags == > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_ENABLE); Maybe it would be better to not use '&' here. Because these flags are not defined as bits which can be ORed or ANDed. Instead, they are defined as values: 0x0 enable 0x1 disable 0x2 desc 0x...
2018 May 29
0
[RFC V5 PATCH 8/8] vhost: event suppression for packed ring
...NG_F_EVENT_IDX)) + return event_flags != + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); + + old = vq->signalled_used; + v = vq->signalled_used_valid; + new = vq->signalled_used = vq->last_used_idx; + vq->signalled_used_valid = true; + + if (event_flags != cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC)) + return event_flags != + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); + + /* Read desc event flags before event_off and event_wrap */ + smp_rmb(); + + if (vhost_get_avail(vq, event_off_wrap, + &vq->driver_event->off_wrap) < 0) { + vq_err(vq, "Failed to get driv...
2018 May 30
2
[RFC V5 PATCH 8/8] vhost: event suppression for packed ring
...= > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + old = vq->signalled_used; > + v = vq->signalled_used_valid; > + new = vq->signalled_used = vq->last_used_idx; > + vq->signalled_used_valid = true; > + > + if (event_flags != cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC)) > + return event_flags != > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + /* Read desc event flags before event_off and event_wrap */ > + smp_rmb(); > + > + if (vhost_get_avail(vq, event_off_wrap, > + &vq->driver_event->off_wrap) < 0)...
2018 May 30
2
[RFC V5 PATCH 8/8] vhost: event suppression for packed ring
...= > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + old = vq->signalled_used; > + v = vq->signalled_used_valid; > + new = vq->signalled_used = vq->last_used_idx; > + vq->signalled_used_valid = true; > + > + if (event_flags != cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC)) > + return event_flags != > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + /* Read desc event flags before event_off and event_wrap */ > + smp_rmb(); > + > + if (vhost_get_avail(vq, event_off_wrap, > + &vq->driver_event->off_wrap) < 0)...
2018 Jul 04
1
[PATCH net-next 6/8] virtio: introduce packed ring defines
...x0 > +/* Disable events */ > +#define RING_EVENT_FLAGS_DISABLE 0x1 > +/* > + * Enable events for a specific descriptor > + * (as specified by Descriptor Ring Change Event Offset/Wrap Counter). > + * Only valid if VIRTIO_F_RING_EVENT_IDX has been negotiated. > + */ > +#define RING_EVENT_FLAGS_DESC 0x2 For above three macros, maybe it's better to name them as: VRING_EVENT_FLAGS_ENABLE VRING_EVENT_FLAGS_DISABLE VRING_EVENT_FLAGS_DESC or VRING_EVENT_F_ENABLE VRING_EVENT_F_DISABLE VRING_EVENT_F_DESC VRING_EVENT_F_* will be more consistent with VIRTIO_F_*, VRING_DESC_F_*, etc > +/* T...
2018 Mar 26
0
[RFC PATCH V2 8/8] vhost: event suppression for packed ring
...est executes when enabling + * interrupts. + */ + smp_mb(); + + if (vhost_get_avail(vq, event_flags, + &vq->driver_event->desc_event_flags) < 0) { + vq_err(vq, "Failed to get driver desc_event_flags"); + return true; + } + + if (!(event_flags & cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC))) + return event_flags == + cpu_to_vhost16(vq, RING_EVENT_FLAGS_ENABLE); + + /* Read desc event flags before event_off and event_wrap */ + smp_rmb(); + + if (vhost_get_avail(vq, event_off_wrap, + &vq->driver_event->desc_event_off_warp) < 0) { + vq_err(vq, "Failed...
2018 Jul 03
0
[PATCH net-next 8/8] vhost: event suppression for packed ring
...NG_F_EVENT_IDX)) + return event_flags != + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); + + old = vq->signalled_used; + v = vq->signalled_used_valid; + new = vq->signalled_used = vq->last_used_idx; + vq->signalled_used_valid = true; + + if (event_flags != cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC)) + return event_flags != + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); + + /* Read desc event flags before event_off and event_wrap */ + smp_rmb(); + + if (vhost_get_avail(vq, event_off_wrap, + &vq->driver_event->off_wrap) < 0) { + vq_err(vq, "Failed to get driv...
2018 Jul 03
0
[PATCH net-next 6/8] virtio: introduce packed ring defines
...ts */ +#define RING_EVENT_FLAGS_ENABLE 0x0 +/* Disable events */ +#define RING_EVENT_FLAGS_DISABLE 0x1 +/* + * Enable events for a specific descriptor + * (as specified by Descriptor Ring Change Event Offset/Wrap Counter). + * Only valid if VIRTIO_F_RING_EVENT_IDX has been negotiated. + */ +#define RING_EVENT_FLAGS_DESC 0x2 +/* The value 0x3 is reserved */ + +struct vring_packed_desc_event { + /* Descriptor Ring Change Event Offset and Wrap Counter */ + __virtio16 off_wrap; + /* Descriptor Ring Change Event Flags */ + __virtio16 flags; +}; + /* Virtio ring descriptors: 16 bytes. These can chain together via &quo...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...>last_add_time_valid = false; > > > > +#endif > > > > + > > > > + off_wrap = virtio16_to_cpu(_vq->vdev, vq->vring_packed.device->off_wrap); > > > > + > > > > + if (vq->event) { > > > It looks to me we should examine RING_EVENT_FLAGS_DESC in desc_event_flags > > > instead of vq->event here. Spec does not forces to use evenf_off and > > > event_wrap if event index is enabled. > > > > > > > + // FIXME: fix this! > > > > + needs_kick = ((off_wrap >> 15) == vq->wrap_count...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
...>last_add_time_valid = false; > > > > +#endif > > > > + > > > > + off_wrap = virtio16_to_cpu(_vq->vdev, vq->vring_packed.device->off_wrap); > > > > + > > > > + if (vq->event) { > > > It looks to me we should examine RING_EVENT_FLAGS_DESC in desc_event_flags > > > instead of vq->event here. Spec does not forces to use evenf_off and > > > event_wrap if event index is enabled. > > > > > > > + // FIXME: fix this! > > > > + needs_kick = ((off_wrap >> 15) == vq->wrap_count...
2018 Jul 04
2
[PATCH net-next 8/8] vhost: event suppression for packed ring
...= > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + old = vq->signalled_used; > + v = vq->signalled_used_valid; > + new = vq->signalled_used = vq->last_used_idx; > + vq->signalled_used_valid = true; > + > + if (event_flags != cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC)) > + return event_flags != > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + /* Read desc event flags before event_off and event_wrap */ > + smp_rmb(); > + > + if (vhost_get_avail(vq, event_off_wrap, > + &vq->driver_event->off_wrap) < 0)...
2018 Jul 04
2
[PATCH net-next 8/8] vhost: event suppression for packed ring
...= > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + old = vq->signalled_used; > + v = vq->signalled_used_valid; > + new = vq->signalled_used = vq->last_used_idx; > + vq->signalled_used_valid = true; > + > + if (event_flags != cpu_to_vhost16(vq, RING_EVENT_FLAGS_DESC)) > + return event_flags != > + cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE); > + > + /* Read desc event flags before event_off and event_wrap */ > + smp_rmb(); > + > + if (vhost_get_avail(vq, event_off_wrap, > + &vq->driver_event->off_wrap) < 0)...
2018 Apr 17
0
[RFC v2] virtio: support packed ring
...8 +- >>>>> include/uapi/linux/virtio_config.h | 12 +- >>>>> include/uapi/linux/virtio_ring.h | 61 ++ >>>>> 4 files changed, 980 insertions(+), 195 deletions(-) >>> [...] [...] >>>> It looks to me we should examine RING_EVENT_FLAGS_DESC in desc_event_flags >>>> instead of vq->event here. Spec does not forces to use evenf_off and >>>> event_wrap if event index is enabled. >>>> >>>>> + // FIXME: fix this! >>>>> + needs_kick = ((off_wrap >> 15) == vq->wra...
2018 Apr 13
3
[RFC v2] virtio: support packed ring
...st_add_time)) > 100); > > + } > > + vq->last_add_time_valid = false; > > +#endif > > + > > + off_wrap = virtio16_to_cpu(_vq->vdev, vq->vring_packed.device->off_wrap); > > + > > + if (vq->event) { > > It looks to me we should examine RING_EVENT_FLAGS_DESC in desc_event_flags > instead of vq->event here. Spec does not forces to use evenf_off and > event_wrap if event index is enabled. > > > + // FIXME: fix this! > > + needs_kick = ((off_wrap >> 15) == vq->wrap_counter) && > > + vring_need_event...
2018 Apr 13
3
[RFC v2] virtio: support packed ring
...st_add_time)) > 100); > > + } > > + vq->last_add_time_valid = false; > > +#endif > > + > > + off_wrap = virtio16_to_cpu(_vq->vdev, vq->vring_packed.device->off_wrap); > > + > > + if (vq->event) { > > It looks to me we should examine RING_EVENT_FLAGS_DESC in desc_event_flags > instead of vq->event here. Spec does not forces to use evenf_off and > event_wrap if event index is enabled. > > > + // FIXME: fix this! > > + needs_kick = ((off_wrap >> 15) == vq->wrap_counter) && > > + vring_need_event...
2018 May 16
0
[RFC V4 PATCH 8/8] vhost: event suppression for packed ring
...ts */ +#define RING_EVENT_FLAGS_ENABLE 0x0 +/* Disable events */ +#define RING_EVENT_FLAGS_DISABLE 0x1 +/* + * Enable events for a specific descriptor + * (as specified by Descriptor Ring Change Event Offset/Wrap Counter). + * Only valid if VIRTIO_F_RING_EVENT_IDX has been negotiated. + */ +#define RING_EVENT_FLAGS_DESC 0x2 +/* The value 0x3 is reserved */ + +struct vring_packed_desc_event { + /* Descriptor Ring Change Event Offset and Wrap Counter */ + __virtio16 off_warp; + /* Descriptor Ring Change Event Flags */ + __virtio16 flags; +}; + /* Virtio ring descriptors: 16 bytes. These can chain together via &quo...
2018 May 29
9
[RFC V5 PATCH 0/8] Packed ring layout for vhost
Hi all: This RFC implement packed ring layout. The code were tested with Tiwei's RFC V5 at https://lkml.org/lkml/2018/5/22/138. Some fixups and tweaks were needed on top of Tiwei's code to make it run for event index. Pktgen reports about 20% improvement on TX PPS when doing pktgen from guest to host. No ovbious improvement on RX PPS. We can do lots of optimizations on top but for simple
2018 Mar 26
12
[RFC PATCH V2 0/8] Packed ring for vhost
Hi all: This RFC implement packed ring layout. The code were tested with pmd implement by Jens at http://dpdk.org/ml/archives/dev/2018-January/089417.html. Minor change was needed for pmd codes to kick virtqueue since it assumes a busy polling backend. Test were done between localhost and guest. Testpmd (rxonly) in guest reports 2.4Mpps. Testpmd (txonly) repots about 2.1Mpps. Notes: The event
2018 Mar 26
12
[RFC PATCH V2 0/8] Packed ring for vhost
Hi all: This RFC implement packed ring layout. The code were tested with pmd implement by Jens at http://dpdk.org/ml/archives/dev/2018-January/089417.html. Minor change was needed for pmd codes to kick virtqueue since it assumes a busy polling backend. Test were done between localhost and guest. Testpmd (rxonly) in guest reports 2.4Mpps. Testpmd (txonly) repots about 2.1Mpps. Notes: The event
2018 Apr 17
0
[RFC v2] virtio: support packed ring
...100); >>> + } >>> + vq->last_add_time_valid = false; >>> +#endif >>> + >>> + off_wrap = virtio16_to_cpu(_vq->vdev, vq->vring_packed.device->off_wrap); >>> + >>> + if (vq->event) { >> It looks to me we should examine RING_EVENT_FLAGS_DESC in desc_event_flags >> instead of vq->event here. Spec does not forces to use evenf_off and >> event_wrap if event index is enabled. >> >>> + // FIXME: fix this! >>> + needs_kick = ((off_wrap >> 15) == vq->wrap_counter) && >>> +...