search for: vring_event_f_desc

Displaying 20 results from an estimated 50 matches for "vring_event_f_desc".

2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...vdev, snapshot >> 16) & 0x3; > > #ifdef DEBUG > @@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > vq->last_add_time_valid = false; > #endif > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > + if (flags == VRING_EVENT_F_DESC) > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); I wonder whether or not the math is correct. Both new and event are in the unit of descriptor ring size, but old looks not. Thanks > + else > + needs_kick = (flags != VRING_EVENT_F_DISABLE); > END_USE(...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...vdev, snapshot >> 16) & 0x3; > > #ifdef DEBUG > @@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > vq->last_add_time_valid = false; > #endif > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > + if (flags == VRING_EVENT_F_DESC) > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); I wonder whether or not the math is correct. Both new and event are in the unit of descriptor ring size, but old looks not. Thanks > + else > + needs_kick = (flags != VRING_EVENT_F_DISABLE); > END_USE(...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
..._packed.device->flags. So > > what's the "flags"? > > Sorry, I mean we need check device.flags before off_warp. So it needs an > smp_rmb() in the middle. It's best to just read all flags atomically as u32. > It looks to me there's no guarantee that > VRING_EVENT_F_DESC is set if event index is supported. > > > > > > > + needs_kick = (vq->vring_packed.device->flags != > > > > + cpu_to_virtio16(_vq->vdev, VRING_EVENT_F_DISABLE)); > > > > + } > > > > + END_USE(vq); > > > > + ret...
2018 Apr 17
2
[RFC v2] virtio: support packed ring
..._packed.device->flags. So > > what's the "flags"? > > Sorry, I mean we need check device.flags before off_warp. So it needs an > smp_rmb() in the middle. It's best to just read all flags atomically as u32. > It looks to me there's no guarantee that > VRING_EVENT_F_DESC is set if event index is supported. > > > > > > > + needs_kick = (vq->vring_packed.device->flags != > > > > + cpu_to_virtio16(_vq->vdev, VRING_EVENT_F_DISABLE)); > > > > + } > > > > + END_USE(vq); > > > > + ret...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...> > #ifdef DEBUG > > > @@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > vq->last_add_time_valid = false; > > > #endif > > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > > > + if (flags == VRING_EVENT_F_DESC) > > > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); > > > > I wonder whether or not the math is correct. Both new and event are in the > > unit of descriptor ring size, but old looks not. > > What vring_need_event() cares is the dista...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...> > #ifdef DEBUG > > > @@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > vq->last_add_time_valid = false; > > > #endif > > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > > > + if (flags == VRING_EVENT_F_DESC) > > > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); > > > > I wonder whether or not the math is correct. Both new and event are in the > > unit of descriptor ring size, but old looks not. > > What vring_need_event() cares is the dista...
2018 Sep 07
1
[PATCH net-next v2 4/5] virtio_ring: add event idx support in packed ring
..._add_time_valid) { > WARN_ON(ktime_to_ms(ktime_sub(ktime_get(), > @@ -1070,7 +1080,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > vq->last_add_time_valid = false; > #endif > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > + if (flags == VRING_EVENT_F_DESC) > + needs_kick = vring_need_event(event_idx, new, old); > + else > + needs_kick = (flags != VRING_EVENT_F_DISABLE); > END_USE(vq); > return needs_kick; > } > @@ -1185,6 +1198,15 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, > ret = vq->desc...
2018 May 16
1
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...vdev, snapshot >> 16) & 0x3; > > #ifdef DEBUG > @@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > vq->last_add_time_valid = false; > #endif > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > + if (flags == VRING_EVENT_F_DESC) > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); > + else > + needs_kick = (flags != VRING_EVENT_F_DISABLE); > END_USE(vq); > return needs_kick; > } > @@ -1116,6 +1124,15 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, &...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...@@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > vq->last_add_time_valid = false; > > > > > #endif > > > > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > > > > > + if (flags == VRING_EVENT_F_DESC) > > > > > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); > > > > > > > > I wonder whether or not the math is correct. Both new and event are in the > > > > unit of descriptor ring size, but old looks not. > > &gt...
2018 May 02
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...@@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > vq->last_add_time_valid = false; > > > > > #endif > > > > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > > > > > + if (flags == VRING_EVENT_F_DESC) > > > > > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); > > > > > > > > I wonder whether or not the math is correct. Both new and event are in the > > > > unit of descriptor ring size, but old looks not. > > &gt...
2018 Apr 17
0
[RFC v2] virtio: support packed ring
...gt;> what's the "flags"? >> Sorry, I mean we need check device.flags before off_warp. So it needs an >> smp_rmb() in the middle. > It's best to just read all flags atomically as u32. Yes it is. > >> It looks to me there's no guarantee that >> VRING_EVENT_F_DESC is set if event index is supported. >> >>>>> + needs_kick = (vq->vring_packed.device->flags != >>>>> + cpu_to_virtio16(_vq->vdev, VRING_EVENT_F_DISABLE)); >>>>> + } >>>>> + END_USE(vq); >>>>> + return...
2018 May 16
2
[RFC v4 4/5] virtio_ring: add event idx support in packed ring
..._time_valid) { > WARN_ON(ktime_to_ms(ktime_sub(ktime_get(), > @@ -1026,7 +1036,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > vq->last_add_time_valid = false; > #endif > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > + if (flags == VRING_EVENT_F_DESC) > + needs_kick = vring_need_event(event_idx, new, old); > + else > + needs_kick = (flags != VRING_EVENT_F_DISABLE); > END_USE(vq); > return needs_kick; > } > @@ -1098,7 +1111,7 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, > void **c...
2018 May 16
2
[RFC v4 4/5] virtio_ring: add event idx support in packed ring
..._time_valid) { > WARN_ON(ktime_to_ms(ktime_sub(ktime_get(), > @@ -1026,7 +1036,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) > vq->last_add_time_valid = false; > #endif > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > + if (flags == VRING_EVENT_F_DESC) > + needs_kick = vring_need_event(event_idx, new, old); > + else > + needs_kick = (flags != VRING_EVENT_F_DISABLE); > END_USE(vq); > return needs_kick; > } > @@ -1098,7 +1111,7 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, > void **c...
2018 Apr 25
0
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...; 0xffff); flags = cpu_to_virtio16(_vq->vdev, snapshot >> 16) & 0x3; #ifdef DEBUG @@ -1006,7 +1011,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) vq->last_add_time_valid = false; #endif - needs_kick = (flags != VRING_EVENT_F_DISABLE); + if (flags == VRING_EVENT_F_DESC) + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); + else + needs_kick = (flags != VRING_EVENT_F_DISABLE); END_USE(vq); return needs_kick; } @@ -1116,6 +1124,15 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, if (vq->last_used_idx >= vq-&gt...
2018 Jul 09
0
[PATCH net-next v1 4/5] virtio_ring: add event idx support in packed ring
...; + #ifdef DEBUG if (vq->last_add_time_valid) { WARN_ON(ktime_to_ms(ktime_sub(ktime_get(), @@ -1070,7 +1080,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) vq->last_add_time_valid = false; #endif - needs_kick = (flags != VRING_EVENT_F_DISABLE); + if (flags == VRING_EVENT_F_DESC) + needs_kick = vring_need_event(event_idx, new, old); + else + needs_kick = (flags != VRING_EVENT_F_DISABLE); END_USE(vq); return needs_kick; } @@ -1185,6 +1198,15 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, ret = vq->desc_state_packed[id].data; detach_buf_pac...
2018 Jul 11
0
[PATCH net-next v2 4/5] virtio_ring: add event idx support in packed ring
...; + #ifdef DEBUG if (vq->last_add_time_valid) { WARN_ON(ktime_to_ms(ktime_sub(ktime_get(), @@ -1070,7 +1080,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) vq->last_add_time_valid = false; #endif - needs_kick = (flags != VRING_EVENT_F_DISABLE); + if (flags == VRING_EVENT_F_DESC) + needs_kick = vring_need_event(event_idx, new, old); + else + needs_kick = (flags != VRING_EVENT_F_DISABLE); END_USE(vq); return needs_kick; } @@ -1185,6 +1198,15 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, ret = vq->desc_state_packed[id].data; detach_buf_pac...
2018 Jun 05
0
[RFC v6 4/5] virtio_ring: add event idx support in packed ring
...; + #ifdef DEBUG if (vq->last_add_time_valid) { WARN_ON(ktime_to_ms(ktime_sub(ktime_get(), @@ -1068,7 +1078,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) vq->last_add_time_valid = false; #endif - needs_kick = (flags != VRING_EVENT_F_DISABLE); + if (flags == VRING_EVENT_F_DESC) + needs_kick = vring_need_event(event_idx, new, old); + else + needs_kick = (flags != VRING_EVENT_F_DISABLE); END_USE(vq); return needs_kick; } @@ -1177,6 +1190,15 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, ret = vq->desc_state_packed[id].data; detach_buf_pac...
2018 May 16
0
[RFC v4 4/5] virtio_ring: add event idx support in packed ring
...; + #ifdef DEBUG if (vq->last_add_time_valid) { WARN_ON(ktime_to_ms(ktime_sub(ktime_get(), @@ -1026,7 +1036,10 @@ static bool virtqueue_kick_prepare_packed(struct virtqueue *_vq) vq->last_add_time_valid = false; #endif - needs_kick = (flags != VRING_EVENT_F_DISABLE); + if (flags == VRING_EVENT_F_DESC) + needs_kick = vring_need_event(event_idx, new, old); + else + needs_kick = (flags != VRING_EVENT_F_DISABLE); END_USE(vq); return needs_kick; } @@ -1098,7 +1111,7 @@ static void *virtqueue_get_buf_ctx_packed(struct virtqueue *_vq, void **ctx) { struct vring_virtqueue *vq = to_vvq...
2018 May 03
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...ueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > > > vq->last_add_time_valid = false; > > > > > > > #endif > > > > > > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > > > > > > > + if (flags == VRING_EVENT_F_DESC) > > > > > > > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); > > > > > > > > > > > > I wonder whether or not the math is correct. Both new and event are in the > > > > > > unit of descriptor rin...
2018 May 03
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...ueue_kick_prepare_packed(struct virtqueue *_vq) > > > > > > > vq->last_add_time_valid = false; > > > > > > > #endif > > > > > > > - needs_kick = (flags != VRING_EVENT_F_DISABLE); > > > > > > > + if (flags == VRING_EVENT_F_DESC) > > > > > > > + needs_kick = vring_need_event(off_wrap & ~(1<<15), new, old); > > > > > > > > > > > > I wonder whether or not the math is correct. Both new and event are in the > > > > > > unit of descriptor rin...