search for: event_wrap

Displaying 20 results from an estimated 31 matches for "event_wrap".

2018 Mar 30
1
[RFC PATCH V2 8/8] vhost: event suppression for packed 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 0x3 reserved > + > + /* 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 to get driver desc_event_off/wrap"); > + return true; > + } > + > + off = vhost16_to_cpu(vq, event_of...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
..., 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(off_wrap & ~(1<<15), new, old); > > > Why need a &amp...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
..., 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(off_wrap & ~(1<<15), new, old); > > > Why need a &amp...
2018 Apr 17
0
[RFC v2] virtio: support packed ring
...;>>>> 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->wrap_counter) && >>>>> + vring_need_event(off_wrap & ~(1<<15), new, old); >>>> Why need...
2018 Apr 13
3
[RFC v2] virtio: support packed ring
...t; + 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(off_wrap & ~(1<<15), new, old); > > Why need a & here? Because wrap_counter (the most sign...
2018 Apr 13
3
[RFC v2] virtio: support packed ring
...t; + 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(off_wrap & ~(1<<15), new, old); > > Why need a & here? Because wrap_counter (the most sign...
2018 May 16
0
[RFC V4 PATCH 8/8] vhost: event suppression for packed ring
...(vq, "Failed to get driver desc_event_flags"); + return true; + } + + if (event_flags == cpu_to_vhost16(vq, RING_EVENT_FLAGS_DISABLE)) + return false; + else if (event_flags == cpu_to_vhost16(vq, RING_EVENT_FLAGS_ENABLE)) + return true; + + /* Read desc event flags before event_off and event_wrap */ + smp_rmb(); + + if (vhost_get_avail(vq, event_off_wrap, + &vq->driver_event->off_warp) < 0) { + vq_err(vq, "Failed to get driver desc_event_off/wrap"); + return true; + } + + off_wrap = vhost16_to_cpu(vq, event_off_wrap); + + old = vq->signalled_used; + v = vq-...
2018 Mar 26
0
[RFC PATCH V2 8/8] vhost: event suppression for packed ring
...) < 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 to get driver desc_event_off/wrap"); + return true; + } + + off = vhost16_to_cpu(vq, event_off_wrap); + + wrap = off & 0x1; + off >...
2018 Jul 03
0
[PATCH net-next 8/8] vhost: event suppression for packed ring
...sed_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 driver desc_event_off/wrap"); + return true; + } + + off_wrap = vhost16_to_cpu(vq, event_off_wrap); + + if (unlikely(!v)) + return true; + +...
2018 May 29
0
[RFC V5 PATCH 8/8] vhost: event suppression for packed ring
...sed_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 driver desc_event_off/wrap"); + return true; + } + + off_wrap = vhost16_to_cpu(vq, event_off_wrap); + + if (unlikely(!v)) + return true; + +...
2018 May 30
2
[RFC V5 PATCH 8/8] vhost: event suppression for packed ring
..._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 driver desc_event_off/wrap"); > + return true; > + } > + > + off_wrap = vhost16_to_cpu(vq, event_off_wrap...
2018 May 30
2
[RFC V5 PATCH 8/8] vhost: event suppression for packed ring
..._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 driver desc_event_off/wrap"); > + return true; > + } > + > + off_wrap = vhost16_to_cpu(vq, event_off_wrap...
2018 Apr 17
0
[RFC v2] virtio: support packed ring
...p = 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(off_wrap & ~(1<<15), new, old); >> Why need a & here? > Because wrap_counter...
2018 Jul 04
2
[PATCH net-next 8/8] vhost: event suppression for packed ring
..._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 driver desc_event_off/wrap"); > + return true; > + } > + > + off_wrap = vhost16_to_cpu(vq, event_off_wrap...
2018 Jul 04
2
[PATCH net-next 8/8] vhost: event suppression for packed ring
..._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 driver desc_event_off/wrap"); > + return true; > + } > + > + off_wrap = vhost16_to_cpu(vq, event_off_wrap...
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 May 16
12
[RFC V4 PATCH 0/8] Packed ring layout for vhost
Hi all: This RFC implement packed ring layout. The code were tested with Tiwei's RFC V3 ahttps://lkml.org/lkml/2018/4/25/34. 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 PPS (event index is off). More testing is ongoing. Notes for tester: - Start from this version, vhost need qemu co-operation to work
2018 May 16
12
[RFC V4 PATCH 0/8] Packed ring layout for vhost
Hi all: This RFC implement packed ring layout. The code were tested with Tiwei's RFC V3 ahttps://lkml.org/lkml/2018/4/25/34. 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 PPS (event index is off). More testing is ongoing. Notes for tester: - Start from this version, vhost need qemu co-operation to work
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